载入中...
搜索中...
未找到
eve::sound::SoundData类 参考
Raw PCM audio buffer with format metadata (samples/rate/bit depth/channels). 更多...
#include <SoundData.h>
类 eve::sound::SoundData 继承关系图:
Public 成员函数 | |
| SoundData (std::vector< uint8_t > pcm, int sampleRate, int bitDepth, int channels) | |
| Takes ownership of the PCM bytes. | |
| ~SoundData () override | |
| Sound data. | |
| void | adopt (eve::Resource &replacement) override |
Replace this buffer with replacement's (cache reload). | |
| int | getSampleCount () const |
| Format metadata. | |
| int | getSampleRate () const |
| Returns the sample rate. | |
| int | getBitDepth () const |
| Returns the bit depth. | |
| int | getChannelCount () const |
| Returns the channel count. | |
| double | getDuration () const |
| Duration in seconds. | |
| void * | getData () const |
| Raw PCM access. | |
| size_t | getSize () const |
| Returns the size. | |
Public 成员函数 继承自 eve::Resource | |
| virtual | ~Resource () |
| Releases Resource resources. | |
| Resource (const Resource &)=delete | |
| Resources own keep-alive pins, so they are not copyable. | |
| Resource & | operator= (const Resource &)=delete |
| std::string | getUri () const |
| Returns the uri. | |
| EVENGINE_API_FOUNDATION std::vector< Resource * > | getDependencies () const |
| Borrowed views of the resources this instance keeps alive. | |
| EVENGINE_API_FOUNDATION eve::Result< void > | addDependency (Resource &dependency) |
Keeps dependency alive for as long as this instance lives. | |
额外继承的成员函数 | |
Protected 成员函数 继承自 eve::Resource | |
| Resource (std::string uri) | |
| Constructs a Resource. | |
| void | setUri (std::string value) |
| Set the resource URI (the cache key). Used by ResourceManager. | |
Protected 属性 继承自 eve::Resource | |
| std::string | uri |
| std::vector< ResourcePin > | dependencies |
| Keep-alive pins; see getDependencies()/addDependency(). | |
详细描述
Raw PCM audio buffer with format metadata (samples/rate/bit depth/channels).
在文件 SoundData.h 第 15 行定义.
构造及析构函数说明
◆ SoundData()
| eve::sound::SoundData::SoundData | ( | std::vector< uint8_t > | pcm, |
| int | sampleRate, | ||
| int | bitDepth, | ||
| int | channels | ||
| ) |
◆ ~SoundData()
|
overridedefault |
Sound data.
成员函数说明
◆ adopt()
|
overridevirtual |
Replace this buffer with replacement's (cache reload).
实现了 eve::Resource.
在文件 SoundData.cpp 第 22 行定义.
◆ getBitDepth()
| int eve::sound::SoundData::getBitDepth | ( | ) | const |
Returns the bit depth.
在文件 SoundData.cpp 第 37 行定义.
◆ getChannelCount()
| int eve::sound::SoundData::getChannelCount | ( | ) | const |
Returns the channel count.
在文件 SoundData.cpp 第 38 行定义.
◆ getData()
| void * eve::sound::SoundData::getData | ( | ) | const |
Raw PCM access.
在文件 SoundData.cpp 第 46 行定义.
◆ getDuration()
| double eve::sound::SoundData::getDuration | ( | ) | const |
Duration in seconds.
在文件 SoundData.cpp 第 40 行定义.
引用了 getSampleCount().
被这些函数引用 eve::audio::Source::getDuration().
◆ getSampleCount()
| int eve::sound::SoundData::getSampleCount | ( | ) | const |
◆ getSampleRate()
| int eve::sound::SoundData::getSampleRate | ( | ) | const |
Returns the sample rate.
在文件 SoundData.cpp 第 36 行定义.
◆ getSize()
| size_t eve::sound::SoundData::getSize | ( | ) | const |
Returns the size.
在文件 SoundData.cpp 第 47 行定义.
该类的文档由以下文件生成:
- src/modules/sound/SoundData.h
- src/modules/sound/SoundData.cpp
Public 成员函数 继承自