mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-12-06 03:57:38 +00:00
feat(audio): allow sending continuous audio (#4261)
This commit is contained in:
1 parent
246d8f179f
commit
fbcf2116c2
10 files changed
+24
-10
No files matched your search
+3
-2
@@ -193,7 +193,8 @@ namespace audio {
|
||||
}
|
||||
|
||||
auto frame_size = config.packetDuration * stream.sampleRate / 1000;
|
||||
auto mic = control->microphone(stream.mapping, stream.channelCount, stream.sampleRate, frame_size);
|
||||
bool continuous_audio = config.flags[config_t::CONTINUOUS_AUDIO];
|
||||
auto mic = control->microphone(stream.mapping, stream.channelCount, stream.sampleRate, frame_size, continuous_audio);
|
||||
if (!mic) {
|
||||
return;
|
||||
}
|
||||
@@ -230,7 +231,7 @@ namespace audio {
|
||||
BOOST_LOG(info) << "Reinitializing audio capture"sv;
|
||||
mic.reset();
|
||||
do {
|
||||
mic = control->microphone(stream.mapping, stream.channelCount, stream.sampleRate, frame_size);
|
||||
mic = control->microphone(stream.mapping, stream.channelCount, stream.sampleRate, frame_size, continuous_audio);
|
||||
if (!mic) {
|
||||
BOOST_LOG(warning) << "Couldn't re-initialize audio input"sv;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user