Before I start: It is possible to do if I disable every audio interface and set the virtual sink as default before starting the application in question, but that's a pretty bad hack that gets very tedious very quickly. This shows though that it is not completely technically impossible, it just seems to have issues.
Now for a more detailed problem description:
`pactl` and the GUI application `pavucontrol` enable a user to set up virtual sinks and route audio through them. This allows me to capture just the audio that passes through the sink, which I need for my purposes. Wine seems to have partial issues attaching to the sink though:
When I set the audio output to the sink in the wine config and use the test functionality, it does not output to the sink. The Origin client (running in wine) can be bound to the sink through `pavucontrol` and `pactl`. In the game Mass Effect however, the audio comes from two different playback streams, one of them called Mass Effect, the other called "wine-preloader". The audio coming through Mass Effect can be configured to go to the sink, the audio from "wine-preloader" cannot be bound to a sink through `pavucontrol` or `pactl`.
If you want to reproduce this behavior simply without installing Mass Effect, do the following:
- 1. create a virtual sink in PulseAudio: `pactl load-module module-virtual-sink sink_name=sink1`
- 2. install and open `pavucontrol` (it's easier, but if you want me to tell you how to do it with `pactl` then tell me and I'll describe in an answer)
In the "Playback" section, make sure at the bottom it says "Show: All Streams" and you will see your virtual sink stream there. You can select the output you want the virtual sink to output to.
- 3. open the wine configuration side by side next to the `pavucontrol` window
- 4. In the "Audio" tab of the Wine configuration, select the Virtual Sink as your output device, hit Apply and Test Sound
Does anybody know what is going on there or how to possibly fix it? Help would be greatly appreciated!