Streaming audio decoder (medialoader-backed). Owns the raw encoded bytes and decodes incrementally via decode(). 更多...
#include <Decoder.h>
Public 成员函数 | |
| Decoder (std::unique_ptr< medialoader::Decoder > impl, std::vector< char > ownedData) | |
| Wraps a medialoader decoder and the encoded bytes it needs. | |
| ~Decoder () override | |
| Decoder * | clone () const |
| Duplicates the decoder (each clone keeps its own position). | |
| int | decode () |
| Decodes the next chunk; returns bytes produced (0 = end/error). | |
| int | getSize () const |
| Bytes decoded so far into the internal buffer. | |
| void * | getBuffer () const |
| Internal decoded buffer. | |
| bool | seek (double seconds) |
| Seeks to a time in seconds; false when unsupported. | |
| bool | rewind () |
| Rewinds to the start; false when unsupported. | |
| bool | isSeekable () |
| True when seeking is supported. | |
| bool | isFinished () |
| True when the stream is fully decoded. | |
| int | getChannelCount () const |
| Format metadata. | |
| int | getBitDepth () const |
| int | getSampleRate () const |
| double | getDuration () |
| Total duration in seconds. | |
| medialoader::Decoder * | getImpl () |
| Underlying medialoader decoder (advanced). | |
Public 成员函数 继承自 eve::Object | |
| Object () | |
| void | setUpdate (Object *update) |
| Update the current object with a replacement. You don't need to care about the reference to the old object since it will be automatically updated in the ref smart pointer. | |
额外继承的成员函数 | |
Protected 成员函数 继承自 eve::Object | |
| virtual | ~Object () |
| bool | isDirty () const |
| Object * | getUpdate () const |
| void | ref () |
| void | unref () |
Protected 属性 继承自 eve::Object | |
| Object * | update |
| unsigned | ref_count = 0 |
详细描述
Streaming audio decoder (medialoader-backed). Owns the raw encoded bytes and decodes incrementally via decode().
构造及析构函数说明
◆ Decoder()
| eve::sound::Decoder::Decoder | ( | std::unique_ptr< medialoader::Decoder > | impl, |
| std::vector< char > | ownedData | ||
| ) |
Wraps a medialoader decoder and the encoded bytes it needs.
在文件 Decoder.cpp 第 9 行定义.
◆ ~Decoder()
|
overridedefault |
成员函数说明
◆ clone()
| Decoder * eve::sound::Decoder::clone | ( | ) | const |
Duplicates the decoder (each clone keeps its own position).
在文件 Decoder.cpp 第 17 行定义.
◆ decode()
| int eve::sound::Decoder::decode | ( | ) |
Decodes the next chunk; returns bytes produced (0 = end/error).
在文件 Decoder.cpp 第 25 行定义.
被这些函数引用 eve::audio::Source::fillPendingFromDecoder() , 以及 eve::sound::Sound::newSoundDataFromDecoder().
◆ getBitDepth()
| int eve::sound::Decoder::getBitDepth | ( | ) | const |
在文件 Decoder.cpp 第 33 行定义.
◆ getBuffer()
| void * eve::sound::Decoder::getBuffer | ( | ) | const |
Internal decoded buffer.
在文件 Decoder.cpp 第 27 行定义.
被这些函数引用 eve::audio::Source::fillPendingFromDecoder() , 以及 eve::sound::Sound::newSoundDataFromDecoder().
◆ getChannelCount()
| int eve::sound::Decoder::getChannelCount | ( | ) | const |
◆ getDuration()
| double eve::sound::Decoder::getDuration | ( | ) |
◆ getImpl()
|
inline |
◆ getSampleRate()
| int eve::sound::Decoder::getSampleRate | ( | ) | const |
在文件 Decoder.cpp 第 34 行定义.
◆ getSize()
| int eve::sound::Decoder::getSize | ( | ) | const |
Bytes decoded so far into the internal buffer.
在文件 Decoder.cpp 第 26 行定义.
◆ isFinished()
| bool eve::sound::Decoder::isFinished | ( | ) |
True when the stream is fully decoded.
在文件 Decoder.cpp 第 31 行定义.
◆ isSeekable()
| bool eve::sound::Decoder::isSeekable | ( | ) |
◆ rewind()
| bool eve::sound::Decoder::rewind | ( | ) |
Rewinds to the start; false when unsupported.
在文件 Decoder.cpp 第 29 行定义.
被这些函数引用 eve::audio::Source::fillPendingFromDecoder() , 以及 eve::audio::Source::stop().
◆ seek()
| bool eve::sound::Decoder::seek | ( | double | seconds | ) |
Seeks to a time in seconds; false when unsupported.
在文件 Decoder.cpp 第 28 行定义.
被这些函数引用 eve::audio::Source::seek().
该类的文档由以下文件生成:
- src/modules/sound/Decoder.h
- src/modules/sound/Decoder.cpp
Public 成员函数 继承自