Index: src/music/extmidi.cpp =================================================================== --- src/music/extmidi.cpp (revision 25077) +++ src/music/extmidi.cpp (working copy) @@ -79,7 +79,7 @@ void MusicDriver_ExtMidi::SetVolume(byte vol) { - DEBUG(driver, 1, "extmidi: set volume not implemented"); + this->volume = vol; } void MusicDriver_ExtMidi::DoPlay() @@ -87,13 +87,15 @@ this->pid = fork(); switch (this->pid) { case 0: { + char strvol[] = "-A000"; + sprintf(strvol, "-A%i", this->volume * 6); close(0); int d = open("/dev/null", O_RDONLY); if (d != -1 && dup2(d, 1) != -1 && dup2(d, 2) != -1) { #if defined(MIDI_ARG) - execlp(this->command, "extmidi", MIDI_ARG, this->song, (char*)0); + execlp(this->command, "extmidi", MIDI_ARG, this->song, strvol, (char*)0); #else - execlp(this->command, "extmidi", this->song, (char*)0); + execlp(this->command, "extmidi", this->song, strvol, (char*)0); #endif } _exit(1); Index: src/music/extmidi.h =================================================================== --- src/music/extmidi.h (revision 25077) +++ src/music/extmidi.h (working copy) @@ -19,6 +19,7 @@ char *command; char song[MAX_PATH]; pid_t pid; + byte volume; void DoPlay(); void DoStop();