mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-29 17:06:18 +02:00
Reformat code
This commit is contained in:
parent
c07b56816d
commit
c1c521b260
2 changed files with 4 additions and 13 deletions
|
@ -231,7 +231,6 @@ void WASAPIPlayer::worker()
|
|||
CHECK_HR(hr);
|
||||
|
||||
|
||||
|
||||
// Get the control interface for the process-specific audio
|
||||
// session with session GUID = GUID_NULL. This is the session
|
||||
// that an audio stream for a DirectSound, DirectShow, waveOut,
|
||||
|
|
|
@ -232,18 +232,10 @@ void AirplayStream::pipeReadLine()
|
|||
boost::asio::async_read_until(*pipe_fd_, streambuf_pipe_, delimiter, [this, delimiter](const std::error_code& ec, std::size_t bytes_transferred) {
|
||||
if (ec)
|
||||
{
|
||||
if (ec.value() == boost::asio::error::eof)
|
||||
if ((ec.value() == boost::asio::error::eof) || (ec.value() == boost::asio::error::bad_descriptor))
|
||||
{
|
||||
// For some reason, EOF is returned until the first metadata is written to the pipe.
|
||||
// Is this a boost bug?
|
||||
LOG(INFO, LOG_TAG) << "Waiting for metadata, retrying in 2500ms"
|
||||
<< "\n";
|
||||
wait(pipe_open_timer_, 2500ms, [this] { pipeReadLine(); });
|
||||
}
|
||||
if (ec.value() == boost::asio::error::bad_descriptor)
|
||||
{
|
||||
// If shairport-sync has not finished setting up the pipe, bad file descriptor is returned.
|
||||
// retry in a few seconds
|
||||
LOG(INFO, LOG_TAG) << "Waiting for metadata, retrying in 2500ms"
|
||||
<< "\n";
|
||||
wait(pipe_open_timer_, 2500ms, [this] { pipeReadLine(); });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue