2019-03-22 23:08:10 -07: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-01 21:27:41 -07:00
|
|
|
virtual void* getAudioBuffer(int* size);
|
|
|
|
|
|
|
|
virtual bool submitAudio(int bytesWritten);
|
2019-03-22 23:08:10 -07:00
|
|
|
|
|
|
|
private:
|
2019-04-28 11:01:54 -07:00
|
|
|
static void slLogCallback(void* context, ESLAudioLog logLevel, const char* message);
|
|
|
|
|
2019-03-22 23:08:10 -07:00
|
|
|
CSLAudioContext* m_AudioContext;
|
|
|
|
CSLAudioStream* m_AudioStream;
|
2019-05-01 22:31:52 -07:00
|
|
|
|
|
|
|
char* m_AudioBuffer;
|
2019-04-28 12:55:04 -07:00
|
|
|
int m_AudioBufferSize;
|
2019-05-01 22:31:52 -07:00
|
|
|
int m_AudioBufferBytesFilled;
|
2019-03-22 23:08:10 -07:00
|
|
|
};
|