mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add audio input sink.
This commit is contained in:
parent
097e8d2a87
commit
ddf44cbeac
@ -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
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user