I am trying to change default audio device without restarting applications to take effect, I think that is possible using virtual_oss device but it seems that I can't change default audio device to virtual_oss generated.
My audio devices:
I have installed virtual_oss:
Enabled it:
Configured start options to use default speakers as output:
Started virtual_oss:
Now I can see a new device: dsp: <Virtual OSS> (play/rec)
But I don't know how to make it the default device:
If I can use virtual_oss device as default audio device I think that I will be able to change audio output without restarting current apps with the following command:
Any advise?
Best regards.
My audio devices:
Code:
dmesg |grep pcm
pcm0: <Intel Haswell (HDMI/DP 8ch)> at nid 3 on hdaa0
pcm1: <Realtek ALC292 (Analog 2.0+HP/2.0)> at nid 20,21 and 26 on hdaa1
pcm2: <Realtek ALC292 (Internal Analog Mic)> at nid 18 on hdaa1
pcm3: <USB audio> on uaudio0
pkg install virtual_oss
Enabled it:
sysrc virtual_oss_enable=YES
Configured start options to use default speakers as output:
sysrc virtual_oss_dsp="-T /dev/sndstat -C 2 -c 2 -S -i 8 -r 48000 -b 24 -s 8.0ms -f /dev/dsp1 -d dsp -t dsp.ctl"
Started virtual_oss:
service virtual_oss start
Now I can see a new device: dsp: <Virtual OSS> (play/rec)
Code:
cat /dev/sndstat
Installed devices:
pcm0: <Intel Haswell (HDMI/DP 8ch)> (play)
pcm1: <Realtek ALC292 (Analog 2.0+HP/2.0)> (play/rec) default
pcm2: <Realtek ALC292 (Internal Analog Mic)> (rec)
pcm3: <USB audio> (play/rec)
Installed devices from userspace:
dsp: <Virtual OSS> (play/rec)
sysctl hw.snd.default_unit=UNIT_NUMBER
If I can use virtual_oss device as default audio device I think that I will be able to change audio output without restarting current apps with the following command:
virtual_oss_cmd /dev/dsp.ctl -f /dev/dsp3
Any advise?
Best regards.