Hi,
I am getting into a trap. Please check stack-trace, howto fix this?
regards, Joël
How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here
Hi,
I am getting into a trap. Please check stack-trace, howto fix this?
regards, Joël
Hi Joël,
It's unclear from the stack trace whether the problem is occurring due to something about the audio formats involved, the sizes of the audio frames being converted and written, or due to some internal issue in ExtAudioFile or AudioConverter. Either way, it should not be crashing like that, and we'd appreciate the opportunity to investigate further.
Please file a report via http://feedbackassistant.apple.com so that we can collect more information about the issue and investigate it with the best chance of success.
When filing the report, it would be very helpful to:
Thanks, - rhymu
Hi Joël,
Just to follow up on this issue, I found that the value your code is passing for the inNumberFrames
argument to ExtAudioFileWrite
is actually the number of frames multiplied by the number of channels. It should be only the number of frames; do not multiply this by the number of channels, and you should find that it solves the issue.
The term "frame" is sometimes confusing as it's not always clear whether a "frame" spans all channels or just a single channel. It often depends on the context. However, a good rule of thumb for APIs such as ExtAudioFileWrite
, where a frame count is passed along with an audio buffer list, is that the number of frames multiplied by the mBytesPerFrame
field of the audio stream basic description should equal the mDataByteSize
of the audio buffer.
Thanks, - rhymu