Add audio to wxfrontend on !win32

I've verified that calling the SPU_* functions without
SPU_ChangeSoundCore() does not harm here.

Based on patch #3 by yar-tour in #2969484.
This commit is contained in:
riccardom 2010-03-16 14:43:26 +00:00
parent ea6222a941
commit 59a8ea41ab
1 changed files with 13 additions and 2 deletions

View File

@ -199,8 +199,10 @@ public:
Refresh(false); Refresh(false);
event.RequestMore(); event.RequestMore();
applyInput(); applyInput();
if(execute) if(execute) {
NDS_exec<false>(); NDS_exec<false>();
SPU_Emulate_user();
};
osd->update(); osd->update();
DrawHUD(); DrawHUD();
osd->clear(); osd->clear();
@ -208,7 +210,13 @@ public:
} }
void pause(wxCommandEvent& event){ void pause(wxCommandEvent& event){
execute ? execute=false : execute=true; if (execute) {
execute=false;
SPU_Pause(1);
} else {
execute=true;
SPU_Pause(0);
}
} }
void reset(wxCommandEvent& event){NDS_Reset();} void reset(wxCommandEvent& event){NDS_Reset();}
@ -467,6 +475,9 @@ void DesmumeFrame::NDSInitialize() {
#else #else
NDS_Init(); NDS_Init();
#endif #endif
#ifndef WIN32
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
#endif
} }
bool Desmume::OnInit() bool Desmume::OnInit()