AU Format Negotiation
AU Format Negotiation
- Subject: AU Format Negotiation
- From: Patrick Gostovic <email@hidden>
- Date: Wed, 10 Dec 2003 11:40:52 -0500
Hi.
I've made a bunch of AudioUnits that stream MIDIPacketList's to one
another. Everything works great as long as I don't try and mess with
stream formats -- that is, I am not explicitly setting the stream
format to "kAudioFormatMIDIStream", just leaving them as default. How
does one set the stream format for an AU? My presumably naive approach
was to plop this code into my AU's constructor...
AudioStreamBasicDescription format = GetOutput(0)->GetStreamFormat();
format.mFormatID = kAudioFormatMIDIStream;
GetOutput(0)->SetStreamFormat(format);
However, when try to make connections between AU's where I have set the
stream format as above, I get a kAudioUnitErr_FormatNotSupported error.
I would really appreciate advice or links to sample code, etc.
These midi AU's that I'm making are actually for use in a AU host app
that I'm making, so my next question is what is the correct way to
negotiate stream formats when making a connection? My app is using
AUGraph's. Is format negotiation somehow automatically handled? Is it
just a matter of getting the kAudioUnitProperty_StreamFormat property
from the source element and setting it on the destination element?
Currently, I am doing nothing, just making and breaking connections.
It seems to work fine, but I'm sure I should be handling this
explicitly.
Thanks a bunch.
Patrick
_______________________________________________
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.