|
OpenTTD Source 20260815-master-gdf55704e7d
|
Base interface for a SoundResampler implementation. More...
#include <soundresampler_type.h>
Public Member Functions | |
| SoundResampler (std::string_view name, std::string_view description, int priority) | |
| Create the provider. | |
| virtual | ~SoundResampler () |
| Unregister this sound resampler. | |
| virtual bool | Resample (SoundEntry &sound, uint32_t play_rate) const =0 |
| Resample a loaded sound. | |
| Public Member Functions inherited from PriorityBaseProvider< SoundResampler > | |
| constexpr | PriorityBaseProvider (std::string_view name, std::string_view description, int priority) |
| Create the provider. | |
| int | GetPriority () const |
| Get the priority of this provider. | |
| Public Member Functions inherited from BaseProvider< SoundResampler > | |
| constexpr | BaseProvider (std::string_view name, std::string_view description) |
| Create the provider. | |
| virtual | ~BaseProvider ()=default |
| Ensure the destructor of the sub classes are called as well. | |
| std::string_view | GetName () const |
| Get the name of this provider. | |
| std::string_view | GetDescription () const |
| Get a description of this provider. | |
Additional Inherited Members | |
| Protected Attributes inherited from PriorityBaseProvider< SoundResampler > | |
| const int | priority |
| The priority of this provider. | |
| Protected Attributes inherited from BaseProvider< SoundResampler > | |
| const std::string_view | name |
| The name of the provider. | |
| const std::string_view | description |
| A description of the provider. | |
Base interface for a SoundResampler implementation.
Definition at line 17 of file soundresampler_type.h.
|
inline |
Create the provider.
| name | The name of the provider. |
| description | A description of the provider. |
| priority | The priority number to sort all providers by. |
Definition at line 20 of file soundresampler_type.h.
References BaseProvider< SoundResampler >::description, BaseProvider< SoundResampler >::name, PriorityBaseProvider< SoundResampler >::priority, PriorityBaseProvider< SoundResampler >::PriorityBaseProvider(), and SoundResampler().
Referenced by SoundResampler(), and SoundResampler_Soxr::SoundResampler_Soxr().
|
inlinevirtual |
Unregister this sound resampler.
Definition at line 26 of file soundresampler_type.h.
|
pure virtual |
Resample a loaded sound.
| sound | The sound to resample. |
| play_rate | The new sample rate. |
true iff the sound was resampled. Implemented in SoundResampler_Soxr.