Re: AUEffectBase::ChangeStreamFormat changes sOld
Re: AUEffectBase::ChangeStreamFormat changes sOld
- Subject: Re: AUEffectBase::ChangeStreamFormat changes sOld
- From: Brian Willoughby <email@hidden>
- Date: Wed, 29 Sep 2004 05:57:32 -0700
As you may have noticed, sOld does hold the old sample rate BEFORE you call
AUEffectBase::ChangeStreamFormat. If all you need to do is make a few simple
calculations, you can do that before calling the parent class to change the
format. e.g. my code merely needs to detect when the sample rate changes, so I
set a boolean before making that call, and it is then based on the old value.
Brian Willoughby
Sound Consulting
Begin forwarded message:
From: Shai Shasag <email@hidden>
To: email@hidden
Cc: Gil Moses <email@hidden>, Stefan Gretscher <email@hidden>
My AU overrides and implements the ChangeStreamFormat function.
When the sample rate of the session has changed (ie. under Logic)
ChangeStreamFormat gets called with the parameters:
const CAStreamBasicDescription& sOld, const CAStreamBasicDescription&
sNew
Where sOld.mSampleRate holds the current sample rate and sNew
.mSampleRate hold the new.
My code than calls AUEffectBase::ChangeStreamFormat passing sOld and
sNew.
When AUEffectBase::ChangeStreamFormat returns, sOld.mSampleRate holds
the NEW sample rate!
This happens despite the fact that sOld is defined as const
CAStreamBasicDescription&.
Why is this happening?
Shai Shasag
Senior Software Engineer
Waves Audio Ltd.
Phone: +972-36084007; Fax: +972-36084056;
_______________________________________________
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