bug fixy poo s/1/0/
and mark in decoderControl if we are seekable git-svn-id: https://svn.musicpd.org/mpd/trunk@1078 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
ec3a9b66fe
commit
c1cd2668b2
@ -114,7 +114,7 @@ int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af) {
|
|||||||
|
|
||||||
#define handleDecodeStart() \
|
#define handleDecodeStart() \
|
||||||
if(decodeWaitedOn && dc->state==DECODE_STATE_DECODE) { \
|
if(decodeWaitedOn && dc->state==DECODE_STATE_DECODE) { \
|
||||||
decodeWaitedOn = 1; \
|
decodeWaitedOn = 0; \
|
||||||
if(openAudioDevice(&(cb->audioFormat))<0) { \
|
if(openAudioDevice(&(cb->audioFormat))<0) { \
|
||||||
strncpy(pc->erroredFile,pc->file,MAXPATHLEN); \
|
strncpy(pc->erroredFile,pc->file,MAXPATHLEN); \
|
||||||
pc->erroredFile[MAXPATHLEN] = '\0'; \
|
pc->erroredFile[MAXPATHLEN] = '\0'; \
|
||||||
@ -127,7 +127,7 @@ int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af) {
|
|||||||
pc->bits = dc->audioFormat.bits; \
|
pc->bits = dc->audioFormat.bits; \
|
||||||
pc->channels = dc->audioFormat.channels; \
|
pc->channels = dc->audioFormat.channels; \
|
||||||
} \
|
} \
|
||||||
else { \
|
else if(decodeWaitedOn) { \
|
||||||
my_usleep(10); \
|
my_usleep(10); \
|
||||||
continue; \
|
continue; \
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#define DECODE_SUFFIX_WAVE 6
|
#define DECODE_SUFFIX_WAVE 6
|
||||||
|
|
||||||
typedef struct _DecoderControl {
|
typedef struct _DecoderControl {
|
||||||
|
volatile mpd_sint8 seekable;
|
||||||
volatile mpd_sint8 state;
|
volatile mpd_sint8 state;
|
||||||
volatile mpd_sint8 stop;
|
volatile mpd_sint8 stop;
|
||||||
volatile mpd_sint8 start;
|
volatile mpd_sint8 start;
|
||||||
|
@ -189,7 +189,7 @@ int fillMp3InputBuffer(mp3DecodeData * data) {
|
|||||||
readSize);
|
readSize);
|
||||||
if(readed <= 0 && inputStreamAtEOF(data->inStream)) return -1;
|
if(readed <= 0 && inputStreamAtEOF(data->inStream)) return -1;
|
||||||
/* sleep for a fraction of a second! */
|
/* sleep for a fraction of a second! */
|
||||||
else if(readed == 0) my_usleep(10);
|
else if(readed <= 0) my_usleep(10000);
|
||||||
|
|
||||||
mad_stream_buffer(&data->stream,data->readBuffer,readed+remaining);
|
mad_stream_buffer(&data->stream,data->readBuffer,readed+remaining);
|
||||||
(data->stream).error = 0;
|
(data->stream).error = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user