• 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
IO Cycle for Audio Playthrough
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IO Cycle for Audio Playthrough


  • Subject: IO Cycle for Audio Playthrough
  • From: Brad Carleton <email@hidden>
  • Date: Tue, 5 Jan 2010 22:06:18 -0800 (PST)

Hello,

I'm looking to get some advice on how to set up a proper IO cycle for Audio Playthrough using functions and structures associated with the HAL, specifically those located in AudioHardware.h.  Here is the code I have so far.

<code>

{

    AudioDeviceAddIOProc(inputDeviceID, inputProcess, myBufferPointer);

    AudioDeviceAddIOProc(outputDeviceID, outputProcess, myBufferPointer);

    AudioDeviceStart(inputDeviceID, inputProcess);

    AudioDeviceStart(outputDeviceID, outputProcess);

}


OSStatus inputProcess(AudioDeviceID inDevice, const AudioTimeStamp* inNow, const AudioBufferList* inInputData, 

      const AudioTimeStamp* inInputTime, AudioBufferList* outOutputData, 

      const AudioTimeStamp* inOutputTime, void* inClientData) 

{

    // Need help here.  Should be copying input data from the input device to myBufferPointer.

}


OSStatus outputProcess(AudioDeviceID inDevice, const AudioTimeStamp* inNow, const AudioBufferList* inInputData, 

      const AudioTimeStamp* inInputTime, AudioBufferList* outOutputData, 

      const AudioTimeStamp* inOutputTime, void* inClientData) 

{

    // Need help here.  Should be copying myBufferPointer to the output device for rendering.

}

</code>


 If anyone has any advice on how to set up these functions or what type issues I should be aware of to run this simple playthrough, that would be greatly appreciated.


Thanks,


Brad


 _______________________________________________
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

  • Prev by Date: AudioFileReadBytes() byte-swapping on iPhone OS
  • Next by Date: Re: AudioFileReadBytes() byte-swapping on iPhone OS
  • Previous by thread: Re: AudioFileReadBytes() byte-swapping on iPhone OS
  • Next by thread: how to calculate latency?
  • Index(es):
    • Date
    • Thread