Display Specific Audio Output (DSAO)

Though this thread addresses an instance associated with multiple monitor setups, it is most directly an audio situation. In the instance that you feel this thread be moved, all I ask is fair warning beforehand.

Say I have my computer outputting audio through the 3.5mm jack to the speakers on my desk next to my monitor, but I also have a television to the right of me, connected via HDMI with it's own audio bar. I have chrome open on the primary monitor playing audio.

What I want is, if I drag the window over to the TV monitor, the audio device switch to that monitor/output without manually having to switch it.

DSAO. I'm running Cinnamint 18.1. Feedback?

TBH, no idea how you are gonna pull that off.

1 Like

Ok, sorta started rambling a tad about an idea I had where you could write up a script to do it, but ended up sounding like it'd be a huge mess. Really it'd probably be more work than it's worth.

A compromise might be to either output to all soundcards/outputs at the sametime. Setup keyboard shortcuts to toggle outputs, Or, set chosen programs to each output.

Here be dragons.

Could probably script it... Only roadblock is that you need a way to check what window is on a certain monitor.

Rest is easy(..easier) get the name of the program the current window and change the output of the program using a pulse audio command.

Some more roadblocks and limitations:

  • You may not (see: probably not) be able to change the output on a per window basis. so if you set chrome/firefox to output on a selected channel, all your other chrome/firefox tabs will be the same.
  • You may not be able to do this with cinnamon and my need to change desktop enviroments
    There's probably issues I'm missing. but it'd be an interesting challenge.
1 Like

Thanks for the input. I'll try to see what I can do. I'll likely spend weeks on this, and might end up creating a full program. More trouble than it's worth? Most likely, yes... If all goes well, I guess I'll have solved a problem I've been plagued by for a long time. (I honestly still can't believe that we don't have that capability by default... It seems like it's a problem people have come across, I'd assume someone had a solution lol. I guess the best part of using Linux then is that I can do it myself... Damn, I was feeling so good these passed few weeks... Not having to tweak anything or fix something that didn't need fixing (and then proceeding to fix the fix because I broke it.))

2 Likes

I thought more about this; what you could do, is have different workspaces have different sound outputs?

1 Like

This is a thing? O_O I'm going to try rn <3

UPDATE: I tried it... No, workspaces aren't audio independent.

crap, well it was worth a try!

1 Like