diff options
| author | Catchawink <threeeasywords@email.com> | 2019-12-12 09:59:47 -0500 |
|---|---|---|
| committer | Catchawink <threeeasywords@email.com> | 2019-12-12 10:28:46 -0500 |
| commit | 86096313bead15ecaf911d8ff41e7074009bd98a (patch) | |
| tree | 980d5cd0029f0327e812a7436504143e74dc14f9 /servers | |
| parent | f065b34e969f93e5ecc9046e01c5c14c416d2d16 (diff) | |
| download | redot-engine-86096313bead15ecaf911d8ff41e7074009bd98a.tar.gz | |
Fixed an issue with recording audio.
Prior to this fix, AudioEffectRecordInstance::init() was called before recording_active is set to true in AudioEffectRecord::set_recording_active(). This was setting is_recording to false in AudioEffectRecordInstance, because is_recording updates to the value of recording_active in AudioEffectRecordInstance::_io_thread_process(). To fix this issue, AudioEffectRecordInstance::init() is now called after recording_active is set to true.
Diffstat (limited to 'servers')
| -rw-r--r-- | servers/audio/effects/audio_effect_record.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index 83d78daff4..3b6b1de806 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -192,10 +192,11 @@ void AudioEffectRecord::set_recording_active(bool p_record) { } ensure_thread_stopped(); + recording_active = true; current_instance->init(); + } else { + recording_active = false; } - - recording_active = p_record; } bool AudioEffectRecord::is_recording_active() const { |
