buflib/shrink_callback: Resume playback only if it was playing (not paused).

Change-Id: Ie4884ec4554890f8bdb03f48bcf215ece00a5560
This commit is contained in:
Thomas Martitz 2012-03-23 10:48:50 +01:00
parent ced3b172a1
commit 82337dda6a

View file

@ -855,7 +855,8 @@ static int shrink_callback(int handle, unsigned hints, void* start, size_t old_s
/* TODO: Do it without stopping playback, if possible */ /* TODO: Do it without stopping playback, if possible */
long offset = audio_current_track()->offset; long offset = audio_current_track()->offset;
bool playing = (audio_status() & AUDIO_STATUS_PLAY) == AUDIO_STATUS_PLAY; /* resume if playing */
bool playing = (audio_status() == AUDIO_STATUS_PLAY);
/* There's one problem with stoping and resuming: If it happens in a too /* There's one problem with stoping and resuming: If it happens in a too
* frequent fashion, the codecs lose the resume postion and playback * frequent fashion, the codecs lose the resume postion and playback
* begins from the beginning. * begins from the beginning.