Accessing sound channels volume divisor

Post Reply
sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Accessing sound channels volume divisor

Post by sverx » Fri Apr 15, 2011 2:15 pm

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.:)

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: Accessing sound channels volume divisor

Post by zeromus » Fri Apr 15, 2011 9:24 pm

what's startSound?

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: Accessing sound channels volume divisor

Post by sverx » Mon May 09, 2011 3:19 pm

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?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests