- Home /
Is there a way to loop mp3 files seamlessly?
We are currently using audio wave files, which loop seamlessly. However, due to the nature of their size, we'd much rather use mp3. But when we do, they fail to produce seamless loops. Is there any way to fix this problem? We really do not want to resort to wave files if possible. We want audio files roughly the size of mp3's
Answer by tamerobots · Aug 22, 2017 at 12:56 PM
For anyone reading this in 2017 and onwards, I found that using .ogg files instead of .mp3s works for seamless looping. You can use a free program like Audacity to convert from your source .wav to .ogg.
Obviously this relies on your source audio file actually looping seamlessly in the first place. I used this technique to get seamlessly looping background .ogg files:
Create or Licence a background music loop to use.
Use Winamp to test whether the music file actually loops seamlessly (I have seen reports that programs like Windows Media Player and others don't correctly loop audio seamlessly).
If it loops seamlessly, use Audacity to convert it from .wav to .ogg
Listen to the .ogg file in Winamp file to test that it still loops perfectly.
Include the file in your project and get it looping.
Test it sounds OK on the various platforms you are aiming for (I have seen reports that music may not loop correctly on iOS, but loops fine on Android, or example).
Good luck.
Answer by nesis · Jan 23, 2014 at 02:57 AM
Check out AudioSource.PlayScheduled(double time), it does exactly what you're wanting by pre-loading the AudioClip.
Your answer
Follow this Question
Related Questions
NEED HELP! Wave spawner just wont work!,NEED HELP! Wave spawner not working :( 2 Answers
What tools exist to make an MP3 seamlessly loop? 10 Answers
Why Won't My Audioclip Loop Seamlessly? 1 Answer
Sound pause on audio loop? 2 Answers
Audio loops too early 2 Answers