Re: Setting MaximumFramesPerSlice property on Stereo Mixer AU
Re: Setting MaximumFramesPerSlice property on Stereo Mixer AU
- Subject: Re: Setting MaximumFramesPerSlice property on Stereo Mixer AU
- From: William Stewart <email@hidden>
- Date: Fri, 21 Apr 2006 15:05:58 -0700
On 21/04/2006, at 8:24 AM, email@hidden wrote:
Hi folks,
I am trying to adjust the buffer size on all of the nodes in my
graph. I have had no problems setting the MaxmimumFramesPerSlice
property on my own AU
This should be failing if the AU is initialised!
The error is:
kAudioUnitErr_Initialized = -10849,
So (and this is the normal mode of operation);
AudioUnitUninitialise
// change max frames
AudioUnitInitialise
Initialisation is a barrier to define the definition of state that
will affect the behaviour of an AU as it renders. The setting of a
new MaxFrames value will determine the allocations an AU will need to
do for handling its DSP state, etc... So, this should only be done
when the AU is not initialised.
The reason that this is OK for the Output Unit is that it has to deal
with a lot of dynamic state changes, so it draws an exception in this
case.
Bill
and on my output device, but when I try to adjust a mixer (aumx
smxr appl) that I have in my graph, for some reason I am getting an
error result.
Short code snippet follows:
ComponentResult result;
UInt32 outDataSize;
Boolean writable;
UInt32 bufferSize;
result = AudioUnitGetPropertyInfo(
mMixerUnit, // AudioUnit
kAudioUnitProperty_MaximumFramesPerSlice,
kAudioUnitScope_Global,
0, // AudioUnitElement inElement,
&outDataSize, // UInt32 * outDataSize,
&writable // Boolean * outWritable
);
// writable returns TRUE, outDataSize returns 4 (sizeof(UInt32))
result = AudioUnitGetProperty(
mMixerUnit, // AudioUnit
kAudioUnitProperty_MaximumFramesPerSlice,
kAudioUnitScope_Global, // AudioUnitScope
0, // AudioUnitElement inElement,
&bufferSize, // void* outData,
&outDataSize // UInt32* ioDataSize
);
// bufferSize returns 1156, outDataSize return 4
result = AudioUnitSetProperty(
mMixerUnit, // AudioUnit ci,
kAudioUnitProperty_MaximumFramesPerSlice,
kAudioUnitScope_Global, // AudioUnitScope
0, // AudioUnitElement inElement,
&bufferSize, // const void* inData,
sizeof(UInt32) // UInt32 inDataSize
);
// result is -10849
The SetProperty() call is very similar to the ones that worked fine
for my output device and my own AU.
Why would the mixer be returning an error on this call?
I am also getting a similar (bad) result when trying to set this
property on the DLSMusicDevice (aumu dls appl).
Thanks in advance!
- Rick
_______________________________________________
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