Hello,
i have a EMU10K1-Based soundcard (SB-Live!), which has hardware-midiplay. Instead of tmidity I can use "playmidi -a" to play midi-files in hardware and save on or two cpu-cycles.
I can read that in extmidi.c is a #defined EXTERNAL_PLAYER. To use playmidi, i had to change the execl-function too by adding a "-a" parameter.
Furtermore before playing any midi-song, a soundfont has to be loaded into the card by "sfxload".
I am thinking about a morge general way to specify the midi-player. What about a config-entry like
midiplayer="command -options %s"
or someting like that instead of hardcoding the command into the programm?[/code]
playmidi instead of tmidity [linux]
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 75
- Joined: 10 Jun 2004 12:46
no, it won't work, i tried that.
the problem is, that execl needs each argument for the new process as a separate parameter.
So execl ("playmidi -a", "extmidi", filename, NULL); will not work. execl does not parse the first parameter. One might even wants to start an executable with whitespaces in the name.
execl("playmidi", "extmidi", "-a", filename, NULL); works
the system-call named "system" calls /bin/sh which parses its arguments, but i believe it won't raise SIGCHLD, but just block.
Chris
the problem is, that execl needs each argument for the new process as a separate parameter.
So execl ("playmidi -a", "extmidi", filename, NULL); will not work. execl does not parse the first parameter. One might even wants to start an executable with whitespaces in the name.
execl("playmidi", "extmidi", "-a", filename, NULL); works
the system-call named "system" calls /bin/sh which parses its arguments, but i believe it won't raise SIGCHLD, but just block.
Chris
Who is online
Users browsing this forum: No registered users and 6 guests