Merge pull request #4 from cgutman/default_monitor

Use the default monitor rather than the default source
This commit is contained in:
loki-47-6F-64 2020-01-18 10:22:12 +01:00 committed by GitHub
commit 1168ed07c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,7 @@ fec_percentage = 10
# back_button_timeout = 2000
# The name of the audio sink used for Audio Loopback
# If you do not specify this variable, pulseaudio will select a default device, which could be a microphone instead of a speaker
# If you do not specify this variable, pulseaudio will select the default monitor device.
#
# You can find the name of the audio sink using the following command:
# pacmd list-sources | grep "name:"

View File

@ -336,6 +336,9 @@ std::unique_ptr<mic_t> microphone(std::uint32_t sample_rate) {
if(!config::audio.sink.empty()) {
audio_sink = config::audio.sink.c_str();
}
else {
audio_sink = "@DEFAULT_MONITOR@";
}
mic->mic.reset(
pa_simple_new(nullptr, "sunshine", pa_stream_direction_t::PA_STREAM_RECORD, audio_sink, "sunshine_record", &mic->ss, nullptr, nullptr, &status)