Audio reader for decoding audio data to raw PCM wave data. This class is intended for reading audio samples (e.g., for analysis, visualization, or custom processing) and does not support direct playback.
More...
#include <Engine/CAudioReader.h>
|
|
| CAudioReader (IStream *stream, IAudioDecoder::EDecoderType type, ISoundDriver *driver) |
|
| CAudioReader (const char *file, ISoundDriver *driver) |
|
void | initReader () |
| | Initialize the reader and create the appropriate decoder.
|
| EStatus | initDecoder () |
| | Initialize the decoder.
|
| EStatus | readAudio (unsigned char *data, int size) |
| | Read and decode audio data into a buffer as raw PCM samples.
|
| IAudioDecoder::EDecoderType | getDecoderType () |
| | Get the decoder type.
|
| IAudioDecoder * | getDecoder () |
| | Get the underlying decoder.
|
| IStream * | getStream () |
| | Get the underlying stream.
|
| ISoundSource::ESourceState | getState () |
| | Get the current state of the reader.
|
|
|
bool | m_isError |
|
int | m_initState |
|
IAudioDecoder * | m_decoder |
|
ISoundDriver * | m_driver |
|
IMutex * | m_mutex |
|
IStream * | m_stream |
|
ISoundSource::ESourceState | m_state |
|
IAudioDecoder::EDecoderType | m_decodeType |
Audio reader for decoding audio data to raw PCM wave data. This class is intended for reading audio samples (e.g., for analysis, visualization, or custom processing) and does not support direct playback.
◆ getDecoder()
◆ getDecoderType()
| IAudioDecoder::EDecoderType Skylicht::Audio::CAudioReader::getDecoderType |
( |
| ) |
|
|
inline |
Get the decoder type.
- Returns
- EDecoderType
◆ getState()
| ISoundSource::ESourceState Skylicht::Audio::CAudioReader::getState |
( |
| ) |
|
|
inline |
Get the current state of the reader.
- Returns
- ESourceState
◆ getStream()
| IStream * Skylicht::Audio::CAudioReader::getStream |
( |
| ) |
|
|
inline |
Get the underlying stream.
- Returns
- Pointer to IStream
◆ initDecoder()
| EStatus Skylicht::Audio::CAudioReader::initDecoder |
( |
| ) |
|
Initialize the decoder.
- Returns
- Status of the initialization
◆ readAudio()
| EStatus Skylicht::Audio::CAudioReader::readAudio |
( |
unsigned char * | data, |
|
|
int | size ) |
Read and decode audio data into a buffer as raw PCM samples.
- Parameters
-
| data | The destination buffer to store PCM data |
| size | The amount of data to read in bytes |
- Returns
- Status of the read operation
The documentation for this class was generated from the following file: