Codebase list squeezelite / a544171
fix crash in vorbis when skipping with resampling fix handling of decode complete/error to ensure stream is closed Adrian Smith 10 years ago
3 changed file(s) with 29 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
6363 - bug fixes for dsf playback, for status progress on windows using wdm-ks output, and to avoid 100% cpu
6464 - change some logging levels for slimproto to aid readability
6565
66 Version 1.6
67 ===========
66 Version 1.6 23/3/14
67 ===================
6868
6969 Minor changes
7070 - add support for direct file playback on windows
7272 - support build on freebsd
7373 - fix gapless playback on portaudio builds
7474 - fix gapless playback for mp3 localfile case with tags at start of file
75
76 Version 1.6.1
77 =============
78
79 Minor changes
80 - fix bug with PA version changing sample rate between tracks
81 - fix crash when skipping in ogg while resampling
82 - fix typo
562562 bool _sendSTMu = false;
563563 bool _sendSTMo = false;
564564 bool _sendSTMn = false;
565 disconnect_code disconnect;
565 bool _stream_disconnect = false;
566 disconnect_code disconnect_code;
566567 static char header[MAX_HEADER];
567568 size_t header_len = 0;
568569 last = now;
574575 status.stream_state = stream.state;
575576
576577 if (stream.state == DISCONNECT) {
577 disconnect = stream.disconnect;
578 disconnect_code = stream.disconnect;
578579 stream.state = STOPPED;
579580 _sendDSCO = true;
580581 }
627628 _sendSTMt = true;
628629 status.last = now;
629630 }
630 if (decode.state == DECODE_COMPLETE) {
631 _sendSTMd = true;
632 decode.state = DECODE_STOPPED;
633 }
634 if (decode.state == DECODE_ERROR) {
635 _sendSTMn = true;
636 decode.state = DECODE_STOPPED;
637 }
638631 if ((status.stream_state == STREAMING_HTTP || status.stream_state == STREAMING_FILE) && !sentSTMl
639632 && decode.state == DECODE_STOPPED) {
640633 if (autostart == 0) {
650643 }
651644 // autostart 2 and 3 require cont to be received first
652645 }
646 if (decode.state == DECODE_COMPLETE || decode.state == DECODE_ERROR) {
647 if (decode.state == DECODE_COMPLETE) _sendSTMd = true;
648 if (decode.state == DECODE_ERROR) _sendSTMn = true;
649 decode.state = DECODE_STOPPED;
650 if (status.stream_state == STREAMING_HTTP || status.stream_state == STREAMING_FILE) {
651 _stream_disconnect = true;
652 }
653 }
653654 UNLOCK_D;
654655
656 if (_stream_disconnect) stream_disconnect();
657
655658 // send packets once locks released as packet sending can block
656 if (_sendDSCO) sendDSCO(disconnect);
659 if (_sendDSCO) sendDSCO(disconnect_code);
657660 if (_sendSTMs) sendSTAT("STMs", 0);
658661 if (_sendSTMd) sendSTAT("STMd", 0);
659662 if (_sendSTMt) sendSTAT("STMt", 0);
228228 UNLOCK_O_direct;
229229 UNLOCK_S;
230230 return DECODE_COMPLETE;
231
232 } else if (n == OV_HOLE) {
233
234 // recoverable hole in stream, seen when skipping
235 LOG_DEBUG("hole in stream");
231236
232237 } else {
233238