From 59a8ea41ab8509cc39844965895145b701cc1715 Mon Sep 17 00:00:00 2001 From: riccardom Date: Tue, 16 Mar 2010 14:43:26 +0000 Subject: [PATCH] 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. --- desmume/src/wx/wxMain.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/desmume/src/wx/wxMain.cpp b/desmume/src/wx/wxMain.cpp index 8d3885dae..2fd3745f1 100644 --- a/desmume/src/wx/wxMain.cpp +++ b/desmume/src/wx/wxMain.cpp @@ -199,8 +199,10 @@ public: Refresh(false); event.RequestMore(); applyInput(); - if(execute) + if(execute) { NDS_exec(); + SPU_Emulate_user(); + }; osd->update(); DrawHUD(); osd->clear(); @@ -208,7 +210,13 @@ public: } 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();} @@ -467,6 +475,9 @@ void DesmumeFrame::NDSInitialize() { #else NDS_Init(); #endif +#ifndef WIN32 + SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4); +#endif } bool Desmume::OnInit()