• 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: Audio buffers in user-land audio driver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio buffers in user-land audio driver


  • Subject: Re: Audio buffers in user-land audio driver
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 21 Mar 2008 14:07:57 -0700

The SampleHardwarePlugIn code supports multiple IOProcs where each IOProc has it's own set of output buffers. So to access the output buffers after they have been filled by the IOProcs, you need to iterate through the IOProcs in mIOProcList using HP_IOProcList::GetNumberIOProcs() and HP_IOProcList::GetIOProcByIndex() and retrieve the buffers individually for each IOProc for processing using HP_IOProc::GetAudioBufferList().

That said, you can also achieve this by doing the work in the SHP_Device::PreProcessOutputData() method. This method is called as soon as the IOProc in question returns, so you'll see the data for each IOProc one at a time as opposed to getting them all at once in the SHP_Device:: WriteOututData() method.

On Mar 21, 2008, at 1:56 PM, Dave Addey wrote:
First up, many thanks to Jeff for the SampleHardwarePlugin example code.  Like others on this list recently, I’m looking to create a device driver based on the example code.  It’s making a lot of sense, but in trying to use it I think I’m missing something fairly fundamental about how the audio buffers are stored and passed around.

I’m not too familiar with IOProc operations, and I can’t see how I might access the contents of the output audio buffer in the WriteOutputData stage of the IO cycle defined in CallIOProcs.  Is this the correct stage to be doing so, and if so, how would I retrieve the buffer?  Apologies if this is a dumb question, but since the sample code obviously doesn’t do anything at this stage, I’m a little stumped.



-- 

Jeff Moore
Core Audio
Apple


 _______________________________________________
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

References: 
 >Audio buffers in user-land audio driver (From: Dave Addey <email@hidden>)

  • Prev by Date: Audio buffers in user-land audio driver
  • Next by Date: Re: AUEventListener sending incorrect parameter changes?
  • Previous by thread: Audio buffers in user-land audio driver
  • Next by thread: audio device plug/unplug
  • Index(es):
    • Date
    • Thread