mattgallagher / AudioStreamer

A streaming audio player class (AudioStreamer) for Mac OS X and iPhone.
http://cocoawithlove.com
1.93k stars 553 forks source link

plays large remote mp3 not for more than 600 sec #40

Open pm200107 opened 12 years ago

pm200107 commented 12 years ago

I noticed that for long mp3 files on a server (mine are about 50Mo), the streamer plays well but for not more than 600 seconds. it does not crash, but goes in idle with the message "no output audio data". The detected length when starting playing is correct (about 3350 seconds). when moving the slider where it stopped, it plays again for 600 seconds. The mp3 are 128k encoded. I can provide one if needed.

gilnuy commented 8 years ago

hi, i got the same problem, did you resolve that? debug it comes here:

- (void)handleReadFromStream:(CFReadStreamRef)aStream eventType:(CFStreamEventType)eventType{
.....
            //
            // Read the bytes from the stream
            //
            length = CFReadStreamRead(stream, bytes, kAQDefaultBufSize);

            if (length == -1)
            {
                [self failWithErrorCode:AS_AUDIO_DATA_NOT_FOUND];
                return;
            }
.....
}

sometimes heapped at 6minute,sometimes at 10minute.