briankendall / proxy-audio-device

A virtual audio driver for macOS to sends all audio to another output
The Unlicense
514 stars 33 forks source link

fixed macos sonoma #35

Closed kasimok closed 7 months ago

kasimok commented 8 months ago

On Sonoma, the HAL Driver will crash if not upgraded from previous macOS versions.

CFStringSmartRef uid = AudioDevice::copyDeviceUID(defaultDevice);

Setting uid to CFStringSmartRef type will break the objective c runtime(complaints missing isa property). see ProxyAudioDevice.cpp:4670

Thread 5 Crashed::  Dispatch queue: net.briankendall.ProxyAudioDevice.audioOutputQueue
0   libobjc.A.dylib                        0x1896ad420 objc_msgSend + 32
1   ProxyAudioDevice                       0x102d634f4 ProxyAudioDevice::findTargetOutputAudioDevice() + 236 (ProxyAudioDevice.cpp:4670)
2   ProxyAudioDevice                       0x102d63c40 ProxyAudioDevice::setupTargetOutputDevice() + 56 (ProxyAudioDevice.cpp:4883)
3   ProxyAudioDevice                       0x102d644fc invocation function for block in ProxyAudioDevice::initializeOutputDevice() + 104 (ProxyAudioDevice.cpp:4935)
4   libdispatch.dylib                      0x1898c5910 _dispatch_client_callout + 20
5   libdispatch.dylib                      0x1898c8dc8 _dispatch_continuation_pop + 600
6   libdispatch.dylib                      0x1898dcbe4 _dispatch_source_latch_and_call + 420
7   libdispatch.dylib                      0x1898db7b4 _dispatch_source_invoke + 832
8   libdispatch.dylib                      0x1898ccd28 _dispatch_lane_serial_drain + 368
9   libdispatch.dylib                      0x1898cd9d4 _dispatch_lane_invoke + 380
10  libdispatch.dylib                      0x1898d861c _dispatch_root_queue_drain_deferred_wlh + 288
11  libdispatch.dylib                      0x1898d7e90 _dispatch_workloop_worker_thread + 404
12  libsystem_pthread.dylib                0x189a6f114 _pthread_wqthread + 288
13  libsystem_pthread.dylib                0x189a6de30 start_wqthread + 8
kasimok commented 8 months ago

This is a PR attempting to fix issue-34

briankendall commented 8 months ago

I haven't had a chance to test this out yet, but it's near the top of my agenda.

mahmoudhossam commented 7 months ago

Can someone please provide a built version for this? I'm on Sonoma and the driver isn't working for me.

kasimok commented 7 months ago

Can someone please provide a built version for this? I'm on Sonoma and the driver isn't working for me. @mahmoudhossam Bro, could you please check the console.app and see if there is some crash report related to this driver?

mahmoudhossam commented 7 months ago

Can someone please provide a built version for this? I'm on Sonoma and the driver isn't working for me. @mahmoudhossam Bro, could you please check the console.app and see if there is some crash report related to this driver?

I don't mean the version in the pull request, I'm running the version in the original repo and that isn't working.

I'm hoping this PR gets merged and we get a new version with the fixes.

gxgl commented 7 months ago

Tested and working on Sonoma 14.1.1 💯

briankendall commented 7 months ago

It's odd that this bug wasn't causing crashes in every release of macOS

kasimok commented 7 months ago

It's odd that this bug wasn't causing crashes in every release of macOS

@briankendall We also noticed several crashes in different products across different platform+Xcode combinations, they are also like above crash. No worry, as long as it is good, we can move on.