It's no longer possible to change the output device when virtual_oss is running. (ie. the command virtual_oss_cmd /dev/vdsp.ctl -O /dev/dsp{0,1,2) does not change it when the deamon is running). It has happened for quite a while in CURRENT, but it seems that stable/14 has been affected recently. My rc.conf settings: virtual_oss_enable="YES" virtual_oss_dsp="-T /dev/sndstat -S -i 8 -C 12 -c 6 -r 48000 -b 32 -s 512 -O /dev/dsp2 -R /dev/dsp4 -c 2 -d dsp -c 12 -d vdsp -t vdsp.ctl" and sysctl.conf: hw.snd.default_unit=2 I cannot say when the breakage was introduced since I do not regularly build FreeBSD, but IIRC, it was in the first half of this year.
Hello Marek, I cannot recall any recent patch to virtual_oss or sound(4) that modifies the device changing behavior. In fact, I ran your command on -CURRENT, played a track in the background, changed the device to another one with virtual_oss_cmd(8) and it all works correctly. Could you provide more information? Are you sure your devices are all set up properly?
(In reply to Christos Margiolis from comment #1) > In fact, I ran your command on -CURRENT, played a track in the background, > changed the device to another one with virtual_oss_cmd(8) and it all works correctly. Thank you for your time spent on testing this Christos. I can no longer reproduce this issue. Maybe unplugged USB audio devices were the culprits. It is also possible that I was testing it on www/chromium where I was able to change the output device in the past. Now Chromium behaves like www/firefox always did with its default PulseAudio backend. Perhaps the default Chromium's audio backend was changed some time ago - I have not investigated it. So, yes, switching output with virtual_oss_cmd works as intended. Thank you for taking the maintainership of audio/virtual_oss Christos - not a widely used, yet unique sound daemon in the ports tree.