I am having a strange problem with tempo. I'm working on a huge upgrade to my MIDI player, including change to x64 and involving VSTi using BASS_VST. I'm investigating the reason why all my tempos are reporting 120bpm, which tracks back to BASS_MIDI_StreamGetEvent(chan, 0, MIDI_EVENT_TEMPO) returning 500000 every time. The MIDI file still plays at the right speed. I checked back against my previous version, and the same line returns 750000 for the particular MIDI file I'm using to investigate this. Because there are so many changes I've made, I edited my startup code in both versions to ...
chan = BASS_MIDI_StreamCreateFile(FALSE, lpszMIDIFile, 0, 0, BASS_MIDI_DECAYEND | floatable | (pCurrentSong->getEffects() ? 0 : BASS_MIDI_NOFX) | BASS_MIDI_SINCINTER, 44100);
tempobase = BASS_MIDI_StreamGetEvent(chan, 0, MIDI_EVENT_TEMPO);
For the same MIDI file, my old version returns 750000 but my new version returns 500000. I've changed from x32 (old version) to x64. I've linked in BASS_VST, but in this code sequence it isn't referenced. Any thoughts on what could explain this behaviour?