From b9d69f88437ece15e6662fc6091c69e9a9aa0ede Mon Sep 17 00:00:00 2001 From: Michał Cichoń Date: Tue, 25 Aug 2015 18:29:42 +0200 Subject: Finish playback to prevent echo of previous song when opening new stream. --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.c') 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", -- cgit v1.2.3