mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 20:09:50 +01:00
Always flush the spotify socket on Mac.
This commit is contained in:
parent
80b9e5bede
commit
cb211190c7
@ -679,6 +679,11 @@ int SpotifyClient::MusicDeliveryCallback(
|
|||||||
me->byte_rate_ = byte_rate;
|
me->byte_rate_ = byte_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_DARWIN
|
||||||
|
// For some reason, the data doesn't reliably get pushed to the underlying socket on Mac.
|
||||||
|
me->media_socket_->flush();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (me->media_socket_->bytesToWrite() >= 8192) {
|
if (me->media_socket_->bytesToWrite() >= 8192) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -688,11 +693,6 @@ int SpotifyClient::MusicDeliveryCallback(
|
|||||||
reinterpret_cast<const char*>(frames),
|
reinterpret_cast<const char*>(frames),
|
||||||
num_frames * format->channels * 2);
|
num_frames * format->channels * 2);
|
||||||
|
|
||||||
#ifdef Q_OS_DARWIN
|
|
||||||
// ???
|
|
||||||
me->media_socket_->flush();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return bytes_written / (format->channels * 2);
|
return bytes_written / (format->channels * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user