mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-16 16:27:59 +00:00
29 lines
634 B
C++
29 lines
634 B
C++
#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);
|
|
|
|
private:
|
|
static void slLogCallback(void* context, ESLAudioLog logLevel, const char* message);
|
|
|
|
CSLAudioContext* m_AudioContext;
|
|
CSLAudioStream* m_AudioStream;
|
|
|
|
void* m_AudioBuffer;
|
|
int m_AudioBufferSize;
|
|
int m_FrameDuration;
|
|
int m_MaxQueuedAudioMs;
|
|
};
|