# \[SOLVED\] A looped engine sound sample plays with a break on repeat

**URL:** <https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729>\
**Category:** Help & Support\
**Tags:** sound\
**Created:** [July 25, 2022, 6:51pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729 "2022-07-25T18:51:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![SARJ](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/sarj/32/22392_2.png) [@SARJ](https://forum.playcanvas.com/u/SARJ)\
**Post date:** [July 25, 2022, 6:51pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/1 "2022-07-25T18:51:58Z")

</div>

Hi, all!

A looped engine sound sample plays with a break on repeat.

In Adobe Audition, the sample plays without audio interruption.

 ![engine_drive_loop](https://forum-files-playcanvas-com.s3.dualstack.eu-west-1.amazonaws.com/original/3X/b/3/b326bddbb45f9fe6b098c3ec440c783b44afa5e5.png)

How to make it play without interruption in PlayCanvas?

[https://playcanvas.com/editor/scene/1483308](https://playcanvas.com/editor/scene/1483308)

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [July 25, 2022, 8:56pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/2 "2022-07-25T20:56:21Z")

</div>

Hi @SARJ and welcome! It depend on where the silence is in the sound file. If it is on start, you can adjust the start time of the sound component. If it is on the end, you can adjust the duration of the sound component.

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [July 25, 2022, 8:58pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/3 "2022-07-25T20:58:04Z")

</div>

Looking at your screenshot, I think it’s on the end. The total duration of your sound file is 2.61 seconds, so you can try to set a duration of 2.50 for example.

---

<div class="post-metadata">

**Author:** ![SARJ](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/sarj/32/22392_2.png) [@SARJ](https://forum.playcanvas.com/u/SARJ)\
**Post date:** [July 26, 2022, 7:38am UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/4 "2022-07-26T07:38:03Z")

</div>

Great! It works for me 🙂

But it’s very important to make the step for ‘StartTime’ and ‘Duration’ smaller.  
I can only install 0.19, but I need 0.198 or even 0.1981 like on the screenshot. You must understand that the sound waveform changes so quickly, 0.01 step is not enough to correctly synchronize the beginning and end of the sound wave.

Thanks.

---

<div class="post-metadata">

**Author:** ![Albertos](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/albertos/32/19749_2.png) [@Albertos](https://forum.playcanvas.com/u/Albertos)\
**Post date:** [July 26, 2022, 10:33am UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/5 "2022-07-26T10:33:01Z")

</div>

I’m afraid that’s not possible, so you need to modify the sound file in your sound editor for that.

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [July 26, 2022, 10:43am UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/6 "2022-07-26T10:43:09Z")

</div>

I believe if it’s an MP3, its not possible to loop gapless. I think OGG files don’t have this issue but is not compatible with all browsers

eg [Noticeable Mp3 Audio loop gap - Audio and Graphics - Solar2D Game Engine](https://forums.solar2d.com/t/noticeable-mp3-audio-loop-gap/351509)

More info on this subject before: [Mp3 looping issue](https://forum.playcanvas.com/t/mp3-looping-issue/16018)

---

<div class="post-metadata">

**Author:** ![SARJ](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/sarj/32/22392_2.png) [@SARJ](https://forum.playcanvas.com/u/SARJ)\
**Post date:** [July 26, 2022, 11:29am UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/7 "2022-07-26T11:29:12Z")

</div>

I think this way is fine. In the playcanvas editor, I will set the StartTime to 0.2 for example, and add the required interval to the sound file at the beginning.

---

<div class="post-metadata">

**Author:** ![SARJ](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/sarj/32/22392_2.png) [@SARJ](https://forum.playcanvas.com/u/SARJ)\
**Post date:** [July 26, 2022, 11:29am UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/8 "2022-07-26T11:29:47Z")

</div>

And what about WAV? Doesn’t it have the same problem as MP3?  
WAV is supported by all browsers?

---

<div class="post-metadata">

**Author:** ![yaustar](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/yaustar/32/2268_2.png) [@yaustar](https://forum.playcanvas.com/u/yaustar)\
**Post date:** [July 26, 2022, 12:26pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/9 "2022-07-26T12:26:16Z")

</div>

WAV could work, it’s just a VERY big file size compared to OGG and MP3

---

<div class="post-metadata">

**Author:** ![eproasim](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/eproasim/32/22818_2.png) [@eproasim](https://forum.playcanvas.com/u/eproasim)\
**Post date:** [July 26, 2022, 6:14pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/10 "2022-07-26T18:14:08Z")

</div>

Hi @SARJ ,

Unfortunately with the way that mp3 files are rendered, a bit of silence is automatically put at the beginning of the file once you export it out of your audio editing program. However, there are apparently methods to creating ‘gapless’ mp3’s. Here is an article explaining one method:

[https://www.compuphase.com/mp3/mp3loops.htm](https://www.compuphase.com/mp3/mp3loops.htm)

I haven’t tried this method myself, but you should check it out and see if it works for you.

---

<div class="post-metadata">

**Author:** ![SARJ](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/sarj/32/22392_2.png) [@SARJ](https://forum.playcanvas.com/u/SARJ)\
**Post date:** [August 3, 2022, 1:45pm UTC](https://forum.playcanvas.com/t/solved-a-looped-engine-sound-sample-plays-with-a-break-on-repeat/26729/11 "2022-08-03T13:45:27Z")

</div>

“I think this way is fine. In the playcanvas editor, I will set the StartTime to 0.2 for example, and add the required interval to the sound file at the beginning.”  
This is what helped me solve the problem.
