OpenTTD
qtmidi.h
Go to the documentation of this file.
1 /* $Id$ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef MUSIC_MACOSX_QUICKTIME_H
13 #define MUSIC_MACOSX_QUICKTIME_H
14 
15 #include "music_driver.hpp"
16 
18 public:
19  const char *Start(const char * const *param) override;
20 
21  void Stop() override;
22 
23  void PlaySong(const MusicSongInfo &song) override;
24 
25  void StopSong() override;
26 
27  bool IsSongPlaying() override;
28 
29  void SetVolume(byte vol) override;
30  const char *GetName() const override { return "qt"; }
31 };
32 
34 public:
35  FMusicDriver_QtMidi() : DriverFactoryBase(Driver::DT_MUSIC, 5, "qt", "QuickTime MIDI Driver") {}
36  Driver *CreateInstance() const override { return new MusicDriver_QtMidi(); }
37 };
38 
39 #endif /* MUSIC_MACOSX_QUICKTIME_H */
Metadata about a music track.
void SetVolume(byte vol) override
Changes the playing volume of the MIDI player.
Definition: qtmidi.cpp:328
void Stop() override
Stops the MIDI player.
Definition: qtmidi.cpp:236
const char * Start(const char *const *param) override
Initialized the MIDI player, including QuickTime initialization.
Definition: qtmidi.cpp:193
const char * GetName() const override
Get the name of this driver.
Definition: qtmidi.h:30
bool IsSongPlaying() override
Checks whether the player is active.
Definition: qtmidi.cpp:206
A music driver, needs to be before sound to properly shut down extmidi forked music players...
Definition: driver.h:43
Base for all music playback.
Base for all driver factories.
Definition: driver.h:60
void StopSong() override
Stops playing the current song, if the player is active.
Definition: qtmidi.cpp:298
A driver for communicating with the user.
Definition: driver.h:24
void PlaySong(const MusicSongInfo &song) override
Starts playing a new song.
Definition: qtmidi.cpp:265
Driver * CreateInstance() const override
Create an instance of this driver-class.
Definition: qtmidi.h:36
Driver for all music playback.