Repository: godot
Issue: Audio intialization throws exception on macOS
Labels: bug,platform:macos,topic:porting,topic:audio

### Tested versions

- Reproducible in 4.2-stable, debug build
- Not reproducible in 4.1*, 4.0*, 3.5*

### System information

macOS Sonoma 14.1.1 (23B81)

### Issue description

Upon running the Godot editor or a scene (debug build), an exception is thrown during initialization fo the audio system. This can be observed when attaching a debugger, which will halt in `newAudioConverter()`. The exception is hit 4 times, before the application resumes properly.

Stack trace:
```
__cxa_throw (@__cxa_throw:3)
newAudioConverter(AudioStreamBasicDescription const*, AudioStreamBasicDescription const*, unsigned int, AudioClassDescription const*) (@newAudioConverter(AudioStreamBasicDescription const*, AudioStreamBasicDescription const*, unsigned int, AudioClassDescription const*):692)
AudioConverterNewInternal(AudioStreamBasicDescription const*, AudioStreamBasicDescription const*, unsigned int, AudioClassDescription const*, OpaqueAudioConverter**, AudioConverterAPI* (*)(AudioStreamBasicDescription const*, AudioStreamBasicDescription const*, unsigned int, AudioClassDescription const*)) (@AudioConverterNewInternal(AudioStreamBasicDescription const*, AudioStreamBasicDescription const*, unsigned int, AudioClassDescription const*, OpaqueAudioConverter**, AudioConverterAPI* (*)(AudioStreamBasicDescription const*, AudioStreamBasicDescription const*, unsigned int, AudioClassDescription const*)):31)
AudioConverterNew (@AudioConverterNew:89)
___lldb_unnamed_symbol858 (@___lldb_unnamed_symbol858:37)
___lldb_unnamed_symbol857 (@___lldb_unnamed_symbol857:77)
___lldb_unnamed_symbol848 (@___lldb_unnamed_symbol848:558)
___lldb_unnamed_symbol1037 (@___lldb_unnamed_symbol1037:427)
___lldb_unnamed_symbol4779 (@___lldb_unnamed_symbol4779:21)
APComponent::newInstance(unsigned int, bool, void (OpaqueAudioComponentInstance*, int) block_pointer) (@APComponent::newInstance(unsigned int, bool, void (OpaqueAudioComponentInstance*, int) block_pointer):604)
instantiate(OpaqueAudioComponent*, unsigned int, bool, void (OpaqueAudioComponentInstance*, int) block_pointer) (@instantiate(OpaqueAudioComponent*, unsigned int, bool, void (OpaqueAudioComponentInstance*, int) block_pointer):110)
__AudioComponentInstanceNew_block_invoke (@__AudioComponentInstanceNew_block_invoke:33)
Synchronously (@Synchronously:36)
AudioComponentInstanceNew (@AudioComponentInstanceNew:65)
AudioDriverCoreAudio::init() (/Users/badlogic/workspaces/spine-runtimes/spine-godot/godot/drivers/coreaudio/audio_driver_coreaudio.cpp:85)
AudioDriverManager::initialize(int) (/Users/badlogic/workspaces/spine-runtimes/spine-godot/godot/servers/audio_server.cpp:209)
Main::setup2() (/Users/badlogic/workspaces/spine-runtimes/spine-godot/godot/main/main.cpp:2484)
Main::setup(char const*, int, char**, bool) (/Users/badlogic/workspaces/spine-runtimes/spine-godot/godot/main/main.cpp:2184)
main (/Users/badlogic/workspaces/spine-runtimes/spine-godot/godot/platform/macos/godot_main_macos.mm:68)
start (@start:593)
```

The exception is not destructive, i.e. both editor and scene player will start-up fine. Audio also works as expected.

This is likely more an annoyance during debugging than a show stopping issue.

### Steps to reproduce

Compile Godot 4.2-stable and run the editor or a scene

### Minimal reproduction project (MRP)

Not necessary, as this happens on start-up irrespective of the loaded project/scene.