1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

Always flush the spotify socket on Mac.

This commit is contained in:
John Maguire 2011-11-28 12:17:17 +01:00
parent 80b9e5bede
commit cb211190c7

View File

@ -679,6 +679,11 @@ int SpotifyClient::MusicDeliveryCallback(
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) {
return 0;
}
@ -688,11 +693,6 @@ int SpotifyClient::MusicDeliveryCallback(
reinterpret_cast<const char*>(frames),
num_frames * format->channels * 2);
#ifdef Q_OS_DARWIN
// ???
me->media_socket_->flush();
#endif
return bytes_written / (format->channels * 2);
}