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

On Firefox, muting one tab mutes them all #46

Closed
hishamhm opened this issue Mar 18, 2017 · 3 comments · Fixed by #47
Closed

On Firefox, muting one tab mutes them all #46

hishamhm opened this issue Mar 18, 2017 · 3 comments · Fixed by #47

Comments

@hishamhm
Copy link
Contributor

Using Firefox 52 with apulse 0.1.9 and the dmix ALSA 1.1.3 plugin, Firefox can play audio from multiple tabs simultaneously and it works great.

When playing audio in multiple tabs, each tab gets a mute button. With direct ALSA+dmix in Firefox 51, this worked well, and tabs could be muted individually. With apulse, however, pressing "mute" on one tab is muting them all.

When I disable dmix, Firefox+apulse can't play multiple tabs simultaneously, so mixing is happening at ALSA level, so I assume apulse is sending separate streams for each tab via ALSA. I note also that the device does not get muted, so I believe apulse is muting "via software" (ie, not sending a mute command to the actual device).

This is my ~/.asoundrc to get software mixing via dmix working (but I have no reason to assume the same issue isn't happening with cards that do hardware mixing)

pcm.!default {
   type plug
   slave.pcm "dmix"
}
pcm.dmix  {
    type dmix
    ipc_key 1024
    slave {
      pcm "hw:0,0"
      period_time 0
      period_size 1024
      buffer_size 8192
   }
   bindings {
      0 0
      1 1
   }
}
ctl.dmix {
   type hw
   card 0
}
ctl.!default {
   type hw
   card 0
}

Thank you for apulse, it has become an essential tool in my system!

hishamhm added a commit to hishamhm/apulse that referenced this issue Mar 19, 2017
This makes the "mute" button on each Firefox tab work separately.
Without this patch, muting one tab mutes them all.

Fixes i-rinat#46.
@hishamhm
Copy link
Contributor Author

Decided to give it a shot at fixing this! I sent a PR that seems to work well. Thank you for a clear codebase, it was easy to find my way around the code. :)

@i-rinat
Copy link
Owner

i-rinat commented Mar 19, 2017

Oops. I assumed volumes are per-context rather that per-stream. And while code was written, I was thinking about how strange it's that application has to make own volume scaling.

Thank you for fixing this.

@hishamhm
Copy link
Contributor Author

Yay, thank you for reviewing quickly! Can't wait to get the next release merged in GoboLinux. :)

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

Successfully merging a pull request may close this issue.

2 participants