2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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 /** @file sound_driver.hpp Base for all sound drivers. */
10 #ifndef SOUND_SOUND_DRIVER_HPP
11 #define SOUND_SOUND_DRIVER_HPP
13 #include "../driver.h"
15 /** Base for all sound drivers. */
16 class SoundDriver
: public Driver
{
18 /** Called once every tick */
19 virtual void MainLoop() {}
22 * Get the currently active instance of the sound driver.
24 static SoundDriver
*GetInstance() {
25 return static_cast<SoundDriver
*>(*DriverFactoryBase::GetActiveDriver(Driver::DT_SOUND
));
29 extern char *_ini_sounddriver
;
31 #endif /* SOUND_SOUND_DRIVER_HPP */