Instantly setting mixer volume at a specific sample time
Instantly setting mixer volume at a specific sample time
- Subject: Instantly setting mixer volume at a specific sample time
- From: Dominic Feira via Coreaudio-api <email@hidden>
- Date: Tue, 5 Nov 2019 14:37:45 -0500
Is it possible to schedule a volume change on kAudioUnitSubType_MatrixMixer or
kAudioUnitSubType_MultiChannelMixer that happens instantly?
I am attempting to change the volume of a mixer at a specific sample time in a
kAudioUnitRenderAction_PreRender callback. I have tried AudioUnitSetParameter
with an offset as well as AudioUnitScheduleParameters with an immediate offset.
In both cases, the volume change is not instant. It begins at the exact sample
that I schedule the change to happen, but takes some time to complete. The
mixer is applying some smoothing to the volume change.
Measurements indicate that the kAudioUnitSubType_MatrixMixer takes 2235 samples
to complete its volume change and kAudioUnitSubType_MultiChannelMixer takes
1102 samples to complete its volume change. These measurements were taken with
the entire graph running at 44.1kHz.
While applying some smoothing makes sense when the user makes changes via UI,
it doesn’t make any sense when I am programmatically changing the volume,
especially when using AudioUnitScheduleParameters with an immediate offset.
It is possible to force the mixer to immediately change its volume by calling
AudioUnitReset after setting the volume in the kAudioUnitRenderAction_PreRender
callback, but this defeats the scheduled change.
Is it possible to schedule a volume change on kAudioUnitSubType_MatrixMixer or
kAudioUnitSubType_MultiChannelMixer that happens instantly?
— Dominic Feira
_______________________________________________
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