| Log In | Not a Member? |
Contact ADC
|
|
ADC Home > Reference Library > Technical Q&As > Audio > Core Audio >
|
|
Q: When using AudioConverterFillComplexBuffer to convert data, what should I do when I am running out of data? A: There will be three cases when you are running out of data. 1. End of stream. Inside your input procedure, you must set the total amount of packets read and the sizes of the data in the 2. Some data available from the input stream, but not enough to satisfy the input request. If data was being streamed in real time, there can be a situation where there is not enough data to be processed that meets the amount of data requested in your callback. In this case, you should return noErr and the amount of packets processed from your input callback. Your input callback will be called again for the remaining packets. 3. No data currently availible If there is no data currently available from the input stream, but data remains to be converted, set ioNumberDataPackets to zero and return an error (any non-zero value). The error will be propagated back to the caller. If any data was converted, that will also be returned to the caller.
Look in the header file [Apr 19, 2004] |
|