aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer_config_init.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-08-23 15:52:44 -0700
committerEric Wong <normalperson@yhbt.net>2008-08-23 15:52:44 -0700
commit5655d2e5922955763455134814035e7ad76d2529 (patch)
tree020cc15899b30596a4d8477a120d50cf536293a8 /src/outputBuffer_config_init.h
parentd822bdec0700b94d83f2e15c2aa6602307179724 (diff)
downloadmpd-5655d2e5922955763455134814035e7ad76d2529.tar.gz
mpd-5655d2e5922955763455134814035e7ad76d2529.tar.xz
mpd-5655d2e5922955763455134814035e7ad76d2529.zip
outputBuffer: fix buffer_before_play handling
buffer_before_play is a prebuffer; always respecting it is almost as good as having no buffer at all. So we only respect it when we haven't played anything. Bugs that were a side effect of this also got fixed: The player would not stop when we got to the end of the last song on non-repeating playlists. The playlist would continuously show the song in the last few seconds of playback, and never move. Having crossfade enabled would also amplify the above effect. So, as a side effect, crossfade now correctly handles end-of-playlist conditions, as well. It will fade out to silence when we're at the end of a playlist.
Diffstat (limited to '')
-rw-r--r--src/outputBuffer_config_init.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/outputBuffer_config_init.h b/src/outputBuffer_config_init.h
index ba5b7f137..7461c4d73 100644
--- a/src/outputBuffer_config_init.h
+++ b/src/outputBuffer_config_init.h
@@ -59,7 +59,7 @@ void config_output_buffer(void)
buffered_before_play = (perc / 100) * buffered_chunks;
if (buffered_before_play > buffered_chunks)
buffered_before_play = buffered_chunks;
- ob.nr_bpp = buffered_before_play;
+ ob.bpp_max = buffered_before_play;
assert(buffered_chunks > 0 && !ob.index && !ob.chunks);
ob.index = ringbuf_create(buffered_chunks);