• 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: best performing mixer solution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best performing mixer solution


  • Subject: Re: best performing mixer solution
  • From: William Stewart <email@hidden>
  • Date: Mon, 9 Oct 2006 17:33:02 -0700

The 3DMixer contains a cheap rate converter feature on its input. Its the only mixer AU that we ship that does - all of the others require the sample rates to match.

Bill

On 09/10/2006, at 4:47 PM, John Morris wrote:

I am trying to set up some simple audio playing. My needs are very simple, play multiple channels of sound (of various sample rates) and be able to adjust their volumes on the fly. I have an AUGraph with a default output (kAudioUnitSubType_DefaultOutput) and a stereo mixer (kAudioUnitSubType_StereoMixer) on top of that. I then just render the sounds directly into the various elements of the mixer and control it's volume there (in the mixer).

I already have a system that performs well except for one gotcha. Everything is fine when I play 44.1kHz samples, but when I go to 22kHz, it is playing too fast (like the rate is still 44.1kHz).

When I go to play a sound, I check the rate of the mixer element, and if it is different from the sound I want to play, I use AudioUnitSetProperty(...kAudioUnitProperty_SampleRate, kAudioUnitScope_Input...) on the proper mixer element. I can check it afterward, and it is set correctly, but it doesn't seem to have any effect.

As a test, I switched the mixer to kAudioUnitSubType_3DMixer, and it is properly handling the 22kHz samples. No other source changes except for specifying the 3d mixer instead of the stereo one. So, I would guess that my code is at least mostly working.

So, after all that setup, here comes my question(s).

Am I doing something wrong (or not doing something right) on changing the sample rate of the stereo mixer?

Do I need to put an kAudioUnitSubType_AUConverter on top of each stereo mixer element and use that to convert/interpolate the sample rate? How much of a performance impact would this potentially be?

Should I just use the kAudioUnitSubType_3DMixer? I would assume that the performance of the 3D mixer would be a lot lower than the stereo one due to all of the sound localization goodies (that I would never use). Or would it "do the right thing" and make an optimal path based on settings that never change?

BTW, I am currently using 10.4.8 (everything up to date) on a MacBook Pro.


Thanks for any help on this,

John Morris
_______________________________________________
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


References: 
 >best performing mixer solution (From: John Morris <email@hidden>)

  • Prev by Date: best performing mixer solution
  • Next by Date: Re: AudioUnitAddRenderNotify and AudioUnitRender mDataByteSize
  • Previous by thread: best performing mixer solution
  • Next by thread: Basic AU parameter handling and automation with VSTGUI UI
  • Index(es):
    • Date
    • Thread