I am trying to develop a audio mixer and would like to get some help. This is my setup.
Create 4 audio transport sources
Add all 4 transport sources to a mixer
Set the gains for all the transport source to be at 0.0 and start them
At this point all the 4 tracks will start to play but the user will not hear any audio. Then when the user clicks on a button, i will set the gain for all 4 tracks to be 1.0. I move from gain value of 0.0 for all 4 tracks to gain value of 1.0 for all 4 tracks.
In this scenario, i hear a distinct noise/glitch for very short duration. Can any one suggest some method to remove the glitch.
I tried setting the gain in steps for 0.25, 0.5 , 0.75 and 1.0 sequentially without any delay in between. But in this also the glitch is observer.
What do you mean with “without any delay” - do you mean that the 0.25, 0.5, 0.75 and 1.0 are one sample after another? Also I still think this is too steep. You probably want to fade in the audio over a hundred samples or so.
Can anyone review my code structure and comment if I have the right design. In my audio chain the audio device and the mixer are started first. Then i add files to the mixer with zero gain. And on the start of a user input i set the gain to one. I not sure where to apply the gain ramp.