Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use AudioEffect to use GainNode to amplify gain value #76

Open
jaysinh01 opened this issue Jul 7, 2021 · 0 comments
Open

use AudioEffect to use GainNode to amplify gain value #76

jaysinh01 opened this issue Jul 7, 2021 · 0 comments

Comments

@jaysinh01
Copy link

Hey I need help with adjusting gain value in my audio stream.

        const audioContext = mergerState.getAudioContext(); // mergerState is an instance of VideoStreamMerger()
        const gainNode = audioContext.createGain();
        mergerState.addStream(stream, 
          { 
          audioEffect: function (source, dest) {
            source.connect(gainNode)
            gainNode.connect(dest)
          }
        });

Then, I am calling the following line in a different function.

gainNode.gain.value = 1.5;

Setting gain value to 1.5 does not change stream's gain value in resulting stream.

Goal: I am trying to dynamically change the audio stream's gain value. Anyone else able to use gainNode on audioEffect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant