mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-17 14:43:09 +00:00
29 lines
613 B
C
29 lines
613 B
C
|
#pragma once
|
||
|
|
||
|
#include "renderer.h"
|
||
|
#include <SDL.h>
|
||
|
|
||
|
class SdlAudioRenderer : public IAudioRenderer
|
||
|
{
|
||
|
public:
|
||
|
SdlAudioRenderer();
|
||
|
|
||
|
virtual ~SdlAudioRenderer();
|
||
|
|
||
|
virtual bool prepareForPlayback(const OPUS_MULTISTREAM_CONFIGURATION* opusConfig);
|
||
|
|
||
|
virtual void submitAudio(short* audioBuffer, int audioSize);
|
||
|
|
||
|
virtual bool testAudio(int audioConfiguration);
|
||
|
|
||
|
virtual int detectAudioConfiguration();
|
||
|
|
||
|
private:
|
||
|
SDL_AudioDeviceID m_AudioDevice;
|
||
|
int m_ChannelCount;
|
||
|
int m_PendingDrops;
|
||
|
int m_PendingHardDrops;
|
||
|
unsigned int m_SampleIndex;
|
||
|
Uint32 m_BaselinePendingData;
|
||
|
};
|