Allow positioning application audio based on window position.
This is probably a far-off feature idea, and may be best implemented outside of pipewire core. But it would be cool if this was eventually possible.
It would be nice if when an application played a sound—especially a short chirp to get your attention—the sound was positioned based on the location of the window on the screen. Especially for a multi-monitor setup where you can have a very wide range of monitors it can be a subtle way to help you identify where a sound came from. For example if I hear a chirp in my left ear I will look left and realize that it was an IM, however from the right I know it is email.
Of course we probably don't want all applications/streams subjected to this. For example if I am watching a movie I likely want it's surround sound (or even just stereo) to be faithfully reproduced without repositioning. There are probably a couple of heuristics that would work well here:
- If the sound has more than one channel preserve the positioning. However I suspect there are a lot of chirps that have multiple channels for no particular reason.
- If the sound continues for more than a second or two we could preserve the positioning. This may be some sort of gradual movement towards the center of the screen.
These two can be combined as well. However it is probably still required to have some sort of user opt-out option for particular applications or streams.
I guess the key required features here are:
- Positioning sound sources.
- Tying streams to windows.