Start PcmStream before connecting to Jack server

Otherwise clients will bail due to a zero-length
PCM format header.
This commit is contained in:
Marcus Weseloh 2024-05-30 15:15:03 +02:00
parent a7627f6c64
commit ffe6287654

View file

@ -153,6 +153,11 @@ void JackStream::start()
{
LOG(TRACE, LOG_TAG) << "JackStream::start()\n";
// Need to start immediately, otherwise client will fail
// due to a zero-length pcm header message
tvEncodedChunk_ = std::chrono::steady_clock::now();
PcmStream::start();
boost::asio::post(strand_, [this] { tryConnect(); });
}