Fix: Restore ability to disable service interval
[openttd-github.git] / src / sound / allegro_s.h
blob1026038355319abab1c9e06148814846dfb81a80
1 /*
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/>.
6 */
8 /** @file allegro_s.h Base for playing sound via Allegro. */
10 #ifndef SOUND_ALLEGRO_H
11 #define SOUND_ALLEGRO_H
13 #include "sound_driver.hpp"
15 /** Implementation of the allegro sound driver. */
16 class SoundDriver_Allegro : public SoundDriver {
17 public:
18 std::optional<std::string_view> Start(const StringList &param) override;
20 void Stop() override;
22 void MainLoop() override;
23 std::string_view GetName() const override { return "allegro"; }
26 /** Factory for the allegro sound driver. */
27 class FSoundDriver_Allegro : public DriverFactoryBase {
28 public:
29 FSoundDriver_Allegro() : DriverFactoryBase(Driver::DT_SOUND, 4, "allegro", "Allegro Sound Driver (param hz,samples)") {}
30 Driver *CreateInstance() const override { return new SoundDriver_Allegro(); }
33 #endif /* SOUND_ALLEGRO_H */