add audio input sink.

This commit is contained in:
Miroslav Šedivý 2021-11-18 21:48:43 +01:00
parent 097e8d2a87
commit ddf44cbeac
2 changed files with 11 additions and 2 deletions

View File

@ -36,7 +36,7 @@ type Capture struct {
func (Capture) Init(cmd *cobra.Command) error {
// audio
cmd.PersistentFlags().String("capture.audio.device", "auto_null.monitor", "audio device to capture")
cmd.PersistentFlags().String("capture.audio.device", "audio_output.monitor", "audio device to capture")
if err := viper.BindPFlag("capture.audio.device", cmd.PersistentFlags().Lookup("capture.audio.device")); err != nil {
return err
}

View File

@ -1,6 +1,15 @@
#!/usr/bin/pulseaudio -nF
# Allow pulse audio to be accessed via TCP (from localhost only), to allow other users to access the virtual devices
#### Create virtual output device sink
load-module module-null-sink sink_name=audio_output sink_properties=device.description="Virtual_Audio_Output"
#### Create virtual input device sink
load-module module-null-sink sink_name=audio_input sink_properties=device.description="Virtual_Audio_Input"
#### Create a virtual audio source linked up to the virtual input device
load-module module-virtual-source source_name=microphone master=audio_input.monitor source_properties=device.description="Virtual_Microphone"
#### Allow pulse audio to be accessed via TCP (from localhost only), to allow other users to access the virtual devices
load-module module-native-protocol-unix socket=/tmp/pulseaudio.socket auth-anonymous=1
### Make sure we always have a sink around, even if it is a null sink.