Add alsa stream source

This commit is contained in:
badaix 2020-08-15 23:01:12 +02:00
parent 8b0e005a02
commit 4d7b73df7d
6 changed files with 355 additions and 6 deletions

View file

@ -18,6 +18,7 @@
#include "stream_manager.hpp"
#include "airplay_stream.hpp"
#include "alsa_stream.hpp"
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"
#include "common/str_compat.hpp"
@ -73,6 +74,10 @@ PcmStreamPtr StreamManager::addStream(const std::string& uri)
{
stream = make_shared<ProcessStream>(pcmListener_, ioc_, streamUri);
}
else if (streamUri.scheme == "alsa")
{
stream = make_shared<AlsaStream>(pcmListener_, ioc_, streamUri);
}
else if ((streamUri.scheme == "spotify") || (streamUri.scheme == "librespot"))
{
// Overwrite sample format here instead of inside the constructor, to make sure