# Audio Lag please help

**URL:** <https://forums.solar2d.com/t/audio-lag-please-help/356039>\
**Category:** Audio and Graphics\
**Created:** [October 10, 2023, 12:20pm UTC](https://forums.solar2d.com/t/audio-lag-please-help/356039 "2023-10-10T12:20:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xeliw42651](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/x/d9b06d/32.png) [@xeliw42651](https://forums.solar2d.com/u/xeliw42651)\
**Post date:** [October 10, 2023, 12:20pm UTC](https://forums.solar2d.com/t/audio-lag-please-help/356039/1 "2023-10-10T12:20:15Z")

</div>

Hi Everyone,

Went through the first few tutorials. One thing I noticed was how bad the audio lag was when playing sound. I tried a few different things such as loading the audio file in main.lua, streaming vs. loading, different audio types, etc. Finally broke down and loaded up a sample app (endless skateboarder) and the audio lag is also present there. The lag is usually only a few hundred milliseconds but enough to make things annoying.

Does anyone know if this is possible to fix? Makes a game which relies on fast sound effects (shooting a laser for example) really bad.

Planning to move to a different game engine if it is not fixable. I like everything else about this game engine though. Especially the amazing documentation.

---

<div class="post-metadata">

**Author:** ![bgmadclown](https://forums.solar2d.com/user_avatar/forums.solar2d.com/bgmadclown/32/490_2.png) [@bgmadclown](https://forums.solar2d.com/u/bgmadclown)\
**Post date:** [October 10, 2023, 1:57pm UTC](https://forums.solar2d.com/t/audio-lag-please-help/356039/2 "2023-10-10T13:57:12Z")

</div>

I didn’t know that this was still a thing. Is this platform specific or are you seeing this on the simulator?

---

<div class="post-metadata">

**Author:** ![XeduR](https://forums.solar2d.com/user_avatar/forums.solar2d.com/xedur/32/256_2.png) [@XeduR](https://forums.solar2d.com/u/XeduR)\
**Post date:** [October 10, 2023, 2:18pm UTC](https://forums.solar2d.com/t/audio-lag-please-help/356039/3 "2023-10-10T14:18:49Z")

</div>

I must admit I don’t remember the audio lag having been an issue either in ages.

In addition to what bgmadclown already asked, did you check the audio types and frequencies of the files you’re using, as detailed in the docs:

> **[Solar2D Documentation — Developer Guides | Graphics/Audio/Animation](https://docs.coronalabs.com/guide/media/audioSystem/index.html#performance)**
>
> Solar2D lets you build games/apps for all major platforms including iOS, Android, Kindle, Apple TV, Android TV, macOS, and Windows. Get the free toolset!

---

<div class="post-metadata">

**Author:** ![kakula](https://forums.solar2d.com/user_avatar/forums.solar2d.com/kakula/32/418_2.png) [@kakula](https://forums.solar2d.com/u/kakula)\
**Post date:** [October 11, 2023, 7:11pm UTC](https://forums.solar2d.com/t/audio-lag-please-help/356039/4 "2023-10-11T19:11:32Z")

</div>

This might be irrelevant to your problem, but make sure your audio files has no silence at the beginning  
you can use online mp3 cutter to view the audio and trim it if required

Also make sure your code is working properly, and the lag is not caused by a function that is taking too long to execute or consuming big memory

---

<div class="post-metadata">

**Author:** ![system](https://forums.solar2d.com/uploads/default/original/1X/1bf6a947166df24e92aaa3358558f4b82d7f3d5a.png) [@system](https://forums.solar2d.com/u/system)\
**Post date:** [April 8, 2024, 7:11pm UTC](https://forums.solar2d.com/t/audio-lag-please-help/356039/6 "2024-04-08T19:11:47Z")

</div>

Closed on April 8, 2024, 7:11pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
