OpenBVE
OpenBVE copied to clipboard
[Bug] BVE5 motor tables not working correctly
Description
Attaching BVE5 motor sound via car's xml file produces erratic sounds or (sometimes) crashes.
Reproduction
Test train: https://cdn.discordapp.com/attachments/1172533635115663360/1172534016461787237/TKK9000.rar
Related information
Stable version 1.9.2.2
Fixed the crash.
I think the erratic sound you're referring to is the little blip when it moves off? Trying to get to the bottom of that one.
That and lack of any other motor sound after that blip.
OK, give it a try with the build from today. Original code tried to be a little too clever....
Not going to guarantee that this is currently right (specifically, looking at it again, I suspect the interpolation needs tweaking where the sound is set to zero volume in the next step), but now has some sounds.
Seems to be working now, except sound tables with (apparently) sound indexes exceeding 15 are still broken (similarly to before, no sound other than a rapidly rising pitch blip within first few km/h). Will do more testing to see how finer details like interpolation and volume consistency work on those tables that seem fine now.
Lil update, it's still broken for seemingly all trains aside from in the very start (like on the train I've attached), pitch seems to be matching but only for that very first sample.