Merge pull request #480 from madpilot78/sound_recording

Sound recording
This commit is contained in:
Matt Churchyard
2022-10-25 12:03:13 +01:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -675,11 +675,17 @@ vm::bhyve_device_mouse(){
}
vm::bhyve_device_sound(){
local _play
local _play _rec
config::get "_play" "sound_play" "/dev/dsp0"
config::get "_rec" "sound_rec"
if config::yesno "sound"; then
_devices="${_devices} -s ${_slot}:0,hda,play=${_play}"
if [ -n "${_rec}" ]; then
_devices="${_devices},rec=${_rec}"
fi
_slot=$((_slot + 1))
fi
}

4
vm.8
View File

@@ -1492,6 +1492,10 @@ for details.
.It sound_play
Set this to the desired audio output device of the host to the guest. Defaults to
.Sy '/dev/dsp0'
.It sound_rec
Set this to the desired audio input device of the host to the guest. If empty
no audio input device is configured. Defaults to
.Sy '' (empty)
.It virt_consoleX
Allows the creation of up to 16 virtio-console devices in the guest. The value
to this option can be