8#ifndef META_OCEAN_MEDIA_ANDROID_A_LIVE_AUDIO_H
9#define META_OCEAN_MEDIA_ANDROID_A_LIVE_AUDIO_H
18#include <SLES/OpenSLES.h>
19#include <SLES/OpenSLES_Android.h>
41 friend class ALiveVideoManager;
46 static constexpr SLuint32 numberBuffers_ = 2u;
64 static constexpr size_t stereoChunkSize();
95 bool addSamples(
const SampleType sampleType,
const void* data,
const size_t size, SLAndroidSimpleBufferQueueItf bufferQueueInterface);
101 inline bool needNewSamples()
const;
125 size_t positionInFillingChunk_ =
size_t(0);
224 explicit ALiveAudio(
const SLEngineItf& slEngineInterface,
const std::string& url);
269 SLObjectItf slPlayer_ =
nullptr;
272 SLPlayItf slPlayInterface_ =
nullptr;
275 SLAndroidSimpleBufferQueueItf slBufferQueueInterface_ =
nullptr;
278 SLObjectItf slOutputMix_ =
nullptr;
281 SLVolumeItf slVolumeInterface_ =
nullptr;
287 size_t remainingManuallyEnqueuedChunks_ = numberBuffers_;
290 std::atomic<bool> hasBeenStopped_ =
true;
295 constexpr size_t samplesPerSecondMono = 48000;
296 constexpr size_t samplesPerSecondStereo = samplesPerSecondMono * 2;
298 return samplesPerSecondStereo / 50;
305 return pendingStereoChunks_.empty();
This class implements a recursive lock object.
Definition Lock.h:31
This class implements a scoped lock object for recursive lock objects.
Definition Lock.h:135
This class implements a timestamp.
Definition Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15