# Sync multiple sounds

**URL:** <https://forum.kirupa.com/t/sync-multiple-sounds/263800>\
**Category:** flash\
**Created:** [June 19, 2008, 10:27am UTC](https://forum.kirupa.com/t/sync-multiple-sounds/263800 "2008-06-19T10:27:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubbeat](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@dubbeat](https://forum.kirupa.com/u/dubbeat)\
**Post date:** [June 19, 2008, 10:27am UTC](https://forum.kirupa.com/t/sync-multiple-sounds/263800/1 "2008-06-19T10:27:54Z")

</div>

Hi,

I’m working on an application where I need to play 2 mp3 file simultaneously in sync.

The files play in sync. There is an intermittent problem though. Every once in a while, with no pattern that I can see, the sounds play out of sync.

This happens

\> during playing

\>after a pause/play operation

I read up on the adobe bugs site and the issue does seem seem to be listed but not fixed.

[http://bugs.adobe.com/jira/browse/FP-82](http://bugs.adobe.com/jira/browse/FP-82)

Also the bug is listed for version 9\_0\_115\_0 but I’ve tried it in 9\_0\_123 and 10 and the problem still persists.

Would anybody know of a workaround to get to mp3 files to “always” play in sync

---

<div class="post-metadata">

**Author:** ![FlashHed](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@FlashHed](https://forum.kirupa.com/u/FlashHed)\
**Post date:** [June 19, 2008, 9:33pm UTC](https://forum.kirupa.com/t/sync-multiple-sounds/263800/2 "2008-06-19T21:33:23Z")

</div>

[http://www.adobe.com/devnet/actionscript/articles/cue\_points\_audio\_03.html](http://www.adobe.com/devnet/actionscript/articles/cue_points_audio_03.html)

---

<div class="post-metadata">

**Author:** ![dubbeat](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@dubbeat](https://forum.kirupa.com/u/dubbeat)\
**Post date:** [June 20, 2008, 9:19am UTC](https://forum.kirupa.com/t/sync-multiple-sounds/263800/3 "2008-06-20T09:19:29Z")

</div>

Hi, thanks for the reply.

I don’t understand how that helps my problem. The problem I was having was flash intermittently not playing two sounds at the same time.(2 mp3’s for left and right)

```auto
if(soundChannelA.position!=soundChannelB.position){
                
                trace("out of sync")
                
                SoundMixer.stopAll()
                _position=soundChannelA.position
                soundChannelB=soundB.play(_position)
                soundChannelA=soundA.play(_position)
                
                }

```

This is my imperfect solution so far. The code is in a fast timer.

---

<div class="post-metadata">

**Author:** ![FlashHed](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@FlashHed](https://forum.kirupa.com/u/FlashHed)\
**Post date:** [June 20, 2008, 8:37pm UTC](https://forum.kirupa.com/t/sync-multiple-sounds/263800/4 "2008-06-20T20:37:26Z")

</div>

the link i posted is for a class called sound sync, i used it in a dance dance / guitar hero-ish game i did. Basically its a great way to sync your sounds to visuals or to other sounds. Check it out, I can already tell you setTimeout / Timer is too slow when it comes to sound. this is the best i’ve seen for sounds always playing in sync.
