5

I think it would be great it I could control the sound balance by placing a window in different places on my desktop. For example, I could put a youtube video playing on the left-hand side, and hear it out of the left speaker. Simultaneously, I could be playing a game on the right-hand side that I'd hear through the right speaker. Is there anything I can do to get this behaviour?

1 Answer 1

5

This is not supported by any system I know of.

But it wouldn't be that hard to do but it would require being able to match up mixer inputs with the windows that they appear to come from (this requirement is the hard part.) and then looking up the location of the window for an input and modifying the mixer balance for that input accordingly.

Using X11 state change notification, it would be possible to update the balance for an input in realtime without polling the window locations.

4
  • 1
    This should be a comment rather than an answer
    – Greg
    Dec 16, 2011 at 9:26
  • @Greg Its attempt to answer the question is enough to justify its status as an answer. Although it doesn't give a positive answer, it at least gives an explanation of how what was requested could be done.
    – Dan D.
    Dec 16, 2011 at 9:40
  • I'm accepting this answer because the answer appears to be "no," and it provided some pretty damn constructive information. Dec 16, 2011 at 19:27
  • 1
    The answer wasn't no. Is possible, at least if there is only one window ID per PID. You could get the playing PIDs (pacmd list-sink-inputs), get display and windows properties (wmctrl -p -G -l) and with simple calculations set balance: amixer -D pulse set Master 80%,20%. Mar 15, 2019 at 5:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .