AudioConverter: How do I know when I am done?

Q: How do I inform AudioConverter I am done processing data?

A: By returning noErr and 0 packets of data, you are signaling to an Audio Converter object that you are out of data and at the logical end of the stream. Upon getting this message, the Audio Converter object will no longer call the input proc expecting to receive data. To get out of this state, you must call AudioConverterReset.

If you have no data to convert at this time but are not at the logical end of the stream, your input proc should return 0 packets of data along with any non-zero error code. This error will in turn be returned to you by AudioConverterFillComplexBuffer. The next time you call AudioConverterFillComplexBuffer, your input proc will get called again.

Audio Converter objects (of type AudioConverterRef) are built using the interfaces in the AudioConverter.h header file in the Audio Toolbox framework.

References

Back to Top 

Document Revision History

DateNotes
2007-08-23First Version

Posted: 2007-08-23


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.