spu: last checkin with spu controls was bad. i guess i committed from the wrong directory. this fixes it

This commit is contained in:
zeromus 2009-07-10 19:29:05 +00:00
parent c2751af7f5
commit 0211a78a8e
2 changed files with 7 additions and 4 deletions

View File

@ -375,6 +375,8 @@ extern struct TCommonSettings {
strcpy(ARM9BIOS, "biosnds9.bin");
strcpy(ARM7BIOS, "biosnds7.bin");
strcpy(Firmware, "firmware.bin");
for(int i=0;i<16;i++)
spu_muteChannels[i] = false;
}
bool HighResolutionInterpolateColor;
@ -400,6 +402,8 @@ extern struct TCommonSettings {
//this is the user's choice of manual backup type, for cases when the autodetection can't be trusted
int manualBackupType;
bool spu_muteChannels[16];
struct _ShowGpu {
_ShowGpu() : main(true), sub(true) {}
union {

View File

@ -956,7 +956,6 @@ FORCEINLINE static void _SPU_ChanUpdate(const bool actuallyMix, SPU_struct* cons
template<bool actuallyMix>
static void SPU_MixAudio(SPU_struct *SPU, int length)
{
int i;
u8 vol;
if(actuallyMix)
@ -975,7 +974,7 @@ static void SPU_MixAudio(SPU_struct *SPU, int length)
vol = T1ReadByte(MMU.ARM7_REG, 0x500) & 0x7F;
for(i=0;i<16;i++)
for(int i=0;i<16;i++)
{
channel_struct *chan = &SPU->channels[i];
@ -986,12 +985,12 @@ static void SPU_MixAudio(SPU_struct *SPU, int length)
SPU->buflength = length;
// Mix audio
_SPU_ChanUpdate(actuallyMix, SPU, chan);
_SPU_ChanUpdate(!CommonSettings.spu_muteChannels[i] && actuallyMix, SPU, chan);
}
// convert from 32-bit->16-bit
if(actuallyMix)
for (i = 0; i < length*2; i++)
for (int i = 0; i < length*2; i++)
{
// Apply Master Volume
SPU->sndbuf[i] = spumuldiv7(SPU->sndbuf[i], vol);