xyonico / BeatSaberSongLoader

A plugin for adding custom songs into Beat Saber
MIT License
238 stars 38 forks source link

BPM loaded incorrectly - e.g. 1.2815E+16 #18

Closed FelixFifi closed 6 years ago

FelixFifi commented 6 years ago

Version: Beat Saber v0.11.1 Song Loader 4.2

How to reproduce:

  1. Download Waiting for love - Avicii
  2. Play the song
  3. All notes skip you or run into you at the very beginning

image

Possible cause: BPM is set to a float "_beatsPerMinute":128.14999389648438,

FelixFifi commented 6 years ago

The value seems to be off by the factor 10^14 while the digits are the same as in the json file.

xyonico commented 6 years ago

This has been fixed with this commit https://github.com/xyonico/BeatSaberSongLoader/commit/7af0d1f4419defb5f3fa13d8baea349b99c084c0

The problem was I wasn't stating a specific culture when converting the text to number, so for some system languages a decimal is separated with commas instead of periods.

I'll close this issue when the release is out.

xyonico commented 6 years ago

This is been fixed with this release: https://github.com/xyonico/BeatSaberSongLoader/releases/tag/v4.2.2

FelixFifi commented 6 years ago

Thank you 👍 I know that problem from my .NET projects :/

PS: Sorry for the duplicate issue 🙈