Android: Add OpenSL ES audio backend

This commit is contained in:
Connor McLaughlin
2020-10-13 23:11:28 +10:00
parent 82f00237af
commit 962f3407b4
10 changed files with 290 additions and 7 deletions

View File

@ -20,6 +20,10 @@
#include <imgui.h>
Log_SetChannel(AndroidHostInterface);
#ifdef USE_OPENSLES
#include "opensles_audio_stream.h"
#endif
static JavaVM* s_jvm;
static jclass s_AndroidHostInterface_class;
static jmethodID s_AndroidHostInterface_constructor;
@ -394,6 +398,16 @@ void AndroidHostInterface::ReleaseHostDisplay()
m_display.reset();
}
std::unique_ptr<AudioStream> AndroidHostInterface::CreateAudioStream(AudioBackend backend)
{
#ifdef USE_OPENSLES
if (backend == AudioBackend::OpenSLES)
return OpenSLESAudioStream::Create();
#endif
return CommonHostInterface::CreateAudioStream(backend);
}
void AndroidHostInterface::OnSystemDestroyed()
{
CommonHostInterface::OnSystemDestroyed();