• 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: Changing size of output AudioBuffer to be used in IOProcess - newbie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing size of output AudioBuffer to be used in IOProcess - newbie


  • Subject: Re: Changing size of output AudioBuffer to be used in IOProcess - newbie
  • From: David Duncan <email@hidden>
  • Date: Fri, 14 Feb 2003 10:48:57 -0500

On Friday, February 14, 2003, at 09:47 AM, <email@hidden> wrote:

I am fairly new to core audio and I am having some problems with a few
concepts.

I am currently trying to write a simple program in java. The program is
reading in a file, processing the data, and then outputing to multiple
channels (at least 4 i am hoping). I originally started by looking at the
audioConverter's fillbuffer to do the work for me, but this doesn't allow
real-time access to the data which I need. So I have begun to write the
audioDeviceIOProc.execute method myself, and this is where my problems
begin.

First of all, you may find it far easier to use com.apple.audio.units.AudioDeviceOutputUnit instead of using AudioDevices directly. First it opens you to the world of AudioUnits (which is lovely indeed =) and second it abstracts all the housekeeping you need to do with Audio Devices.

With that in mind, you will instead of implementing com.apple.audio.hardware.AudioDeviceIOProc, you will implement com.apple.audio.units.AURenderCallback and attach that to the AudioDeviceOutputUnit (see com.apple.audio.units.AudioUnit.setInputCallback()). Then your render callback can copy audio data into the provided AudioBuffer for some number of channels (also provided by the AudioBuffer object).

In my experience, the CoreAudio will ask for buffers (by default at least) that has a physical size of a VM page. So if you have 4 channels, I would expect to be asked for 256 samples, but YMMV.

--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.

David Duncan
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Changing size of output AudioBuffer to be used in IOProcess - newbie (From: <email@hidden>)

  • Prev by Date: Changing size of output AudioBuffer to be used in IOProcess - newbie
  • Next by Date: Fourier beginner: sanity check
  • Previous by thread: Changing size of output AudioBuffer to be used in IOProcess - newbie
  • Next by thread: Fourier beginner: sanity check
  • Index(es):
    • Date
    • Thread