Hack to fix switching audio source crash bug

Feel free to post bug reports here. I need exact, detailed steps showing me how I can re-create the bug on my machine, so give as much info and detail as possible.
DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

If by "see" you mean "physically", sure, but if by "see" you mean able to connect to it as a secondary monitor, then that does not recreate the bug.

dave
Site Admin
Posts: 6684
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

i mean i could not physically see the monitor connected to the ATV, but the computer could see the ATV monitor as if it were a second display.

DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

For all that care:
Fixed!
Now that was a hard bug to track down!

dave
Site Admin
Posts: 6684
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

aaaaaaaaaand the problem was i was using a flippin' DEPRECATED CARBON call to play an 'snd' resource (eg: the "camera snapshot" or "rip completed" sounds) You know, Carbon Toolbox APIs, from the MacOS 9 era? sheesh.

updated that 4 lines of code to use Cocoa instead, and BOOM! fixed! The problem was that the carbon call left an audiolistener allocated and regularly polled, on the channel that played the sound, and also did not have Cocoa exception handling protection. so if that port ever got switched later, you'd crash.

Post Reply