Audio fails

Discussion and announcements regarding the Mac port… er, original version of Oolite.

Moderators: another_commander, winston

User avatar
bungi
Above Average
Above Average
Posts: 24
Joined: Sun Oct 18, 2009 12:17 pm

Re: Audio fails

Post by bungi »

not sure if anyone else is still looking at this. I'm back looking at Oolite after a long hiatus with a job where I couldn't contribute here (sorry, I've now left that role).
I've updated to the latest Oolite, and also migrated onto a top spec iMac So resources and hardware *should* not be an issue. What I'm seeing is that the audio is dying when there are too many audio events in rapid succession. Usually for me this is in the middle of a dogfight with a lot of pirates, and it is pretty much guaranteed to get me killed because audio cues are important in the way I fight.
That aside, I've just managed to kill the audio on the trading board, by whizzing through the small items and adding them one by one to my stash. This is basically hitting down and right arrows in rapid succession. Suddenly I got a missile strike crunch noise and the audio died.
I'm wondering if this is a threading bug somewhere. Always close to impossible to debug. The reason I'm wondering is I've installed Telescope, and I'm finding it flaky in systems where I've been fighting for a while, and so a lot of ships have come and gone (been blown away). Now this could be a Telescope bug, not sure, I'm wondering though whether the audio overload is related. Another possible symptom is that I keep getting hit by missiles in combat which I'm not getting a launch sound, or HUD indication of, and no this isn't because I'm dogfighting up close and you accept fast missile launches and hits, this is at long range with no ship inside 10k. Given I have an iron ass, this is usually annoying, but it has lead to me getting toasted a few times, which is not something that happened very often when I was playing before.

Given I have some time on my hands, does someone want to point me at some debug log settings, and get me started with the code debugging? No promises, I'm a software engineer, but I've not bothered with Objective C much. I have had a lot of experience with highly threaded event loops on occasion though, and debugging/testing them.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5461
Joined: Wed Feb 28, 2007 7:54 am

Re: Audio fails

Post by another_commander »

Not a Mac user, but hopefully this can get you started.

The source sound files you can take a look at are:
OOOpenALController.m
OOMusicController.m
OOSoundSource.m
OOSoundSourcePool.m
OOALMusic.m
OOALSound.m
OOALSoundChannel.m
OOALSoundMixer.m
OOALSoundDecoder.m
OOALBufferedSound.m
OOALStreamedSound.m

You can change this setting in logcontrol.plist file below, in order to get the full sound events logging:
$soundDebug = no; // <------ change this to yes

I would also recommend running Doxygen on the source's root folder so that you can get the graphs of relationships between the sound classes; this might also be of some extra help in figuring things out. This issue has been reported in the past and seems to have been bothering Macs for a while, so I hope that it gets a resolution. Good luck!

User avatar
bungi
Above Average
Above Average
Posts: 24
Joined: Sun Oct 18, 2009 12:17 pm

Re: Audio fails

Post by bungi »

thanks. I'll give it a go, but about to go on holiday for a couple of weeks, so don't hold your breath. I have ideas though, and the code is now cloned.

Post Reply