kionell / osu-parsers

A bundle of decoders/encoders for osu! file formats based on the osu!lazer source code.
MIT License
38 stars 8 forks source link

Encoding a beatmap with video does not write the video to the encoded string/file. #11

Closed maotovisk closed 1 year ago

maotovisk commented 1 year ago

I'm building a cross-platform hitsound copier and i got into some undefined behaviour after encoding a beatmap with video.

Debug info of BeatmapEventSection right before calling encoder.encodeToString() Generated content in the .osu
image image

Code used to encode it.

  const hitsoundedBeatmap = beatmapsTo.map((beatmap) =>
    copyHitsounds(beatmapFrom, beatmap, options)
  );

  const encoder = new BeatmapEncoder();

  const encodedHitsoundedBeatmaps = hitsoundedBeatmap.map((beatmap) =>
    encoder.encodeToString(beatmap)
  );