1# Audio redirection 2notify 0 { 3 match "system" "SND"; 4 match "subsystem" "CONN"; 5 match "type" "IN"; 6 match "cdev" "dsp[0-9]+"; 7 8 # Other audio servers or device switching commands can be used here 9 # instead of virtual_oss(8). 10 action "\ 11 vd=/dev/$(sysrc -n virtual_oss_default_control_device); \ 12 test -e ${vd} && /usr/sbin/virtual_oss_cmd ${vd} -R /dev/$cdev"; 13}; 14 15notify 0 { 16 match "system" "SND"; 17 match "subsystem" "CONN"; 18 match "type" "OUT"; 19 match "cdev" "dsp[0-9]+"; 20 21 # See comment above. 22 action "\ 23 vd=/dev/$(sysrc -n virtual_oss_default_control_device); \ 24 test -e ${vd} && /usr/sbin/virtual_oss_cmd ${vd} -P /dev/$cdev"; 25}; 26 27notify 0 { 28 match "system" "SND"; 29 match "subsystem" "CONN"; 30 match "type" "NODEV"; 31 32 # No connected devices. Disable both recording and playback to avoid 33 # repeated virtual_oss error messages. 34 action "\ 35 vd=/dev/$(sysrc -n virtual_oss_default_control_device); \ 36 test -e ${vd} && /usr/sbin/virtual_oss_cmd ${vd} -f /dev/null"; 37}; 38