OpenTTD Source: SoundLoader_Wav Class Reference

OpenTTD Source 15.3

Public Member Functions | Static Public Attributes | Static Private Attributes
SoundLoader_Wav Class Reference

Wav file (RIFF/WAVE) sound loader. More...

Inheritance diagram for SoundLoader_Wav:

## Public Member Functions
bool | Load (SoundEntry &sound, bool new_format, std::vector< std::byte > &data) const override
Public Member Functions inherited from SoundLoader
| SoundLoader (std::string_view name, std::string_view description, int priority)
Public Member Functions inherited from PriorityBaseProvider< SoundLoader >
constexpr | PriorityBaseProvider (std::string_view name, std::string_view description, int priority)
int | GetPriority () const
Public Member Functions inherited from BaseProvider< T >
constexpr | BaseProvider (std::string_view name, std::string_view description)
std::string_view | GetName () const
std::string_view | GetDescription () const

## Static Public Attributes
static constexpr uint16_t | DEFAULT_SAMPLE_RATE = 11025

## Static Private Attributes
static SoundLoader_Wav | instance {}

## Additional Inherited Members
Protected Attributes inherited from PriorityBaseProvider< SoundLoader >
const int | priority
Protected Attributes inherited from BaseProvider< T >
const std::string_view | name
const std::string_view | description

## Detailed Description

Wav file (RIFF/WAVE) sound loader.

Definition at line 20 of file soundloader_wav.cpp.

## Constructor & Destructor Documentation

## ◆ SoundLoader_Wav()

SoundLoader_Wav::SoundLoader_Wav | ( |  | ) |
| inline

Definition at line 22 of file soundloader_wav.cpp.

## Member Function Documentation

## ◆ Load()

bool SoundLoader_Wav::Load | ( | SoundEntry & | sound,
|  | bool | new_format,
|  | std::vector< std::byte > & | data
| ) |  | const
| inlineoverridevirtual

Implements SoundLoader.

Definition at line 26 of file soundloader_wav.cpp.

## Field Documentation

## ◆ DEFAULT_SAMPLE_RATE

constexpr uint16_t SoundLoader_Wav::DEFAULT_SAMPLE_RATE = 11025
| staticconstexpr

Definition at line 24 of file soundloader_wav.cpp.

## ◆ instance

SoundLoader_Wav SoundLoader_Wav::instance {}
| staticprivate

Definition at line 117 of file soundloader_wav.cpp.

The documentation for this class was generated from the following file:

- src/soundloader_wav.cpp