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

committed by
Johannes Pohl

parent
862f08da9f
commit
a7808cfec3
@ -34,12 +34,6 @@ static constexpr auto LOG_TAG = "LibrespotStream";
|
||||
|
||||
LibrespotStream::LibrespotStream(PcmListener* pcmListener, boost::asio::io_context& ioc, const StreamUri& uri) : ProcessStream(pcmListener, ioc, uri)
|
||||
{
|
||||
sampleFormat_ = SampleFormat("44100:16:2");
|
||||
uri_.query["sampleformat"] = sampleFormat_.getFormat();
|
||||
// chunk is created in PcmStream ctor, using the (possibly wrongly) configured sample format
|
||||
// we have to recreate it using spotify's native sample format
|
||||
chunk_ = std::make_unique<msg::PcmChunk>(sampleFormat_, chunk_ms_);
|
||||
|
||||
wd_timeout_sec_ = cpt::stoul(uri_.getQuery("wd_timeout", "7800")); ///< 130min
|
||||
|
||||
string username = uri_.getQuery("username", "");
|
||||
|
Reference in New Issue
Block a user