diff --git a/ChangeLog.txt b/ChangeLog.txt index 95e0d89..bd5a7cc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -64,8 +64,8 @@ - bug fixes for dsf playback, for status progress on windows using wdm-ks output, and to avoid 100% cpu - change some logging levels for slimproto to aid readability -Version 1.6 -=========== +Version 1.6 23/3/14 +=================== Minor changes - add support for direct file playback on windows @@ -73,3 +73,11 @@ - support build on freebsd - fix gapless playback on portaudio builds - fix gapless playback for mp3 localfile case with tags at start of file + +Version 1.6.1 +============= + +Minor changes +- fix bug with PA version changing sample rate between tracks +- fix crash when skipping in ogg while resampling +- fix typo diff --git a/slimproto.c b/slimproto.c index 75d8747..b2ffa9d 100644 --- a/slimproto.c +++ b/slimproto.c @@ -563,7 +563,8 @@ bool _sendSTMu = false; bool _sendSTMo = false; bool _sendSTMn = false; - disconnect_code disconnect; + bool _stream_disconnect = false; + disconnect_code disconnect_code; static char header[MAX_HEADER]; size_t header_len = 0; last = now; @@ -575,7 +576,7 @@ status.stream_state = stream.state; if (stream.state == DISCONNECT) { - disconnect = stream.disconnect; + disconnect_code = stream.disconnect; stream.state = STOPPED; _sendDSCO = true; } @@ -628,14 +629,6 @@ _sendSTMt = true; status.last = now; } - if (decode.state == DECODE_COMPLETE) { - _sendSTMd = true; - decode.state = DECODE_STOPPED; - } - if (decode.state == DECODE_ERROR) { - _sendSTMn = true; - decode.state = DECODE_STOPPED; - } if ((status.stream_state == STREAMING_HTTP || status.stream_state == STREAMING_FILE) && !sentSTMl && decode.state == DECODE_STOPPED) { if (autostart == 0) { @@ -651,10 +644,20 @@ } // autostart 2 and 3 require cont to be received first } + if (decode.state == DECODE_COMPLETE || decode.state == DECODE_ERROR) { + if (decode.state == DECODE_COMPLETE) _sendSTMd = true; + if (decode.state == DECODE_ERROR) _sendSTMn = true; + decode.state = DECODE_STOPPED; + if (status.stream_state == STREAMING_HTTP || status.stream_state == STREAMING_FILE) { + _stream_disconnect = true; + } + } UNLOCK_D; + if (_stream_disconnect) stream_disconnect(); + // send packets once locks released as packet sending can block - if (_sendDSCO) sendDSCO(disconnect); + if (_sendDSCO) sendDSCO(disconnect_code); if (_sendSTMs) sendSTAT("STMs", 0); if (_sendSTMd) sendSTAT("STMd", 0); if (_sendSTMt) sendSTAT("STMt", 0); diff --git a/vorbis.c b/vorbis.c index 7d6c6c9..15becf1 100644 --- a/vorbis.c +++ b/vorbis.c @@ -229,6 +229,11 @@ UNLOCK_O_direct; UNLOCK_S; return DECODE_COMPLETE; + + } else if (n == OV_HOLE) { + + // recoverable hole in stream, seen when skipping + LOG_DEBUG("hole in stream"); } else {