• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about the AudioConverterFillComplexBuffer callback function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about the AudioConverterFillComplexBuffer callback function


  • Subject: Re: Question about the AudioConverterFillComplexBuffer callback function
  • From: Fredrik <email@hidden>
  • Date: Tue, 11 May 2010 13:02:08 +0200

>
>> 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.
>

Thank you, that's great. In the callback function itself all I have to do is to move packets from the input data buffer to the output buffer and advance the pointer right. How can I find out the ideal or reasonable amount of packets to move in the callback? I saw in the documentation that a small amount will cause the function to be called more frequently.  _______________________________________________
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

  • Follow-Ups:
    • Re: Question about the AudioConverterFillComplexBuffer callback function
      • From: Fredrik <email@hidden>
    • Re: Question about the AudioConverterFillComplexBuffer callback function
      • From: James McCartney <email@hidden>
    • Re: Question about the AudioConverterFillComplexBuffer callback function
      • From: William Stewart <email@hidden>
References: 
 >Question about the AudioConverterFillComplexBuffer callback function (From: Fredrik <email@hidden>)
 >Re: Question about the AudioConverterFillComplexBuffer callback function (From: James McCartney <email@hidden>)

  • Prev by Date: RE: Controller mapping
  • Next by Date: Hardware-assisted MP3 decoding on iPad
  • Previous by thread: Re: Question about the AudioConverterFillComplexBuffer callback function
  • Next by thread: Re: Question about the AudioConverterFillComplexBuffer callback function
  • Index(es):
    • Date
    • Thread