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

[Feature Request] Audio Volume Control #373

Open
AlexFreik opened this issue May 4, 2024 · 3 comments
Open

[Feature Request] Audio Volume Control #373

AlexFreik opened this issue May 4, 2024 · 3 comments

Comments

@AlexFreik
Copy link

Hello! Sometimes when we're playing music we want to slowly fade it out before transitioning to next scene. Is there any plans to impliment some kind of Audio Mixer via GetInputVolume and SetInputVolume?
Screenshot 2024-05-04 at 12 35 27

@AlexFreik AlexFreik changed the title [Feature Request] Volume Control [Feature Request] Audio Volume Control May 4, 2024
@bilogic
Copy link

bilogic commented May 5, 2024

I can't recall how I did it previously with obs-web, but it was an old version. And I still need this too, will update here or with a PR once I find it.

@bilogic
Copy link

bilogic commented May 5, 2024

I hacked it like this in App.svelte and it's really old, setScene() no longer exists in the latest version

  async function setScene(e) {
    let newscene = await e.currentTarget.textContent;
    let i = 0;
    let full_volume = -16.5;
    full_volume = -100; // 0%
    full_volume = -20; // 10%
    full_volume = -16.5; // 15%
    full_volume = 0; // 100%

    if (currentScene == 'Break - Music' || currentScene == 'Break - MTV') {
      for (i = full_volume; i > -100; i -= 1) {
        sendCommand('SetVolume', { volume: i, useDecibel: true, source: 'Lounge Music' });
        sendCommand('SetVolume', { volume: i, useDecibel: true, source: 'MTV' });
        await new Promise((r) => setTimeout(r, 20));
      }
      sendCommand('SetMute', { mute: false, source: 'BM800' });
    }

    if (newscene == 'Break - Music' || newscene == 'Break - MTV') {
      i = full_volume;
      sendCommand('SetVolume', { volume: i, useDecibel: true, source: 'Lounge Music' });
      sendCommand('SetVolume', { volume: i, useDecibel: true, source: 'MTV' });
      sendCommand('SetMute', { mute: true, source: 'BM800' });
    }

    sendCommand('SetCurrentScene', { 'scene-name': newscene });
  }

@bilogic
Copy link

bilogic commented May 5, 2024

All the volume control seems to gone SetVolume, SetMute seems to be gone

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

2 participants