diff options
author | edward-p <micro.fedora@gmail.com> | 2018-09-15 13:57:39 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-09-15 14:01:05 +0200 |
commit | bbbdd99fdaacfe0a3c9a1237fa0d086907c1286f (patch) | |
tree | 0445df2e4d243e0f4f51a9a6e3658bf0335040df /src/ui_act.c | |
parent | cf82c5eba208ddc327f7620d1961c9c719c4e13c (diff) | |
download | pianobar-bbbdd99fdaacfe0a3c9a1237fa0d086907c1286f.tar.gz pianobar-bbbdd99fdaacfe0a3c9a1237fa0d086907c1286f.tar.bz2 pianobar-bbbdd99fdaacfe0a3c9a1237fa0d086907c1286f.zip |
Implement audio buffering
Prevent stuttering on low-power devices like Android phones by moving
playback to its own thread and decoupling it from decoding through a
reasonably sized buffer.
Fixes #665.
Diffstat (limited to 'src/ui_act.c')
-rw-r--r-- | src/ui_act.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui_act.c b/src/ui_act.c index eeb6fa6..ba340c1 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -57,6 +57,9 @@ static inline void BarUiDoSkipSong (player_t * const player) { player->doPause = false; pthread_cond_broadcast (&player->cond); pthread_mutex_unlock (&player->lock); + pthread_mutex_lock (&player->aoplayLock); + pthread_cond_broadcast (&player->aoplayCond); + pthread_mutex_unlock (&player->aoplayLock); } /* transform station if necessary to allow changes like rename, rate, ... @@ -881,4 +884,3 @@ BarUiActCallback(BarUiActManageStation) { PianoDestroyStationInfo (&reqData.info); } - |