-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wav playback broken? #15
Comments
Broke between the Nov 24, 2009 checkpoint and the Mar 29, 2010 checkpoint. |
I am having this exact same problem -- MP3's play, but WAV's cause the app to crash. I am working through the code in the debugger but cannot yet figure out why AudioQueueEnqueueBuffer returns -50 as an error on line 1372 of AudioStreamer.m. Anyone have any suggestions? Here's where err comes back as -50:
|
I did come up with a fix for this problem. If I recall correctly it had something to do with how VBR vs non-VBR streams are handled. Give me a chance to look at my changes and I will post later in the day. |
Wow, thank you so much for your speedy response. Looking forward to the fix. I found a version of AudioStreamer that DOES in fact play WAV files (it's an older version of your code, without your other improvements). I stepped through the code for both and am completely baffled why one works and the other doesn't, because they both appear to be calling into the audio framework in exactly the same way. I really appreciate your help and your work -- thank you. |
I forked the repository and committed my changes. You can find them in the 'isalkind' branch. Only touched the AudioStreamer.h & AudioStreamer.m files. Certain calculations assumed VBR. These changes try to detect when something is non-VBR (CBR) and make calculations appropriately. Although the changes should work for other non-VBR streams, I have only tested them specifically with wav streams. Your millage may vary. |
Great fix, life is good. Thank you very, very much. |
Faced the same issue and used fixed version of the streamer provided by isalkind. Wav streaming works great now. Thanks isalkind!! |
With the latest iteration (Mac or iPhone), wav playback terminates with EXC_BAD_ACCESS.
The following appears in the debugger console preceding the termination: "Queueing of audio buffer failed. err: ˇˇˇŒ -50"
I have an older version with an AudioStreamer.m dated March 10, 2010 that plays back wav just fine.
I'll search for a resolution as time permits, but streaming audio is not my forte.
The text was updated successfully, but these errors were encountered: