src/music/os2_m.cpp
changeset 6573 7624f942237f
parent 5835 e0ff603ae0b7
child 6720 35756db7e577
equal deleted inserted replaced
6572:e35266003390 6573:7624f942237f
    38 		return;
    38 		return;
    39 
    39 
    40 	MidiSendCommand("play song from 0");
    40 	MidiSendCommand("play song from 0");
    41 }
    41 }
    42 
    42 
    43 static void OS2MidiStopSong(void)
    43 static void OS2MidiStopSong()
    44 {
    44 {
    45 	MidiSendCommand("close all");
    45 	MidiSendCommand("close all");
    46 }
    46 }
    47 
    47 
    48 static void OS2MidiSetVolume(byte vol)
    48 static void OS2MidiSetVolume(byte vol)
    49 {
    49 {
    50 	MidiSendCommand("set song audio volume %d", ((vol/127)*100));
    50 	MidiSendCommand("set song audio volume %d", ((vol/127)*100));
    51 }
    51 }
    52 
    52 
    53 static bool OS2MidiIsSongPlaying(void)
    53 static bool OS2MidiIsSongPlaying()
    54 {
    54 {
    55 	char buf[16];
    55 	char buf[16];
    56 	mciSendString("status song mode", buf, sizeof(buf), NULL, 0);
    56 	mciSendString("status song mode", buf, sizeof(buf), NULL, 0);
    57 	return strcmp(buf, "playing") == 0 || strcmp(buf, "seeking") == 0;
    57 	return strcmp(buf, "playing") == 0 || strcmp(buf, "seeking") == 0;
    58 }
    58 }
    60 static const char *OS2MidiStart(const char * const *parm)
    60 static const char *OS2MidiStart(const char * const *parm)
    61 {
    61 {
    62 	return 0;
    62 	return 0;
    63 }
    63 }
    64 
    64 
    65 static void OS2MidiStop(void)
    65 static void OS2MidiStop()
    66 {
    66 {
    67 	MidiSendCommand("close all");
    67 	MidiSendCommand("close all");
    68 }
    68 }
    69 
    69 
    70 const HalMusicDriver _os2_music_driver = {
    70 const HalMusicDriver _os2_music_driver = {