• 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: File input to AUs...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File input to AUs...


  • Subject: Re: File input to AUs...
  • From: William Stewart <email@hidden>
  • Date: Mon, 7 May 2007 18:54:32 -0700

Tommy

Have a look at "Default Output" in the SDK (/Developer/Examples/ Audio) - the output unit has a converter in it, so it can be set to a large number of pcm formats as the input and will do the necessary conversions to the hardware format. So, what you are seeing is the hardware and client format (the client/input side defaults to 44K, stereo)

The varispeed will do rate conversion as well (so you can have one rate on input and another on output).

You can set the format for the input scope of an AU when you have a callback to provide data. The AUConverter (which in this case is like the output unit) will take any of the PCM formats you want - and then you need to propogate the right formats down the chain. Typically in this scenario, we would try to minimise any sample rate conversions to just one step.

HTH

Bill

On 25/04/2007, at 8:20 AM, Tommy Braas wrote:

I am moving my code from direct using the CoreAudio APIs directly, to using AUs. In this endeavor, I need to play audio samples on the default output device, via some filters, read from an audio file. The requirement of running on 10.3 precludes me from using the fine AudioFilePlayer AU.

I am wondering what the render callback on node 1 below is expecting in terms of the audio data provided by me, read directly from the audio file? Interleaved or non-interleaved? Should I perhaps not use the Converter AU at all, and just feed a AudioConverter directly? What's the recommended way of doing it?

Another question; why does the Default Ouput AU report different sample rates for input and output scopes? Verified that the output scope matched AMS setting.

This is the setup:
AudioUnitGraph 0x28C3684:
  Member Nodes:
	node 1: desc aufc conv appl, instance 0x810009 O I
	node 2: desc aufc vari appl, instance 0x81000A O
	node 3: desc auou def  appl, instance 0x81000B O I
  Connections:
	node  1 bus  0 => node  3 bus  0

Converter AU
	Input: Interleaved format matching audio file
	Output: Non-interleaved format matching input on default Output unit

Varispeed AU (not connected)
Input: Non-interleaved format matching input on default Output unit, but file sample rate
Output: Non-interleaved format matching input on default Output unit


Default Ouput AU
	Input: the basis for the format used in the graph
	Output: whatever the format is for the device in question

Thanks,

\tommy

_______________________________________________
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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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: Re: Streaming audio to built-in audio device
  • Next by Date: Re: wav export
  • Previous by thread: Re: pause/resume file player... again...
  • Next by thread: Re: wav export
  • Index(es):
    • Date
    • Thread