Hi folks. I hope I'm asking about this in the right place--if not, my apologies. I'm working with a company to bring their game to iPhone. It's been around for a while on Windows and still uses MIDI playback for its music. There doesn't seem to be any native MIDI support on iPhone, but ScummVM seems to handle MIDI playback.
I was hoping somebody could point me in the right direction. How is MIDI playback accomplished in ScummVM on iPhone? Is there any actual native MIDI support, or is it all done in ScummVM?
Thanks much,
Jonathan Grynspan
MIDI playback on iPhone
Moderator: ScummVM Team
- Vinterstum
- ScummVM Developer
- Posts: 580
- Joined: Sun Oct 16, 2005 6:59 am
Re: MIDI playback on iPhone
ScummVM handles all audio decoding internally, unfortunately (the iPhone port does, anyway). The only native interface it uses (soundwise) is AudioQueue to output a raw audio stream.Jonathan Grynspan wrote:Hi folks. I hope I'm asking about this in the right place--if not, my apologies. I'm working with a company to bring their game to iPhone. It's been around for a while on Windows and still uses MIDI playback for its music. There doesn't seem to be any native MIDI support on iPhone, but ScummVM seems to handle MIDI playback.
I was hoping somebody could point me in the right direction. How is MIDI playback accomplished in ScummVM on iPhone? Is there any actual native MIDI support, or is it all done in ScummVM?
Thanks much,
Jonathan Grynspan
CoreAudio on the iPhone has a reference to kAudioFormatMIDIStream in its header files, but that may or may not be functional . Haven't seen anyone using it.
-
- Posts: 3
- Joined: Sun Aug 31, 2008 3:32 pm
Thanks for the reply. Unfortunately, kAudioFormatMIDIStream is very much non-functional on iPhone -- it looks like the system-level support just isn't there. I guess Apple figures anybody using an iPhone is going to want MP3 music, not MIDI.
Do you think it would be possible to adapt ScummVM's MIDI synthesizer for use outside ScummVM? I'm not fluent in C++ so I'm not sure how complex or feasible that activity would be.
Do you think it would be possible to adapt ScummVM's MIDI synthesizer for use outside ScummVM? I'm not fluent in C++ so I'm not sure how complex or feasible that activity would be.
We don't really have a MIDI synthesizer -- rather, we have some hacky old code which uses our Adlib (FM OPL) audio generator to "emulate" MIDI. Which is better than nothing, but really far from being a true MIDI synth .
One could try to get fluidsynth running on the iPhone, though I have my doubts whether it has the required CPU power. Then again, maybe I underestimate the iPhone / overestimate fluidsynth's needs, so it would be worth a try.
One could try to get fluidsynth running on the iPhone, though I have my doubts whether it has the required CPU power. Then again, maybe I underestimate the iPhone / overestimate fluidsynth's needs, so it would be worth a try.
-
- Posts: 3
- Joined: Sun Aug 31, 2008 3:32 pm