[client] audio: avoid prompting when changing record format

If a recording is already in progress, we should not prompt again.
This commit is contained in:
Quantum 2022-03-19 00:04:09 -04:00 committed by Geoffrey McRae
parent 8f45290beb
commit 97cef000fd

View File

@ -803,7 +803,9 @@ void audio_recordStart(int channels, int sampleRate, PSAudioFormat format)
lastChannels = channels; lastChannels = channels;
lastSampleRate = sampleRate; lastSampleRate = sampleRate;
if (g_params.micAlwaysAllow) if (audio.record.started)
realRecordStart(channels, sampleRate, format);
else if (g_params.micAlwaysAllow)
{ {
DEBUG_INFO("Microphone access granted by default"); DEBUG_INFO("Microphone access granted by default");
realRecordStart(channels, sampleRate, format); realRecordStart(channels, sampleRate, format);