2019-03-23 06:08:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "renderer.h"
|
|
|
|
#include <SLAudio.h>
|
|
|
|
|
|
|
|
class SLAudioRenderer : public IAudioRenderer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SLAudioRenderer();
|
|
|
|
|
|
|
|
virtual ~SLAudioRenderer();
|
|
|
|
|
|
|
|
virtual bool prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION* opusConfig);
|
|
|
|
|
2019-05-02 04:27:41 +00:00
|
|
|
virtual void* getAudioBuffer(int* size);
|
|
|
|
|
|
|
|
virtual bool submitAudio(int bytesWritten);
|
2019-03-23 06:08:10 +00:00
|
|
|
|
|
|
|
private:
|
2019-04-28 18:01:54 +00:00
|
|
|
static void slLogCallback(void* context, ESLAudioLog logLevel, const char* message);
|
|
|
|
|
2019-03-23 06:08:10 +00:00
|
|
|
CSLAudioContext* m_AudioContext;
|
|
|
|
CSLAudioStream* m_AudioStream;
|
2019-05-02 05:31:52 +00:00
|
|
|
|
2019-05-12 02:09:59 +00:00
|
|
|
void* m_AudioBuffer;
|
2019-04-28 19:55:04 +00:00
|
|
|
int m_AudioBufferSize;
|
2019-05-12 02:09:59 +00:00
|
|
|
int m_FrameDuration;
|
2019-05-21 06:57:27 +00:00
|
|
|
int m_MaxQueuedAudioMs;
|
2019-03-23 06:08:10 +00:00
|
|
|
};
|