2#if defined(__ANDROID__) && __ANDROID_API__ >= HEPHAUDIO_ANDROID_OPENSL_MIN_API_LEVEL
6#include <SLES/OpenSLES.h>
7#include <SLES/OpenSLES_Android.h>
22 using NativeAudio::InitializeRender;
23 using NativeAudio::InitializeCapture;
26 struct CallbackContext
31 SLuint32 bufferSize_byte;
32 SLuint32 bufferSize_frame;
37 SLObjectItf audioEngineObject;
38 SLEngineItf audioEngine;
39 SLObjectItf outputMixObject;
40 SLObjectItf audioPlayerObject;
41 SLPlayItf audioPlayer;
42 SLVolumeItf masterVolumeObject;
43 SLObjectItf audioRecorderObject;
44 SLRecordItf audioRecorder;
45 CallbackContext renderCallbackContext;
46 CallbackContext captureCallbackContext;
69 static void BufferQueueCallback(SLBufferQueueItf bufferQueue,
void* pContext);
70 static void RecordEventCallback(SLAndroidSimpleBufferQueueItf simpleBufferQueue,
void* pContext);
#define HEPH_API
Definition HephShared.h:132
base class for classes that interact with the Android audio APIs.
Definition AndroidAudioBase.h:21
uses OpenSL ES
Definition AndroidAudioSLES.h:20
void SetNativeParams(const NativeAudioParams &nativeParams) override
double GetMasterVolume() const override
void StopCapturing() override
void InitializeRender(AudioDevice *device, AudioFormatInfo format) override
void SetMasterVolume(double volume) override
void StopRendering() override
void InitializeCapture(AudioDevice *device, AudioFormatInfo format) override
void GetNativeParams(NativeAudioParams &nativeParams) const override
stores information about an audio device.
Definition AudioDevice.h:76
base class for storing the native audio API specific parameters.
Definition NativeAudioParams.h:15
struct for storing the OpenSL ES specific parameters.
Definition OpenSLParams.h:18