mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
audio_core: Only include cubeb if it's available
This commit is contained in:
parent
af73dd45f0
commit
35c43aa293
@ -39,4 +39,5 @@ endif()
|
|||||||
|
|
||||||
if(ENABLE_CUBEB)
|
if(ENABLE_CUBEB)
|
||||||
target_link_libraries(audio_core PRIVATE cubeb)
|
target_link_libraries(audio_core PRIVATE cubeb)
|
||||||
|
add_definitions(-DHAVE_CUBEB=1)
|
||||||
endif()
|
endif()
|
@ -11,14 +11,18 @@
|
|||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
#include "audio_core/sdl2_sink.h"
|
#include "audio_core/sdl2_sink.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_CUBEB
|
||||||
#include "audio_core/cubeb_sink.h"
|
#include "audio_core/cubeb_sink.h"
|
||||||
|
#endif
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
namespace AudioCore {
|
namespace AudioCore {
|
||||||
|
|
||||||
// g_sink_details is ordered in terms of desirability, with the best choice at the top.
|
// g_sink_details is ordered in terms of desirability, with the best choice at the top.
|
||||||
const std::vector<SinkDetails> g_sink_details = {
|
const std::vector<SinkDetails> g_sink_details = {
|
||||||
|
#ifdef HAVE_CUBEB
|
||||||
{"cubeb", []() { return std::make_unique<CubebSink>(); }},
|
{"cubeb", []() { return std::make_unique<CubebSink>(); }},
|
||||||
|
#endif
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
{"sdl2", []() { return std::make_unique<SDL2Sink>(); }},
|
{"sdl2", []() { return std::make_unique<SDL2Sink>(); }},
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user