Fix dry out timer

This commit is contained in:
badaix 2020-01-04 00:54:45 +01:00
parent 6d7e25e9af
commit 37829fea52
3 changed files with 32 additions and 1 deletions

View file

@ -36,6 +36,10 @@ LibrespotStream::LibrespotStream(PcmListener* pcmListener, boost::asio::io_conte
{
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", "");