diff --git a/Source/Project64-audio/AudioMain.cpp b/Source/Project64-audio/AudioMain.cpp index 4f1f2d32e0..10a4ee8325 100644 --- a/Source/Project64-audio/AudioMain.cpp +++ b/Source/Project64-audio/AudioMain.cpp @@ -17,6 +17,7 @@ #include #include #endif +#include #include "audio_1.1.h" #include "Version.h" #include @@ -104,6 +105,8 @@ SLAndroidSimpleBufferQueueItf g_bufferQueue = NULL; bool g_PluginInit = false; +OpenSLESDriver * g_SoundDriver = NULL; + void PluginInit(void) { if (g_PluginInit) @@ -771,7 +774,14 @@ EXPORT void CALL GetDllInfo(PLUGIN_INFO * PluginInfo) EXPORT int32_t CALL InitiateAudio(AUDIO_INFO Audio_Info) { WriteTrace(TraceAudioInterface, TraceDebug, "Start"); + if (g_SoundDriver != NULL) + { + delete g_SoundDriver; + } g_AudioInfo = Audio_Info; +#ifdef ANDROID + g_SoundDriver = new OpenSLESDriver; +#endif WriteTrace(TraceAudioInterface, TraceDebug, "Done (res: true)"); return true; } diff --git a/Source/Project64-audio/Driver/OpenSLES.cpp b/Source/Project64-audio/Driver/OpenSLES.cpp new file mode 100644 index 0000000000..bd996a9841 --- /dev/null +++ b/Source/Project64-audio/Driver/OpenSLES.cpp @@ -0,0 +1,15 @@ +/**************************************************************************** +* * +* Project64-audio - A Nintendo 64 audio plugin. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2017 Project64. All rights reserved. * +* Copyright (C) 2015 Gilles Siberlin * +* Copyright (C) 2007-2009 Richard Goedeken * +* Copyright (C) 2007-2008 Ebenblues * +* Copyright (C) 2003 JttL * +* Copyright (C) 2002 Hacktarux * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ diff --git a/Source/Project64-audio/Driver/OpenSLES.h b/Source/Project64-audio/Driver/OpenSLES.h new file mode 100644 index 0000000000..f3fada15f7 --- /dev/null +++ b/Source/Project64-audio/Driver/OpenSLES.h @@ -0,0 +1,24 @@ +/**************************************************************************** +* * +* Project64-audio - A Nintendo 64 audio plugin. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2017 Project64. All rights reserved. * +* Copyright (C) 2015 Gilles Siberlin * +* Copyright (C) 2007-2009 Richard Goedeken * +* Copyright (C) 2007-2008 Ebenblues * +* Copyright (C) 2003 JttL * +* Copyright (C) 2002 Hacktarux * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ +#pragma once + +#pragma once +#include "SoundBase.h" + +class OpenSLESDriver : + public SoundDriverBase +{ +}; \ No newline at end of file diff --git a/Source/Project64-audio/Driver/SoundBase.cpp b/Source/Project64-audio/Driver/SoundBase.cpp new file mode 100644 index 0000000000..6a793c6c07 --- /dev/null +++ b/Source/Project64-audio/Driver/SoundBase.cpp @@ -0,0 +1,12 @@ +/**************************************************************************** +* * +* Project64-audio - A Nintendo 64 audio plugin. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2017 Project64. All rights reserved. * +* Copyright (C) 2000-2015 Azimer. All rights reserved. * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ +#include "SoundBase.h" diff --git a/Source/Project64-audio/Driver/SoundBase.h b/Source/Project64-audio/Driver/SoundBase.h new file mode 100644 index 0000000000..404a77a817 --- /dev/null +++ b/Source/Project64-audio/Driver/SoundBase.h @@ -0,0 +1,17 @@ +/**************************************************************************** +* * +* Project64-audio - A Nintendo 64 audio plugin. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2017 Project64. All rights reserved. * +* Copyright (C) 2000-2015 Azimer. All rights reserved. * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ +#pragma once + +class SoundDriverBase +{ +public: +}; \ No newline at end of file diff --git a/Source/Project64-audio/Project64-audio.vcxproj b/Source/Project64-audio/Project64-audio.vcxproj index 0bd5e25b05..8e0097bade 100644 --- a/Source/Project64-audio/Project64-audio.vcxproj +++ b/Source/Project64-audio/Project64-audio.vcxproj @@ -38,12 +38,16 @@ + + + + diff --git a/Source/Project64-audio/Project64-audio.vcxproj.filters b/Source/Project64-audio/Project64-audio.vcxproj.filters index 9b17bdfa29..5d726a3d14 100644 --- a/Source/Project64-audio/Project64-audio.vcxproj.filters +++ b/Source/Project64-audio/Project64-audio.vcxproj.filters @@ -13,6 +13,12 @@ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + {a8636856-b6fa-4994-9cf4-13df7c70948e} + + + {32a059b2-0de1-4ec7-b798-75b3e7ed19be} + @@ -24,6 +30,12 @@ Source Files + + Source Files\Driver + + + Source Files\Driver + @@ -44,5 +56,11 @@ Header Files + + Header Files\Driver + + + Header Files\Driver + \ No newline at end of file