I have an issue discovered when using Event sounds by Master Audio for audio mixer snapshot transitions working in editor but not on mobile.
What I want to do is to change filter frequencies and send levels in nested audio groups inside the AudioMixer. It works perfectly in the Editor, but not on any mobile device.
When snapshots apparently didn’t work, I made a script that replicated the transition. Worked perfectly in the editor, but not on mobile devices. More details below.
Steps Taken to Troubleshoot:
- Effects: Ensuring the filters and effects work at all by manually turning them on before building. All of them work in both the editor and on mobile devices. This tells me the effects and the
AudioMixerare pesent on mobile, since I can hear them. - Exposed Parameter Testing: Confirmed that parameters are correctly exposed and accessible via
SetFloat. Testing has included adjustments to both nested groups and theMastergroup within theAudioMixer. - Snapshot Transitions: Configured and tested snapshots with differing parameter settings, transitioning between them using
audioMixer.TransitionToSnapshots—audible in the Editor but not on mobile. - Simplified Configuration: Applied volume and pitch adjustments directly to the
Mastergroup to isolate the issue from nested group structures —audible in the Editor but not on mobile. - Platform specific paths: Tried using full paths to the affected nested mixer groups, however this made them unrecognizable in the script on mobile.
- Interpolation and Batching: Replaced
Mathf.LerpwithMathf.SmoothStepfor smoother interpolation and batched parameter changes, applying them simultaneously to improve consistency on mobile —no effect on mobile. - Event Timing: Moved initialization from
OnEnabletoStartper Unity’s documentation on mobile —no difference in the Editor and no effect on mobile. - Direct Parameter Application with
SetParameter: Implemented a wrapper method,SetParameter, to apply values directly. —working in the Editor and no effect on mobile. - Audio Mixer Settings: DSP Buffer Size set to Best Latency (256), DSP Buffer Size set to Best Performance (1024), ; Sample Rate 44100 Hz —no difference in the Editor and no effect on mobile.
Environment:
- Unity Version: 2022.3.51f1
- Platforms Affected: iOS and Android
Observed Behavior:
- Both
SetFloatandTransitionToSnapshotscalls execute and apply as expected in the Unity Editor with audible effects. - Debug logs confirm that all parameter values update as intended on mobile, yet no audible changes are detected.
- Same settings and code produce the expected audio effects in the Editor but remain silent on mobile, even when simplified to the
Mastergroup alone.
Key Questions:
- Examples: Are there any examples of successful cases with AudioMixer real time manipulation on mobile devices?
- Platform-Specific Limitations: Are there any documented issues or platform-specific limitations with
AudioMixer.SetFloat, snapshots, orAudioMixerin general on iOS and Android that could be causing this behavior? - Recommended Approaches for Mobile: Are there alternative methods recommended for achieving real-time parameter adjustments on mobile that would bypass the current limitations of
SetFloatand snapshot transitions? - Additional Debugging Tools: Are there tools or diagnostic flags to verify if mobile platforms are actually processing
AudioMixerparameter changes?