Re: Question about the AudioConverterFillComplexBuffer callback function
Re: Question about the AudioConverterFillComplexBuffer callback function
- Subject: Re: Question about the AudioConverterFillComplexBuffer callback function
- From: James McCartney <email@hidden>
- Date: Mon, 10 May 2010 10:46:22 -0700
On May 9, 2010, at 8:58 AM, Fredrik wrote:
> Hi,
>
> I need to convert data from a input file and are looking at the AudioConverterFillComplexBuffer function and have some questions about the callback function needed as arg 3.
The inInputDataProcUserData pointer can point to absolutely anything you want.
> I have been looking at the new example code, FileConverter and noticed that the callback does reading directly from the file. In my case I have already read from my file into a buffer. Is it possible to just supply the buffer to the callback function instead?
You would put the buffer pointer into the AudioBufferList.
outOutputData->mBuffers[0].mData = myPointer;
outOutputData->mBuffers[0].mDataByteSize = .. the size in bytes of the data pointed to by myPointer ..
ioOutputDataPacketSize = .. number of packets (or frames of LPCM) of audio pointed to by myPointer.
>
> I also noticed that the struct passed to the example callback function contains a AudioStreamBasicDescription is it possible to do this without it, since I have created a converter with this as arguments?
The inInputDataProcUserData pointer can point to absolutely anything you want.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden