o.w.varley
Well-known member
Hey all,
I'm starting to think I don't properly understand how the audio mixer (AudioMixer4) actually works. I've been through the code for it and also looked at the short docs from the Audio System Design Tool. My understanding is that the AudioMixer4 object has 4 channels and each channel can have its own individual gain set to a value between 0 and 32767. Setting a value of 0 will kill the input for the channel, setting a value of 1 is equivalent to unity gain and will leave the input unchanged and any value above 1 will amplify the signal. The default value for gain I can see is set to 1 for each channel when the AudioMixer4 object is created.
Question 1 - From the above understanding, would I be right to say that if I'm using two channels of the AudioMixer4 and their gain is set to 1 then the outputted audio will be a combination of the two inputs without any attenuation or amplification? I.e. both streams will be mixed together and output as a combined output?
Question 2 - There's a note on the AudioMixer4 that says that signal clipping can occur if the gain is set to a value above 1, but also that this can happen if multiple signals add together to greater than 1. When it refers to multiple signals here, I presume its referring to the separate channels of the mixer? If so, does this mean that by default the combination of each channel can cause clipping because the combined gain would be 4? 1 for each channel? Or am I way off the mark here?
Question 3 - If I've got an AudioMixer4 object that has two input channels, one input channel (channel 1) is the output from another mixer and the other channel (channel 2) is from the microphone. With the gain for the microphone channel set to 0, is there any situation in which the input received from channel 1 would boost the gain of channel 2 even with the gain of channel 2 set to zero? I.e. is there any situation whereby the audio being received from the microphone into the mixer could be heard regardless of its gain being 0?
I've used a mixer in my solution and I'm getting behaviour I just don't understand, mostly due to the behaviour explained in Question 3 above. I'm hoping that someone might be able to help shed some light on the errors in my understanding of the mixer.
Any help appreciated!
Owen
I'm starting to think I don't properly understand how the audio mixer (AudioMixer4) actually works. I've been through the code for it and also looked at the short docs from the Audio System Design Tool. My understanding is that the AudioMixer4 object has 4 channels and each channel can have its own individual gain set to a value between 0 and 32767. Setting a value of 0 will kill the input for the channel, setting a value of 1 is equivalent to unity gain and will leave the input unchanged and any value above 1 will amplify the signal. The default value for gain I can see is set to 1 for each channel when the AudioMixer4 object is created.
Question 1 - From the above understanding, would I be right to say that if I'm using two channels of the AudioMixer4 and their gain is set to 1 then the outputted audio will be a combination of the two inputs without any attenuation or amplification? I.e. both streams will be mixed together and output as a combined output?
Question 2 - There's a note on the AudioMixer4 that says that signal clipping can occur if the gain is set to a value above 1, but also that this can happen if multiple signals add together to greater than 1. When it refers to multiple signals here, I presume its referring to the separate channels of the mixer? If so, does this mean that by default the combination of each channel can cause clipping because the combined gain would be 4? 1 for each channel? Or am I way off the mark here?
Question 3 - If I've got an AudioMixer4 object that has two input channels, one input channel (channel 1) is the output from another mixer and the other channel (channel 2) is from the microphone. With the gain for the microphone channel set to 0, is there any situation in which the input received from channel 1 would boost the gain of channel 2 even with the gain of channel 2 set to zero? I.e. is there any situation whereby the audio being received from the microphone into the mixer could be heard regardless of its gain being 0?
I've used a mixer in my solution and I'm getting behaviour I just don't understand, mostly due to the behaviour explained in Question 3 above. I'm hoping that someone might be able to help shed some light on the errors in my understanding of the mixer.
Any help appreciated!
Owen