# Synchronization of audio and graphic

**URL:** <https://forums.solar2d.com/t/synchronization-of-audio-and-graphic/311328>\
**Category:** Uncategorized\
**Created:** [March 10, 2013, 6:04pm UTC](https://forums.solar2d.com/t/synchronization-of-audio-and-graphic/311328 "2013-03-10T18:04:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lemesev.Nikolay](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@Lemesev.Nikolay](https://forums.solar2d.com/u/Lemesev.Nikolay)\
**Post date:** [March 10, 2013, 6:04pm UTC](https://forums.solar2d.com/t/synchronization-of-audio-and-graphic/311328/1 "2013-03-10T18:04:07Z")

</div>

Hello!  
Tell me please, how is it possible to synchronize the audio and graphics when loading the scene? My scene is made as a presentation of MS Power Point. There is a voice of the announcer and the changing pictures on the screen. The problem is in the delay of the audio for the graphics. Graphics already starts to move, when the audio (voice of the announcer in the background) is still not loaded. I used both operator: audio.loadSound \ audio.loadStream, but in both cases I have audio delay.  
While I testing on simulator - there is no problem. But on a device I have audio delay…  
Thanks! [import]uid: 135802 topic\_id: 37371 reply\_id: 67371[/import]

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [March 11, 2013, 3:21am UTC](https://forums.solar2d.com/t/synchronization-of-audio-and-graphic/311328/2 "2013-03-11T03:21:04Z")

</div>

Are you building for Android or iOS?

If Android what device are you testing on? (OS version?)

Does your audio clip have any dead space at the beginning that can be trimmed?

audio.loadSound() will load the sound completely and decode it before it starts playing. audio.loadStream() will load some of the sound and start decoding and playing while it finishes loading. There are many variables including the codec performance that can impact it. You’re best bet is to pre-load the sound before you need it to eliminate any system/os overhead. [import]uid: 199310 topic\_id: 37371 reply\_id: 145597[/import]

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [March 11, 2013, 3:21am UTC](https://forums.solar2d.com/t/synchronization-of-audio-and-graphic/311328/3 "2013-03-11T03:21:04Z")

</div>

Are you building for Android or iOS?

If Android what device are you testing on? (OS version?)

Does your audio clip have any dead space at the beginning that can be trimmed?

audio.loadSound() will load the sound completely and decode it before it starts playing. audio.loadStream() will load some of the sound and start decoding and playing while it finishes loading. There are many variables including the codec performance that can impact it. You’re best bet is to pre-load the sound before you need it to eliminate any system/os overhead. [import]uid: 199310 topic\_id: 37371 reply\_id: 145597[/import]
