Page 1 of 1

Accessing sound channels volume divisor

Posted: Fri Apr 15, 2011 2:15 pm
by sverx
Hi!
I realized recently that arm7/audio.h it's missing a way to access audio channels 'volume divisor' (bit 8 and 9 here) directly, without affecting other parameters.
So I think maybe it's possible to add

Code: Select all

#define SCHANNEL_VOL_DIV(n)		(*(vu8*)(0x04000401 + ((n)<<4)))
and also make startSound() retain these two bits value when starting a new sound...

My 2 cents.:)

Re: Accessing sound channels volume divisor

Posted: Fri Apr 15, 2011 9:24 pm
by zeromus
what's startSound?

Re: Accessing sound channels volume divisor

Posted: Mon May 09, 2011 3:19 pm
by sverx
yes... right, that startSound() function has been removed...
so maybe in arm7/audio.c/soundDataHandler() when a new sample is triggered you could retain those two bits instead of simply resetting them. Or give a chance to manipulate them directly?