Re: using kSequenceTrackProperty_AutomatedParameters and scheduling multichannelmixer parameters on iOS
Re: using kSequenceTrackProperty_AutomatedParameters and scheduling multichannelmixer parameters on iOS
- Subject: Re: using kSequenceTrackProperty_AutomatedParameters and scheduling multichannelmixer parameters on iOS
- From: Aran Mulholland <email@hidden>
- Date: Thu, 15 Dec 2011 06:50:19 +1100
I've posted this question on the apple developer forums as well, maybe
I'll get some action there. I know that apple employees have never
said that they have to answer questions on this mailing list so maybe
I am reading the situation wrong. Am I meant to understand that the
silence lately from those quarters as an indication that the policy is
that we should be asking the questions on the developer forums instead
of here? I don't mind where I get my answers, as long as I can get
some and some clear direction would be appreciated.
Yours in hope (I'm still in developer pain out here)
Aran.
On Tue, Dec 13, 2011 at 9:08 AM, Aran Mulholland
<email@hidden> wrote:
> I'm attempting to use parameter automation to fade the volume in on a
> mulitchannelmixer on iOS. The following code is where I set up my
> ParameterEvents and assign them to the track that is associated with
> the mixer. when I run the following code I get the volume at 0 and 5
> seconds later I get the volume back at full strength. So far so good,
> I know the music track is hooked up to the mixer and can control the
> parameters of it.
>
> ParameterEvent startEvent;
> startEvent.parameterID = kMultiChannelMixerParam_Volume;
> startEvent.scope = kAudioUnitScope_Input;
> startEvent.element = 0;
> startEvent.value = 0.0;
>
> ParameterEvent endEvent;
> endEvent.parameterID = kMultiChannelMixerParam_Volume;
> endEvent.scope = kAudioUnitScope_Input;
> endEvent.element = 0;
> endEvent.value = 1.0;
>
> MusicTimeStamp musicTimeStamp = 0;
> MusicPlayerGetTime(musicPlayer, &musicTimeStamp);
>
> MusicTimeStamp startEventTimeStamp = musicTimeStamp + 0.1;
> MusicTimeStamp endEventTimeStamp = musicTimeStamp + 5.0;
>
> MusicTrackNewParameterEvent(mainMixerUnitOneAutomationTrack,
> startEventTimeStamp, &startEvent);
> MusicTrackNewParameterEvent(mainMixerUnitOneAutomationTrack,
> endEventTimeStamp, &endEvent);
>
> However what I would like is for the parameters to be ramped so before
> the above code is called (in the setup of the music track) I add the
> line:
>
> UInt32 trackUsesAutomatedParameters = 1;
> err = MusicTrackSetProperty (mainMixerUnitOneAutomationTrack,
> kSequenceTrackProperty_AutomatedParameters,
> &trackUsesAutomatedParameters, sizeof(UInt32));
>
> This call returns 0, but when this is in effect the above scheduling
> of parameters has no effect, the volume of the mixer stays at 1. Have
> I misunderstood the kSequenceTrackProperty_AutomatedParameters
> property or am I just using it incorrectly?
>
> Thanks
>
> Aran.
_______________________________________________
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