In my audio processing code (audio processor) I have something like below code. I am trying to avoid this below repetitive code. Wondering if there is any better way to writ