Window MIDI device selection (Dev question)

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
PelleBert
Posts: 6
Joined: Sat Jul 18, 2009 11:07 am

Window MIDI device selection (Dev question)

Post by PelleBert »

Hi!

I've been using scummvm for a while on my windows server 2008 machine but unfortunately had some trouble using the windows MIDI driver. The problem arising is basically the same as for the Vista people. Scummvm uses the MIDI mapper as default output, while the controls for the MIDI mapper is removed in the os. There are some cumbersome methods to change MIDI mapper routings in Vista, but unfortunately I can't seem to get them to work in WS2008.

This problem can solved really easy in the code though by picking the desired midi output port there. I've written a small proof of concept code, but before I submit a patch I have a couple of questions. If these are better asked somewhere else, please point me in the right direction.

1. In the Wiki there is talk about a music driver redesign. Iis this something that is going to happen soon? If so, where can I find the "new" code so I can write an implementation for it.

2. How should the user be able to pick a desired MIDI device? Using the GUI? Using commandline parameters? Both? My guess is that using the GUI is currently not desired until the new music system is complete.

3. In the MusicPluginObject there is a function called getDevices() which returns all sub-devices for a music driver which is ideal for this purpose. This function does not seem to be used anywhere however, I'm i missing something?

Thanks for any help and thanks for ScummVM!
Collector
Posts: 549
Joined: Sun Oct 30, 2005 6:58 pm
Contact:

Post by Collector »

Google Putzlowitsch's Vista-MIDI Mapper
PelleBert
Posts: 6
Joined: Sat Jul 18, 2009 11:07 am

Post by PelleBert »

Collector wrote:Google Putzlowitsch's Vista-MIDI Mapper
Yeah, unfortunately it doesn't work fully in WS2008. And I also can't se how installing third party control panel applets, which globally changes OS behaviour, is easier than having the ability to choose device right in scummvm. Especially since it is trivial to implement and still keep the MIDI mapper behaviour as a default device. This will benefit XP (+ older) users as well.
Collector
Posts: 549
Joined: Sun Oct 30, 2005 6:58 pm
Contact:

Post by Collector »

PelleBert wrote:Yeah, unfortunately it doesn't work fully in WS2008.
I don't know if this is the problem, but if you have 64 bit Windows, it will be in your 32 bit Control Panel.
PelleBert
Posts: 6
Joined: Sat Jul 18, 2009 11:07 am

Post by PelleBert »

Collector wrote:
PelleBert wrote:Yeah, unfortunately it doesn't work fully in WS2008.
I don't know if this is the problem, but if you have 64 bit Windows, it will be in your 32 bit Control Panel.
No, that is not problem. It has probably something to do with differences where the midi mapper information is stored in the registry between the os:es.

I don't need any help on getting midi to work on my computer. My point is that there is a simple Windows version-independent way of selecting midi device if it is done inside of the windows MIDI driver in scummvm. But if there is no interest in having this functionality (i can't understand why) then i guess there is no need to complete a public patch.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3550
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

PelleBert wrote:But if there is no interest in having this functionality (i can't understand why) then i guess there is no need to complete a public patch.
Only some of the developers run Windows. I would interpret that as a lack of the necessary knowledge, not as a lack of interest.
PelleBert
Posts: 6
Joined: Sat Jul 18, 2009 11:07 am

Post by PelleBert »

eriktorbjorn wrote:
PelleBert wrote:But if there is no interest in having this functionality (i can't understand why) then i guess there is no need to complete a public patch.
Only some of the developers run Windows. I would interpret that as a lack of the necessary knowledge, not as a lack of interest.
Which is why I offer to help :)

As i said above, my question is more about how this functionality, if added to scummvm, should be configured by the user. Since I'm new to working with the scummvm code, I have no idea how this type of functionality should be implemented so it best fits.
PelleBert
Posts: 6
Joined: Sat Jul 18, 2009 11:07 am

Post by PelleBert »

I have now posted a patch which allows for changing midi device through the commandline.
User avatar
Kaminari
Posts: 275
Joined: Mon Oct 24, 2005 2:25 am
Location: Paris, France
Contact:

Post by Kaminari »

User avatar
tareon
Posts: 15
Joined: Tue Apr 10, 2007 1:43 am
Location: Germany

Post by tareon »

Would be great if this could make it into the GUI.

Dumb question: How do I (enduser, not dev) use the patch or is this a dev-only thing?
Please forgive my lack of knowledge.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3550
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

tareon wrote: Dumb question: How do I (enduser, not dev) use the patch or is this a dev-only thing?
The patch is applied to the source code, which then has to be compiled into an executable. Of course, if the patch is accepted it will become part of the mainstream version of ScummVM.

(Since I don't run Windows myself, I have no opinions whatsoever about the patch itself.)
User avatar
tareon
Posts: 15
Joined: Tue Apr 10, 2007 1:43 am
Location: Germany

Post by tareon »

Ah, I expected something like that. Thanks for explanation.
Post Reply