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:
parent
019889d1da
commit
80c2d6c439
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue