Quote from: openbor manual
music {path} {offset}
~Optional.
~{path} points to a .bor music file which will be played during the stage.
~{offset} is position in bytes music will return to when it loops. For instance, with a .bor file with 128000 byte size, setting offset to 64000 would make music loop from halfway of the music.
This is not accurate because bor has a 160 byte header. So the total length should be 128000-160.
But what about ogg files? They are encoded in a different way than adpcm, so it is not accurate to count position in bytes. Instead, the position is calculated in samples.
Let's see an example. data/music/level1.ogg file is 5 minutes in length, it has a 15 second prelude, all the rest part should be played looping. What do we do?
First of all, we need to calculate things in samples. Now open the file in a music player or editor. I prefer audicity. Goldwave may work, but I'm not familiar with it. The goal is get the time as accuracy as possible. Audicity can show position in samples, so it is easier to handle. Something winamp doesn't work well because you can only see the time in seconds.
Secondly, check sampling rate of the ogg. Any music player will do. For example, 44.1kHz, 22.1kHz, ... Let's say, 44100.
Now pause the music at the point where it begins the loop. Say, if it shows 15.567 seconds, then the time in samples should be 44100x15.567 = 686504. If you are using audicity, should already have the result.
music data/music/level1.ogg 686504
That is it. It is easier to say. You may need to cut and trim the music many times before you get desired result.
BTW, you need to download build 3893 or above to make it work properly. Old versions have a bug so you may need to use 686504/2=343252 instead.
Here is one example ogg:
https://www.dropbox.com/s/3a4fabny3v3igay/nw-235416.ogg