• 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
Stereo Mixer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stereo Mixer


  • Subject: Stereo Mixer
  • From: Andrew Onofreytchuk <email@hidden>
  • Date: Mon, 19 Jun 2006 11:23:06 +0300

Hi

I decided to organize simultaneous play of several sounds with the help of Core Audio.
Based on the examples I have created a graph consisting of Default oUtput and attached a AudioUnitSubType_StereoMixer to it. Here below is my code:


	OSStatus err = noErr;
	AUGraph mGraph;
	AUNode outputNode, mixerNode;
	AudioUnit mixer;

	err = NewAUGraph(&mGraph);

const ComponentDescription output_desc = {kAudioUnitType_Output, kAudioUnitSubType_DefaultOutput, kAudioUnitManufacturer_Apple};
const ComponentDescription mixer_desc = {kAudioUnitType_Mixer, kAudioUnitSubType_StereoMixer, kAudioUnitManufacturer_Apple};
AudioStreamBasicDescription desc = {};

err = AUGraphNewNode(mGraph, &output_desc, 0, NULL, &outputNode);
err = AUGraphNewNode(mGraph, &mixer_desc, 0, NULL, &mixerNode );
err = AUGraphConnectNodeInput(mGraph, mixerNode, 0, outputNode, 0 );
err = AUGraphOpen(mGraph);
err = AUGraphGetNodeInfo(mGraph, mixerNode, NULL, NULL, NULL, &mixer );


	// Set mixer kAudioUnitProperty_BusCount (kAudioUnitScope_Input) = 20
	// Set mixer kAudioUnitProperty_StreamFormat (Input/Output)...

	err = AUGraphInitialize(mGraph);
	err = AUGraphStart (mGraph);


Which further steps should I take to play simultaneously 3-5 various stereo sounds out of 10-20 found in the memory while “playlist” is constantly changing.
(e.g. sounds 1, 5, and 7 are being played first, then sounds 5 and 7 stopped and sounds 15, 11, 17 starts instead… )


So I am interested in the following:
- how to organize sounds storage, their “output” into mixer.
- how to stop/ launch to play a separate sound without interfering other sounds being played at the moment?


Thank you in advance!

_______________________________________________
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: Monitoring input level
  • Next by Date: AudioConverterFillComplexBuffer Sample
  • Previous by thread: Re: Don't exchange pointers, was Re: Objective-C++/C++ with CocoaUI Issue...
  • Next by thread: AudioConverterFillComplexBuffer Sample
  • Index(es):
    • Date
    • Thread