audio_core: Implement Sink and SinkStream interfaces with cubeb.

This commit is contained in:
bunnei 2018-07-28 13:44:50 -04:00
parent 9ef227e09d
commit f437c11caf
10 changed files with 269 additions and 6 deletions

View file

@ -8,12 +8,18 @@
#include <vector>
#include "audio_core/null_sink.h"
#include "audio_core/sink_details.h"
#ifdef HAVE_CUBEB
#include "audio_core/cubeb_sink.h"
#endif
#include "common/logging/log.h"
namespace AudioCore {
// g_sink_details is ordered in terms of desirability, with the best choice at the top.
const std::vector<SinkDetails> g_sink_details = {
#ifdef HAVE_CUBEB
SinkDetails{"cubeb", &std::make_unique<CubebSink, std::string>, &ListCubebSinkDevices},
#endif
SinkDetails{"null", &std::make_unique<NullSink, std::string>,
[] { return std::vector<std::string>{"null"}; }},
};