View unanswered posts | View active topics It is currently Thu Jun 21, 2018 11:07 am



Reply to topic  [ 2 posts ] 
 Can't change panning once an effect has started 
Author Message

Joined: Wed Aug 14, 2013 8:28 pm
Posts: 63
I'm just modifying the basic_sound example, the boom sound effect is setup like this:

Code:
mm_sound_effect boom = {
   { SFX_BOOM } ,         // id
   (int)(1.0f * (1<<10)),   // rate
   0,      // handle
   255,   // volume
   255,   // panning
};


So that it plays out of the right speaker, this code works.

But if I get the effect number and then try to change panning after it has started, like so:

Code:
if ( keys_pressed & KEY_B ) {
   u8 b = mmEffectEx(&boom);
   mmEffectPanning(b, 0);
}


It still plays out of the right speaker.

I have tested on DesMume and real hardware.


Sun May 18, 2014 4:41 pm
Profile

Joined: Wed Aug 14, 2013 8:28 pm
Posts: 63
Ah, changing u8 to int got it working.


Sun May 18, 2014 4:47 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads