OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
11 #include "../openttd.h"
13 #include "midifile.hpp"
14 #include "../base_media_base.h"
24 #include "../safeguards.h"
46 return mciSendString(buf,
nullptr, 0,
nullptr, 0);
57 if (filename.empty())
return;
59 if (
MidiSendCommand(
"open %s type sequencer alias song", filename.c_str()) != 0) {
79 mciSendString(
"status song mode", buf,
sizeof(buf),
nullptr, 0);
80 return strcmp(buf,
"playing") == 0 || strcmp(buf,
"seeking") == 0;
static long CDECL MidiSendCommand(const char *cmd,...)
Send a midi command.
bool IsSongPlaying() override
Are we currently playing a song?
const char * Start(const StringList ¶m) override
Start this driver.
void PlaySong(const MusicSongInfo &song) override
Play a particular song.
void SetVolume(byte vol) override
Set the volume, if possible.
Factory for OS/2's music player.
Metadata about a music track.
std::vector< std::string > StringList
Type for a list of strings.
int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap)
Safer implementation of vsnprintf; same as vsnprintf except:
static std::string GetSMFFile(const MusicSongInfo &song)
Get the name of a Standard MIDI File for a given song.
void Stop() override
Stop this driver.
void StopSong() override
Stop playing the current song.
#define lastof(x)
Get the last element of an fixed size array.
static FMusicDriver_OS2 iFMusicDriver_OS2
OS/2's music player's factory.