summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichał Cichoń <michcic@gmail.com>2015-08-25 18:29:42 +0200
committerMichał Cichoń <michcic@gmail.com>2015-08-25 18:29:42 +0200
commitb9d69f88437ece15e6662fc6091c69e9a9aa0ede (patch)
treef56e0186e31ed383802eeec35973dfbe3ab703fb /src
parent1e7c49969628dcd42d937d194359d11fc74ee650 (diff)
downloadpianobar-windows-b9d69f88437ece15e6662fc6091c69e9a9aa0ede.tar.gz
pianobar-windows-b9d69f88437ece15e6662fc6091c69e9a9aa0ede.tar.bz2
pianobar-windows-b9d69f88437ece15e6662fc6091c69e9a9aa0ede.zip
Finish playback to prevent echo of previous song when opening new stream.
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 4800d2d..4569de8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -225,8 +225,9 @@ static void BarMainStartPlayback (BarApp_t *app) {
strncmp (curSong->audioUrl, httpPrefix, strlen (httpPrefix)) != 0) {
BarUiMsg (&app->settings, MSG_ERR, "Invalid song url.\n");
} else {
- BarPlayer2Open(app->player, curSong->audioUrl);
+ BarPlayer2Finish(app->player);
BarPlayer2SetGain(app->player, curSong->fileGain);
+ BarPlayer2Open(app->player, curSong->audioUrl);
/* throw event */
BarUiStartEventCmd (&app->settings, "songstart",