aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-05 16:02:47 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-05 16:02:47 +0000
commit09efb14dbbbbcbf1d96bbb0932009ab25e76868a (patch)
tree8dc4ec149eb09324387800a3b6ad8dc52f671dc7 /src/decode.c
parent8b214b7c8c9740836b398c914d982f471b3d985c (diff)
downloadmpd-09efb14dbbbbcbf1d96bbb0932009ab25e76868a.tar.gz
mpd-09efb14dbbbbcbf1d96bbb0932009ab25e76868a.tar.xz
mpd-09efb14dbbbbcbf1d96bbb0932009ab25e76868a.zip
fix crossfading issue with ogg
problem was, ov_read doesn't always fill to CHUNK_SIZE and we were moving chunk on every ov_read, instead now we only dump the buffer when its full git-svn-id: https://svn.musicpd.org/mpd/trunk@206 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/decode.c b/src/decode.c
index b1c0bb012..ce2629f5f 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -345,7 +345,7 @@ void decode() {
else if((cb->begin!=cb->end || cb->wrap) &&
cb->begin!=cb->next)
{
- if(doCrossFade==1 && cb->next>=0 &&
+ if(doCrossFade==1 && cb->next>=0 &&
((cb->next>cb->begin &&
(fadePosition=cb->next-cb->begin)
<=crossFadeChunks) ||
@@ -356,9 +356,9 @@ void decode() {
if(nextChunk<0) {
crossFadeChunks = fadePosition;
}
- nextChunk = cb->begin+crossFadeChunks;
test = cb->end;
if(cb->wrap) test+=buffered_chunks;
+ nextChunk = cb->begin+crossFadeChunks;
if(nextChunk<test) {
if(nextChunk>=buffered_chunks)
{
@@ -390,10 +390,7 @@ void decode() {
{
doCrossFade = -1;
}
- else {
- usleep(10);
- continue;
- }
+ else continue;
}
}
pc->elapsedTime = cb->times[cb->begin];