diff options
author | Themaister <maister@archlinux.us> | 2010-05-14 05:30:14 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-05-14 21:58:34 +0200 |
commit | a0099b998c6c8c546b7c5e72258f8eec2bfd0150 (patch) | |
tree | e87004475c588140beedee0553c01c2f2e6313cd /plugins/oss | |
parent | cab00d8a839d55fe70c6b02bf321989b17590c9c (diff) |
OSS plugin does not shut down the audio stream on a pause or stop.
This causes annoying latency when changing a song, or pausing, etc.
This fix should make sure that it is done.
Diffstat (limited to 'plugins/oss')
-rw-r--r-- | plugins/oss/oss.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/oss/oss.c b/plugins/oss/oss.c index c98a9f83..ee0ca8aa 100644 --- a/plugins/oss/oss.c +++ b/plugins/oss/oss.c @@ -185,7 +185,7 @@ static int oss_stop (void) { state = OUTPUT_STATE_STOPPED; deadbeef->streamer_reset (1); - return 0; + return oss_free(); } static int @@ -195,14 +195,21 @@ oss_pause (void) { } // set pause state state = OUTPUT_STATE_PAUSED; - return 0; + return oss_free(); } static int oss_unpause (void) { // unset pause state if (state == OUTPUT_STATE_PAUSED) { - state = OUTPUT_STATE_PLAYING; + + if (!oss_tid) { + if(oss_init() < 0) { + return -1; + } + } + + state = OUTPUT_STATE_PLAYING; } return 0; } |