PDA

View Full Version : Game->GetMIDI() / Game->PlayMIDI()



pkmnfrk
05-04-2009, 10:35 PM
Game->GetMIDI() currently returns 1 - 7 6 if it's a built in MIDI, or >= 8 7 if it's a custom MIDI. It returns 0 if there's no music playing.

Game->PlayMIDI() accepts 0 for no music, or >= 1 for custom music. I do not know if you can play built in MIDIs via this command.

Here's a better idea:

Have Game->GetMIDI() return 0 for no music, >= 1 for custom music, and <= -1 for built in music. Have Game->PlayMIDI() accept the same parameters. That way, you can pass Game->GetMIDI() directly to Game->PlayMIDI(), and have it work as expected. (Or, more likely, save the result of Game->GetMIDI(), and feed it to Game->PlayMIDI() later)

Joe123
05-05-2009, 05:54 AM
So subtract 6 from the current midi before returning the function?
That's probably a good idea.

Dark Nation
05-05-2009, 08:28 AM
So PlayMIDI won't play built-in MIDIs?

pkmnfrk
05-05-2009, 09:01 AM
I don't know. currently, it plays custom ones, starting from 1. I've never tried passing negative values.

_L_
05-07-2009, 06:28 AM
OK, done.