diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-05-18 19:32:05 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-05-18 19:32:05 +0000 |
commit | a19a79227c8d7c6bc1ad0606c31657602ca23a85 (patch) | |
tree | 9be0bc43581a0c02cea03f69d6d055f612aae370 /src/decode.c | |
parent | a2b6583db6da3e044f3718f660c7f9a1adf2bb10 (diff) | |
download | mpd-a19a79227c8d7c6bc1ad0606c31657602ca23a85.tar.gz mpd-a19a79227c8d7c6bc1ad0606c31657602ca23a85.tar.xz mpd-a19a79227c8d7c6bc1ad0606c31657602ca23a85.zip |
streaming fixes and such, now it seems to work good, what an annoying bug
to find
git-svn-id: https://svn.musicpd.org/mpd/trunk@1066 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/decode.c')
-rw-r--r-- | src/decode.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/decode.c b/src/decode.c index 49babb31f..3ab15d00b 100644 --- a/src/decode.c +++ b/src/decode.c @@ -234,13 +234,13 @@ void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl * dc) { switch(pc->decodeType) { case DECODE_TYPE_URL: #ifdef HAVE_MAD - if(pc->fileSuffix == DECODE_SUFFIX_MP3 || (inStream.mime && - 0 == strcmp(inStream.mime, "audio/mpeg"))) + /*if(pc->fileSuffix == DECODE_SUFFIX_MP3 || (inStream.mime && + 0 == strcmp(inStream.mime, "audio/mpeg")))*/ { ret = mp3_decode(cb,dc,&inStream); break; } - else ret = DECODE_ERROR_UNKTYPE; + /*else ret = DECODE_ERROR_UNKTYPE;*/ #endif case DECODE_TYPE_FILE: #ifdef HAVE_MAD @@ -374,6 +374,9 @@ void decode() { int fadePosition; int nextChunk = -1; int test; + char silence[CHUNK_SIZE]; + + memset(silence,0,CHUNK_SIZE); if(waitOnDecode(pc,dc,cb)<0) return; @@ -533,7 +536,11 @@ void decode() { quit = 1; break; } - else my_usleep(1000); + else { + if(playAudio(silence, CHUNK_SIZE) < 0) { + quit = 1; + } + } } pc->totalPlayTime+= pc->elapsedTime-pc->beginTime; \ |