#144747 - polloymedio - Tue Nov 06, 2007 4:36 pm
hey all! well, i was trying to program a panning function for the ARM7 , but for some reason, it isnt going as well as i thought it would... anyways, here's the function
I also tried modificating the SCHANNEL_PAN(channel) directly, but no results... btw, im using these macros
any ideas? I really don't think there's something wrong with the function, I made a similar function for volume control and it did work. (Difference is i used SCHANNEL_VOL(channel) = volume instead.)
Thanx in advance!
Code: |
static void snd_SetChannelPan(u8 channel, u8 pan)
{ if (channel < SND_MAX_CHANNELS){ if (pan > 127) pan = 127; SCHANNEL_CR(channel) = SOUND_PAN(pan); //SCHANNEL_PAN(channel) = pan; } } |
I also tried modificating the SCHANNEL_PAN(channel) directly, but no results... btw, im using these macros
Code: |
#define SOUND_PAN(n) ((n) << 16)
//--------------------------------------------------------------------------------- // registers //--------------------------------------------------------------------------------- #define SCHANNEL_CR(n) (*(vuint32*)(0x04000400 + ((n)<<4))) #define SCHANNEL_PAN(n) (*(vuint8*)(0x04000402 + ((n)<<4))) |
any ideas? I really don't think there's something wrong with the function, I made a similar function for volume control and it did work. (Difference is i used SCHANNEL_VOL(channel) = volume instead.)
Thanx in advance!