From: Mikko Rasa Date: Mon, 3 Aug 2009 12:28:09 +0000 (+0000) Subject: Restart streamer source if it stops automatically X-Git-Tag: 0.10~1 X-Git-Url: http://git.tdb.fi/?p=libs%2Fal.git;a=commitdiff_plain;h=bb3f1a84f09963031a88175c4f44c872d508447b Restart streamer source if it stops automatically --- diff --git a/source/streamer.cpp b/source/streamer.cpp index 99503b9..8fe7483 100644 --- a/source/streamer.cpp +++ b/source/streamer.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspal -Copyright © 2008 Mikko Rasa, Mikkosoft Productions +Copyright © 2008-2009 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -55,6 +55,9 @@ void Streamer::tick() if(!snd) return; + if(src.get_state()!=PLAYING && src.get_state()!=PAUSED) + src.play(); + unsigned freq=snd->get_frequency(); unsigned chunk_size=freq&~0xF; unsigned queued=src.get_buffers_queued();