moonlight-qt/app/streaming/audio/renderers/slaud.h

32 lines
670 B
C
Raw Normal View History

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);
virtual void* getAudioBuffer(int* size);
virtual bool submitAudio(int bytesWritten);
2019-03-23 06:08:10 +00:00
virtual int getCapabilities();
2019-03-23 06:08:10 +00:00
private:
static void slLogCallback(void* context, ESLAudioLog logLevel, const char* message);
2019-03-23 06:08:10 +00:00
CSLAudioContext* m_AudioContext;
CSLAudioStream* m_AudioStream;
void* m_AudioBuffer;
int m_AudioBufferSize;
int m_FrameDuration;
2019-05-21 06:57:27 +00:00
int m_MaxQueuedAudioMs;
2019-03-23 06:08:10 +00:00
};