summaryrefslogtreecommitdiff
path: root/plugins.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-26 21:21:26 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-26 21:21:26 +0100
commit7262368b6897b41188f0cf6844ca875027d425a4 (patch)
treed1c1050014f7f2ac0c7238f03d27b17873a3f003 /plugins.c
parent90877724d03c71111c2b47fd6ea6eb3ebce88dd4 (diff)
fixed samplerate switching bugs in streamer
better sound configuration multiple fixes to ALSA and streamer
Diffstat (limited to 'plugins.c')
-rw-r--r--plugins.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins.c b/plugins.c
index d7a0dd45..f37aec32 100644
--- a/plugins.c
+++ b/plugins.c
@@ -740,9 +740,16 @@ plug_reinit_sound (void) {
fprintf (stderr, "failed to select output plugin %s\nreverted to %s\n", outplugname, prev->plugin.name);
output_plugin = prev;
}
- p_init ();
+ streamer_reset (1);
+ if (p_init () < 0) {
+ streamer_set_nextsong (-2, 0);
+ return;
+ }
if (state != OUTPUT_STATE_PAUSED && state != OUTPUT_STATE_STOPPED) {
- p_play ();
+ if (p_play () < 0) {
+ fprintf (stderr, "failed to reinit sound output\n");
+ streamer_set_nextsong (-2, 0);
+ }
}
}