I've been playing around with AU3DMixerEmbedded audio unit and play rates and hoping someone has some experience using this audio unit.
I am wanting to change the playrate during a render cycle. The playrate changes but setting an
offest which i've calculated doesn't work.
Before moving on, I wanted to confirm some questions.
In the headers, for AudioUnitSetParameter(), it states
inBufferOffsetInFrames - generally should be set to zero - see AudioUnitScheduleParameters
Does this mean setting it to something other than zero will work?
Setting it to a non-zero value doesn't do anything.
I've tried using AudioUnitScheduleParameters() :
AudioUnitParameterEvent event;
event.parameter = k3DMixerParam_PlaybackRate;
event.scope = kAudioUnitScope_Input;
event.element = 0;
event.eventType = kParameterEvent_Immediate;
event.eventValues.immediate.bufferOffset = offset;
event.eventValues.immediate.value = pitch;
OSStatus err = noErr;
err = AudioUnitScheduleParameters(track->auUnit,&event,1);
....
The rate changes but offset value doesn't seem to work. I checked if the audio unit could ramp so i could use (kParameterEvent_Ramped) but it seems this audio unit doesn't ramp. but does this mean it still can schedule
using kParameterEvent_Immediate?
Should these calls be made ONLY in a Render Notifier with pre flag set?
I am planning to write a bunch of code to test this all out but would love not to :)
cheers steph
soh_la : music software development