OpenTTD: src/music/music_driver.hpp Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

music_driver.hpp
Go to the documentation of this file.
1 /* $Id: music_driver.hpp 26538 2014-04-28 21:06:51Z rubidium $ */
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_MUSIC_DRIVER_HPP
13 #define MUSIC_MUSIC_DRIVER_HPP
14
15 #include "../driver.h"
16
18 class MusicDriver : public Driver {
19 public:
24 virtual void PlaySong(const char *filename) = 0;
25
29 virtual void StopSong() = 0;
30
35 virtual bool IsSongPlaying() = 0;
36
41 virtual void SetVolume(byte vol) = 0;
42
46 static MusicDriver *GetInstance() {
47 return static_cast<MusicDriver*>(*DriverFactoryBase::GetActiveDriver(Driver::DT_MUSIC));
48 }
49 };
50
51 extern char *_ini_musicdriver;
52
53 #endif /* MUSIC_MUSIC_DRIVER_HPP */