Fix CoreAudio driver crash when starting input with uninitialized device
Initialize input device if null before starting audio input to prevent crashes when input_unit is not yet initialized.
This commit is contained in:
@ -520,6 +520,8 @@ void AudioDriverCoreAudio::finish_input_device() {
|
||||
}
|
||||
|
||||
Error AudioDriverCoreAudio::input_start() {
|
||||
ERR_FAIL_NULL_V(input_unit, FAILED);
|
||||
|
||||
input_buffer_init(capture_buffer_frames);
|
||||
|
||||
OSStatus result = AudioOutputUnitStart(input_unit);
|
||||
|
||||
Reference in New Issue
Block a user