diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-06-14 21:38:03 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-06-14 21:38:03 +0200 |
commit | 1d8412ece6a58627b2a6f631c64c49460fe6097b (patch) | |
tree | fcd1a375174776c36551558ce882a3d5bfe8d536 /streamer.c | |
parent | 9eca6a34eab9a38ab3c44f7f4ccd1a6439080a34 (diff) |
switch samplerate when starting new track
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -791,6 +791,9 @@ streamer_start_new_song (void) { avg_bitrate = -1; if (p_state () != OUTPUT_STATE_PLAYING) { streamer_reset (1); + if (fileinfo) { + plug_get_output ()->change_rate (fileinfo->samplerate); + } if (p_play () < 0) { fprintf (stderr, "streamer: failed to start playback; output plugin doesn't work\n"); streamer_set_nextsong (-2, 0); @@ -912,6 +915,9 @@ streamer_thread (void *ctx) { // output plugin may stop playback before switching samplerate if (p_state () != OUTPUT_STATE_PLAYING) { + if (fileinfo) { + plug_get_output ()->change_rate (fileinfo->samplerate); + } if (p_play () < 0) { fprintf (stderr, "streamer: failed to start playback after samplerate change; output plugin doesn't work\n"); streamer_set_nextsong (-2, 0); |