AudioStreamer icon indicating copy to clipboard operation
AudioStreamer copied to clipboard

Problem with some (small?) mp3 files

Open DerFlash opened this issue 15 years ago • 8 comments

Having problems playing some mp3 files.

http://r.nabaztag.com/broad/598/263/369/156674405.mp3 -> "No audio data found."

http://r.nabaztag.com/broad/001/671/701/071/71054035.mp3 -> works fine

When I set kAQBufSize to some higher value, the second one throws the same error.

Lowering kAQBufSize does not help to get the first one playing. Only forces "Audio packets are larger than kAQBufSize." then...

Any ideas? Thx for the great project!

DerFlash avatar Jan 18 '10 23:01 DerFlash

I have the same problem. It appears that it receives a kCFStreamEventEndEncountered, but then just stops the stream instead of letting it finish playing. In addition, the progress field doesn't update after it read the last buffer. Seems the entire state model is lacking.

nfranke avatar May 07 '10 03:05 nfranke

I have the same problem. Ideas, anyone?

UPDATE: mine was a different problem, not related to this...

mayoneez avatar Aug 05 '10 10:08 mayoneez

sorry to pull up a dead list.... But did you guys get a chance to solve this? I'm stuck with the exact same issue.... Any guidance on how to stream short MP3 files??

cranberryred avatar Feb 11 '11 05:02 cranberryred

Experiencing the same issue but not only with a short MP3. The streamer progress doesn't update after a period of time, the streamer falls in AS_STOPPING_EOF.

philchass avatar Sep 13 '11 10:09 philchass

I have the same problem.

holin avatar Feb 09 '12 06:02 holin

This seems to be a race condition. To fix this, I did an ugly hack (not a solution):

After line 1441 (after calling AudioQueueStart), I inserted a [NSThread sleepForTimeInterval:0.5]. It seems to solve the biggest problems although there are still issues with wrong state. I hope this will get properly fixed at some point. I am not familiar with AudioQueues, so I can only offer this quick-fix instead of a real solution.

abless avatar Jun 23 '12 21:06 abless

I encountered the same issue, for small mp3's I got "AudioQueue changed state in unexpected way." & I'm too unfamiliar with AudioQueues. I went through the code, changed kNumAQBufs to 8 & kAQDefaultBufSize to 512 & now the AudioStreamer works well with small files too.

kexoth avatar Dec 03 '12 21:12 kexoth

" changed kNumAQBufs to 8 & kAQDefaultBufSize to 512 " help me solve the issue.Thank you so much.

alanchen1988 avatar Mar 20 '13 04:03 alanchen1988