OpenTTD Source: SoundLoader_Raw Class Reference

OpenTTD Source 15.3

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

Raw PCM sound loader, used as a fallback if other sound loaders fail. More...

Inheritance diagram for SoundLoader_Raw:

## 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 | RAW_SAMPLE_RATE = 11025
| Sample rate of raw pcm samples.
static constexpr uint8_t | RAW_SAMPLE_BITS = 8
| Bit depths of raw pcm samples.

## Static Private Attributes
static SoundLoader_Raw | 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

Raw PCM sound loader, used as a fallback if other sound loaders fail.

Definition at line 18 of file soundloader_raw.cpp.

## Constructor & Destructor Documentation

## ◆ SoundLoader_Raw()

SoundLoader_Raw::SoundLoader_Raw | ( |  | ) |
| inline

Definition at line 20 of file soundloader_raw.cpp.

## Member Function Documentation

## ◆ Load()

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

Implements SoundLoader.

Definition at line 25 of file soundloader_raw.cpp.

## Field Documentation

## ◆ instance

SoundLoader_Raw SoundLoader_Raw::instance {}
| staticprivate

Definition at line 55 of file soundloader_raw.cpp.

## ◆ RAW_SAMPLE_BITS

constexpr uint8_t SoundLoader_Raw::RAW_SAMPLE_BITS = 8
| staticconstexpr

Bit depths of raw pcm samples.

Definition at line 23 of file soundloader_raw.cpp.

## ◆ RAW_SAMPLE_RATE

constexpr uint16_t SoundLoader_Raw::RAW_SAMPLE_RATE = 11025
| staticconstexpr

Sample rate of raw pcm samples.

Definition at line 22 of file soundloader_raw.cpp.

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

- src/soundloader_raw.cpp