12 #include "../stdafx.h" 13 #include "../openttd.h" 15 #include "midifile.hpp" 16 #include "../base_media_base.h" 26 #include "../safeguards.h" 48 return mciSendString(buf, NULL, 0, NULL, 0);
59 if (filename.empty())
return;
61 if (
MidiSendCommand(
"open %s type sequencer alias song", filename.c_str()) != 0) {
81 mciSendString(
"status song mode", buf,
sizeof(buf), NULL, 0);
82 return strcmp(buf,
"playing") == 0 || strcmp(buf,
"seeking") == 0;
Metadata about a music track.
Base for OS2 music playback.
int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap)
Safer implementation of vsnprintf; same as vsnprintf except:
#define lastof(x)
Get the last element of an fixed size array.
Factory for OS/2's music player.
bool IsSongPlaying()
Are we currently playing a song?
const char * Start(const char *const *param)
Start this driver.
static long CDECL MidiSendCommand(const char *cmd,...)
Send a midi command.
void PlaySong(const MusicSongInfo &song)
Play a particular song.
void Stop()
Stop this driver.
static std::string GetSMFFile(const MusicSongInfo &song)
Get the name of a Standard MIDI File for a given song.
void StopSong()
Stop playing the current song.
void SetVolume(byte vol)
Set the volume, if possible.
static FMusicDriver_OS2 iFMusicDriver_OS2
OS/2's music player's factory.