diff --git a/desmume/src/metaspu/SndOut.h b/desmume/src/metaspu/SndOut.h index 6b71bcda5..d897be199 100644 --- a/desmume/src/metaspu/SndOut.h +++ b/desmume/src/metaspu/SndOut.h @@ -83,7 +83,7 @@ static const int SndOutVolumeShift = 0; ////static const int SampleRate = 48000; //static const int SampleRate = 44100; //edit - nitsuja: make it use the global sample rate define -#include "..\SPU.h" +#include "../SPU.h" static const int SampleRate = DESMUME_SAMPLE_RATE; extern int FindOutputModuleById( const wchar_t* omodid ); diff --git a/desmume/src/metaspu/Timestretcher.cpp b/desmume/src/metaspu/Timestretcher.cpp index 46cfe13dc..967c31d0e 100644 --- a/desmume/src/metaspu/Timestretcher.cpp +++ b/desmume/src/metaspu/Timestretcher.cpp @@ -18,12 +18,18 @@ //#include "Global.h" #include #include "types.h" -#include "SoundTouch/SoundTouch.h" #include "SndOut.h" //#include "SoundTouch/WavFile.h" -#include "win32/Dialogs.h" +#ifdef HAVE_LIBSOUNDTOUCH +#include +#else +#include "SoundTouch/SoundTouch.h" +#endif +#ifdef _WINDOWS +#include "win32/Dialogs.h" +#endif static soundtouch::SoundTouch* pSoundTouch = NULL; @@ -313,7 +319,9 @@ void SndBuffer::soundtouchInit() pSoundTouch->setSetting( SETTING_USE_QUICKSEEK, 0 ); pSoundTouch->setSetting( SETTING_USE_AA_FILTER, 0 ); +#ifdef _WINDOWS SoundtouchCfg::ApplySettings( *pSoundTouch ); +#endif pSoundTouch->setTempo(1); diff --git a/desmume/src/metaspu/metaspu.cpp b/desmume/src/metaspu/metaspu.cpp index 2454a2fd4..e82884d51 100644 --- a/desmume/src/metaspu/metaspu.cpp +++ b/desmume/src/metaspu/metaspu.cpp @@ -24,8 +24,7 @@ #include //for pcsx2 method -//(havent bothered to get it compiling in gcc yet) -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(HAVE_LIBSOUNDTOUCH) #include "SndOut.h" #endif @@ -466,7 +465,7 @@ private: }; //NitsujaSynchronizer -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(HAVE_LIBSOUNDTOUCH) class PCSX2Synchronizer : public ISynchronizingAudioBuffer { public: @@ -513,9 +512,9 @@ ISynchronizingAudioBuffer* metaspu_construct(ESynchMethod method) { case ESynchMethod_N: return new NitsujaSynchronizer(); case ESynchMethod_Z: return new ZeromusSynchronizer(); - #ifdef _MSC_VER +#if defined(_MSC_VER) || defined(HAVE_LIBSOUNDTOUCH) case ESynchMethod_P: return new PCSX2Synchronizer(); - #endif +#endif default: return NULL; } }