Switch to PortAudio for audio playback
This commit is contained in:
parent
2cd4851601
commit
71b625081a
6 changed files with 41 additions and 10 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue