So... about this command. When I write:
Audio.bgm_play("Audio/BGM/Airship4min", 80, 100, 120000) The track doesn't begin at the 120000 time (in milliseconds). What am I doing wrong? I tried lots of numbers on the pos parameter but still nothing. It always starts from the beginning :/ Any suggestions?
I am going to assume that this is for VXA since you are posting it in VXA script request board (even though your user info saying your are using MV).
Since you didn't tell us what file format you are using, i am going to assume that you are using non-ogg files.
The positioning only works for ogg file that allows position recording/loop as far as i know. It will not work on mp3 nor midi files.
I'm using VXA.
I'm using .ogg files.
:3
Did a test with it and it works on my side
example script call:
BGM = RPG::BGM.new("Town7", 100, 100)BGM.play(1240000)
Make sure you check your file format is real ogg and not a renamed version. wav format should work too.
Thanks. It kinda worked.
I say "kinda" because I couldn't really calculate the time I was supposed to place there. So I got it using trial and error. But I'm happy now 🙂 Many thanks!
It's pretty weird though since BGM's play method simply calls back the original method you posted...
Oh, you are trying to calculate it using milliseconds? Sorry, misread that part.
The formula you need is:
Seconds * VBR(Variable Bitrate)
the VBR normally used in the RTP's ogg is 176k
so lets say if you want to start around 25 second, you will need to use
BGM.play(4400000)
25 * 176000 = 4400000
that's very useful! Thanks lol 😀