From d7a41b5076bae20ae01cda4b71be8632b0125e0e Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 21 Jan 2014 17:25:46 +0000 Subject: [PATCH] some fixes for Android --- android/sound.cpp | 5 +---- src/client.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/android/sound.cpp b/android/sound.cpp index 4a26cf5d..f0869c89 100644 --- a/android/sound.cpp +++ b/android/sound.cpp @@ -219,10 +219,7 @@ int CSound::Init ( const int iNewPrefMonoBufferSize ) CSoundBase::Init ( iOpenSLBufferSizeMono ); // set internal buffer size value and calculate stereo buffer size - -// TODO: somehow if the following line is enabled, we get a crash... - -// iOpenSLBufferSizeStereo = 2 * iOpenSLBufferSizeMono; + iOpenSLBufferSizeStereo = 2 * iOpenSLBufferSizeMono; // create memory for intermediate audio buffer vecsTmpAudioSndCrdStereo.Init ( iOpenSLBufferSizeStereo ); diff --git a/src/client.h b/src/client.h index c815fb1e..d28cef9e 100755 --- a/src/client.h +++ b/src/client.h @@ -46,10 +46,14 @@ # if defined ( __APPLE__ ) || defined ( __MACOSX ) # include "../mac/sound.h" # else -# include "../linux/sound.h" -# include -# include -# include +# ifdef ANDROID +# include "../android/sound.h" +# else +# include "../linux/sound.h" +# include +# include +# include +# endif # endif # endif #endif