Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPU: Logic re-write, remove spu-advanced toggle #562

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions desmume/src/NDSSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,9 +1422,12 @@ static void execHardware_hblank()

//emulation housekeeping. for some reason we always do this at hblank,
//even though it sounds more reasonable to do it at hstart
SPU_Emulate_core();
driver->AVI_SoundUpdate(SPU_core->outbuf,spu_core_samples);
WAV_WavSoundUpdate(SPU_core->outbuf,spu_core_samples);
int coreSamples = SPU_Emulate_core(355*6); // HLine = 355 dots @ 6c/dot
if(coreSamples)
{
driver->AVI_SoundUpdate(SPU_core->outbuf,coreSamples);
WAV_WavSoundUpdate(SPU_core->outbuf,coreSamples);
}
}

static void execHardware_hstart_vblankEnd()
Expand Down
8 changes: 2 additions & 6 deletions desmume/src/NDSSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ extern struct TCommonSettings
, spuInterpolationMode(2)
, manualBackupType(0)
, autodetectBackupMethod(0)
, spu_muteChannels(0)
, spu_captureMuted(false)
, spu_advanced(true)
, StylusPressure(50)
, ConsoleType(NDS_CONSOLE_TYPE_FAT)
, backupSave(false)
Expand All @@ -543,9 +543,6 @@ extern struct TCommonSettings
strcpy(ARM7BIOS, "biosnds7.bin");
strcpy(ExtFirmwarePath, "firmware.bin");

for(int i=0;i<16;i++)
spu_muteChannels[i] = false;

for(int g=0;g<2;g++)
for(int x=0;x<5;x++)
dispLayers[g][x]=true;
Expand Down Expand Up @@ -652,9 +649,8 @@ extern struct TCommonSettings
int SPU_sync_mode;
int SPU_sync_method;

bool spu_muteChannels[16];
u16 spu_muteChannels;
bool spu_captureMuted;
bool spu_advanced;

struct _ShowGpu {
_ShowGpu() : main(true), sub(true) {}
Expand Down
Loading