How to get HRTF sound on Linux
Solution 1:
I managed to get a system-wide solution!
Several steps:
- Create a sink
pacmd load-module module-null-sink \
sink_name=SantaClaus \
sink_properties=device.description=SantaClaus
- Set it as default (can be done using pavucontrol)
pacmd set-default-sink SantaClaus
- ffmpeg (see the doc to output to pulseaudio)
ffmpeg \
-loglevel error \
-f pulse \
-i SantaClaus.monitor \
-af "sofalizer=sofa=/path/ClubFritz9.sofa" \
-f pulse \
-name "3D Audio" \
"3D Audio"
- Use pavucontrol to select the output of ffmpeg (named 3D Audio), choose your headphones or speakers
_
Here is a problem I encountered specific to version 0.6 of libmysofa