mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
Switch to PortAudio for audio playback
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
#include "../session.hpp"
|
||||
#include "renderers/renderer.h"
|
||||
|
||||
#ifdef HAVE_PORTAUDIO
|
||||
#include "renderers/portaudiorenderer.h"
|
||||
#else
|
||||
#include "renderers/sdl.h"
|
||||
#endif
|
||||
|
||||
#include <Limelight.h>
|
||||
|
||||
IAudioRenderer* Session::createAudioRenderer()
|
||||
{
|
||||
#ifdef HAVE_PORTAUDIO
|
||||
return new PortAudioRenderer();
|
||||
#else
|
||||
return new SdlAudioRenderer();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Session::testAudio(int audioConfiguration)
|
||||
|
||||
@@ -164,7 +164,7 @@ int PortAudioRenderer::detectAudioConfiguration()
|
||||
}
|
||||
}
|
||||
|
||||
int PortAudioRenderer::paStreamCallback(const void*, void* output, unsigned long frameCount, const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags statusFlags, void* userData)
|
||||
int PortAudioRenderer::paStreamCallback(const void*, void* output, unsigned long frameCount, const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags, void* userData)
|
||||
{
|
||||
auto me = reinterpret_cast<PortAudioRenderer*>(userData);
|
||||
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
#include "renderer.h"
|
||||
#include <SDL.h>
|
||||
|
||||
#ifndef HAVE_SLVIDEO
|
||||
#error SDL audio backend is only available for Steam Link
|
||||
#error Please install PortAudio to build for Linux
|
||||
#endif
|
||||
|
||||
class SdlAudioRenderer : public IAudioRenderer
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user