summaryrefslogtreecommitdiff
path: root/plugins/alsa
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-28 20:22:24 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-28 20:22:24 +0100
commit23c10b5e92ea40676cdbf16d787978a9b765736b (patch)
tree92e71c7cfff10f3f9b026dcf56d1ac7773ab7a5c /plugins/alsa
parent2cca855821c37748e43826767e28bdce170ba486 (diff)
fixed regression in alsa.freeonstop handler
Diffstat (limited to 'plugins/alsa')
-rw-r--r--plugins/alsa/alsa.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c
index ca6b4e4d..0e127464 100644
--- a/plugins/alsa/alsa.c
+++ b/plugins/alsa/alsa.c
@@ -339,7 +339,6 @@ int
palsa_free (void) {
trace ("palsa_free\n");
if (audio && !alsa_terminate) {
- palsa_stop ();
deadbeef->mutex_lock (mutex);
alsa_terminate = 1;
deadbeef->mutex_unlock (mutex);
@@ -417,21 +416,19 @@ palsa_stop (void) {
return 0;
}
state = OUTPUT_STATE_STOPPED;
- if (deadbeef->conf_get_int ("alsa.freeonstop", 0)) {
- palsa_free ();
- }
- else {
- deadbeef->mutex_lock (mutex);
- snd_pcm_drop (audio);
+ deadbeef->mutex_lock (mutex);
+ snd_pcm_drop (audio);
#if 0
- if (pcm_callback) {
- snd_async_del_handler (pcm_callback);
- pcm_callback = NULL;
- }
-#endif
- deadbeef->mutex_unlock (mutex);
+ if (pcm_callback) {
+ snd_async_del_handler (pcm_callback);
+ pcm_callback = NULL;
}
+#endif
+ deadbeef->mutex_unlock (mutex);
deadbeef->streamer_reset (1);
+ if (deadbeef->conf_get_int ("alsa.freeonstop", 0)) {
+ palsa_free ();
+ }
return 0;
}