Monday, April 23, 2007

Sound frustration

Our frustration with sound is finally over (hopefully). Craig and I worked in class today and were able to come to a solution with the sound problems.

The issue was that as the game ran, the sounds would loop over top of each other creating a terrible noise. Worse yet, when the user moved off of the frame with sounds, they would keep playing. Telling the movieclips to stop didn't help.

The solution was to change the sound sync mode to "stream" which forces the sound to sync with each keyframe. It's designed for sounds loaded at runtime, but it works for what we need it to.

The solution for stoping the animation is to loop through all of the movieclips contained in the current frame, stop them, then update the next frame. This should also improve performance for long story paths.

The only downside is that now we need to extend our animation loops to incorporate the required sound timing, but this is a small price to pay considering we finally got the thing to work.

No comments: