Can't change panning once an effect has started

support for the gba/nds sound library from www.maxmod.org

Moderator: eKid

Post Reply
Derrik
Posts: 63
Joined: Wed Aug 14, 2013 8:28 pm

Can't change panning once an effect has started

Post by Derrik » Sun May 18, 2014 4:41 pm

I'm just modifying the basic_sound example, the boom sound effect is setup like this:

Code: Select all

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: Select all

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.

Derrik
Posts: 63
Joined: Wed Aug 14, 2013 8:28 pm

Re: Can't change panning once an effect has started

Post by Derrik » Sun May 18, 2014 4:47 pm

Ah, changing u8 to int got it working.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests