MagmarFire / Enso-Music-Player

A simple, free music looping system for Unity 3D.
MIT License
13 stars 2 forks source link

Length issue with MP3 #16

Closed MagmarFire closed 6 years ago

MagmarFire commented 6 years ago

Caching MP3 files results in a length error. It implies there's something wrong with the way the number of samples is calculated. Could it be a problem with lossy formats in general?

MagmarFire commented 6 years ago

The issue was due to a stupid mistake on my part; when converting the song file to an MP3, Audacity lowered the frequency. This caused the overall sample length of the song to be set to a lower value, but the metadata was still at the larger values.

Word to the wise: When converting song files to another format, be sure the frequency didn't change. If it did, the metadata must also change, or the loop points will be wrong.