]> git.tdb.fi Git - libs/al.git/commitdiff
Restart streamer source if it stops automatically
authorMikko Rasa <tdb@tdb.fi>
Mon, 3 Aug 2009 12:28:09 +0000 (12:28 +0000)
committerMikko Rasa <tdb@tdb.fi>
Mon, 3 Aug 2009 12:28:09 +0000 (12:28 +0000)
source/streamer.cpp

index 99503b9b70a013e9a3266dda1e95ba7f56d76e68..8fe7483cc735ffbc5fab4dfa3c8185b35fc5044d 100644 (file)
@@ -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();