IMUSE: Pitchbend isn't reset when changing tracks
|Reported by:||eriktorbjorn||Owned by:||SF/jamieson630|
This bug report will describe a specific case in Fate
of Atlantis, but it probably applies to iMUSE in general.
While walking around the outer circle of Atlantis, I
suddenly noticed that one of the parts was way out of
tune. It turned out that it had a pretty large
_pitchbend value. If I set it to 0 it sounded fine again.
I believe I've figured out what must have happend. I
even managed to reproduce it once, but it's tricky:
There seem to be three different tracks, numbered 0, 1
and 2, which are picked randomly when entering a room.
Changing tracks is done with the Player::scan() function.
Track 1 starts using pitchbend after about 35-40
seconds. The part that is being bent is very audible in
track 0. I entered a room, getting track 0, left the
room, and re-entered it again after not quite 37
seconds, this time getting track 0. By timing it just
right - this took several attempts - I managed to get
the change to happen in mid-pitchbend.
If the track had been allowed to continue on its own,
it would have reset the pitchbend to 0 of course. But
since the track changed, this never happened.
So, to summarize, there is a problem, I know how to
reproduce it (though I may not be able to do so at
will), and I have a good guess on how to fix it. But
I'd prefer if someone who actually understands the
iMUSE code would do it. Particularly since there may be
related bugs there as well.
(I can provide a savegame, I just forgot to bring one.)
Ticket imported from: #780924. Ticket imported from: bugs/1092.