2 Replies Latest reply on Sep 24, 2006 4:43 PM by Newsgroup_User

    Problem with sound

    speedy4711
      Hello,

      can somebody help me, i have a problem with using sound in my director presentation. i have imported a *.wav file (also tried mp3) into the sound channel, the spoken text on the sound file should be synchronous to the animations in the presentation. I adjust my sprites to fit and everxything is ok, but after running the presentation the sound and animation are out of sync, sometimes the animation is faster as sound and the other way round, also tried to make a projector file, but same result,

      i have no idea what the problem could be

      any ideas?

      thanks for your help
        • 1. Re: Problem with sound
          Level 7
          You cannot synchronize assets using the score and relying on a frame to
          require an exact number of milliseconds for display. The Tempo channel
          provides a target frame rate that won't be exceeded but is not
          guaranteed to be matched.
          I suggest you look at cuePoints, or poll sound().currentTime from a
          regular event like #enterFrame
          • 2. Re: Problem with sound
            Level 7
            To get reasonably synced free run animation, the frame rate would be
            have to be set to a rate that he slowest end user system can play at,
            'throttling back' the frame rate prevents faster systems from
            overrunning the sound track.

            More serious syncing requires some more exact sync scheme.

            Usually this involves shortening the number of score frames a bit, then
            inserting score scripts or tempo channels that hold on a frame until a
            certain sound time is reached.

            Embedding cue points in the sound files in advance allows a simple tempo
            channel setting or more sophisticated lingo method to hold a frame until
            the designated cue point comes up. Tempo channel settings hae a problem
            with locking out user interface responce while in a wait condition.


            An alternative to embedded cue points (that can only be set with a
            couple of sound editors) One can create a cue times list that is stored
            in a field member. Here's an untested example of how a score script
            could use the cue times field.


            -- start of sound sequence frame

            on exitFrame
            global currentCue
            currentCue = 0
            end


            -- score script placed in sequence at each hold frame.

            global currentCue, currentCueTime

            on beginSprite
            currentCue = currentCue + 1
            currentCueTime = value(field("cueTimeList").line[currentCue])
            end

            on exitFrame
            if sound(2).currentTime <= currentCueTime then go to the frame -- wait
            here
            end