mirror of
https://github.com/badaix/snapcast.git
synced 2025-09-17 01:15:01 +08:00
Overwrite sample format for airplay before ctor is called
This commit is contained in:

committed by
Johannes Pohl

parent
862f08da9f
commit
a7808cfec3
@ -75,10 +75,18 @@ PcmStreamPtr StreamManager::addStream(const std::string& uri)
|
||||
}
|
||||
else if ((streamUri.scheme == "spotify") || (streamUri.scheme == "librespot"))
|
||||
{
|
||||
// Overwrite sample format here instead of inside the constructor, to make sure
|
||||
// that all constructors of all parent classes also use the overwritten sample
|
||||
// format.
|
||||
streamUri.query[kUriSampleFormat] = "44100:16:2";
|
||||
stream = make_shared<LibrespotStream>(pcmListener_, ioc_, streamUri);
|
||||
}
|
||||
else if (streamUri.scheme == "airplay")
|
||||
{
|
||||
// Overwrite sample format here instead of inside the constructor, to make sure
|
||||
// that all constructors of all parent classes also use the overwritten sample
|
||||
// format.
|
||||
streamUri.query[kUriSampleFormat] = "44100:16:2";
|
||||
stream = make_shared<AirplayStream>(pcmListener_, ioc_, streamUri);
|
||||
}
|
||||
else if (streamUri.scheme == "tcp")
|
||||
|
Reference in New Issue
Block a user