OpenBVE icon indicating copy to clipboard operation
OpenBVE copied to clipboard

[Bug] BVE5 motor tables not working correctly

Open hotdamndel opened this issue 1 year ago • 5 comments

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

hotdamndel avatar Nov 10 '23 13:11 hotdamndel

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.

leezer3 avatar Nov 10 '23 20:11 leezer3

That and lack of any other motor sound after that blip.

hotdamndel avatar Nov 11 '23 23:11 hotdamndel

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.

leezer3 avatar Nov 12 '23 19:11 leezer3

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.

hotdamndel avatar Nov 12 '23 21:11 hotdamndel

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.

hotdamndel avatar Nov 12 '23 21:11 hotdamndel