OpenTTD Source 20241224-master-gf74b0cf984
soundloader_type.h
Go to the documentation of this file.
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 */
7
10#ifndef SOUNDLOADER_TYPE_H
11#define SOUNDLOADER_TYPE_H
12
13#include "provider_manager.h"
14#include "sound_type.h"
15
17class SoundLoader : public PriorityBaseProvider<SoundLoader> {
18public:
19 SoundLoader(std::string_view name, std::string_view description, int priority) : PriorityBaseProvider<SoundLoader>(name, description, priority)
20 {
22 }
23
24 virtual ~SoundLoader()
25 {
27 }
28
29 virtual bool Load(SoundEntry &sound, bool new_format, std::vector<uint8_t> &data) = 0;
30};
31
32#endif /* SOUNDLOADER_TYPE_H */
The ProviderManager manages a single Provider-type.
Base interface for a SoundLoader implementation.
Definition of the ProviderManager.
Types related to sounds.