High CPU Usage Switching Bus

I have a Unity asset that switches output buses at runtime. Unfortunately someone has reported to me that this switching is causing large spikes in CPU usage:

The code that’s running during that spike looks like this: SwitchOutputBus.cs · GitHub

Basically this is doing:

  1. Unlock previously locked bus
  2. Lock new output bus
  3. Switch the channel output to the new bus

Is there anything wrong with this approach that might be causing the high CPU usage?