载入中...
搜索中...
未找到
eve::sound::SoundData类 参考

Raw PCM audio buffer with format metadata (samples/rate/bit depth/channels). 更多...

#include <SoundData.h>

类 eve::sound::SoundData 继承关系图:
eve::Resource eve::Object

Public 成员函数

 SoundData (std::vector< uint8_t > pcm, int sampleRate, int bitDepth, int channels)
 Takes ownership of the PCM bytes.
 
 ~SoundData () override
 
void adopt (eve::Resource &replacement) override
 Replace this buffer with replacement's (cache reload).
 
int getSampleCount () const
 Format metadata.
 
int getSampleRate () const
 
int getBitDepth () const
 
int getChannelCount () const
 
double getDuration () const
 Duration in seconds.
 
void * getData () const
 Raw PCM access.
 
size_t getSize () const
 
- Public 成员函数 继承自 eve::Resource
virtual ~Resource ()
 
std::string getUri () const
 
std::vector< eve::ref< Resource > > getDependencies () const
 
virtual void addDependency (eve::ref< Resource > resource)
 
- 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::Resource
 Resource (std::string uri)
 
void setUri (std::string value)
 Set the resource URI (the cache key). Used by ResourceManager.
 
- Protected 成员函数 继承自 eve::Object
virtual ~Object ()
 
bool isDirty () const
 
ObjectgetUpdate () const
 
void ref ()
 
void unref ()
 
- Protected 属性 继承自 eve::Resource
std::string uri
 
std::vector< eve::ref< Resource > > dependencies
 
- Protected 属性 继承自 eve::Object
Objectupdate
 
unsigned ref_count = 0
 

详细描述

Raw PCM audio buffer with format metadata (samples/rate/bit depth/channels).

在文件 SoundData.h13 行定义.

构造及析构函数说明

◆ SoundData()

eve::sound::SoundData::SoundData ( std::vector< uint8_t >  pcm,
int  sampleRate,
int  bitDepth,
int  channels 
)

Takes ownership of the PCM bytes.

在文件 SoundData.cpp10 行定义.

◆ ~SoundData()

eve::sound::SoundData::~SoundData ( )
overridedefault

成员函数说明

◆ adopt()

void eve::sound::SoundData::adopt ( eve::Resource replacement)
overridevirtual

Replace this buffer with replacement's (cache reload).

实现了 eve::Resource.

在文件 SoundData.cpp22 行定义.

◆ getBitDepth()

int eve::sound::SoundData::getBitDepth ( ) const

在文件 SoundData.cpp37 行定义.

◆ getChannelCount()

int eve::sound::SoundData::getChannelCount ( ) const

在文件 SoundData.cpp38 行定义.

◆ getData()

void * eve::sound::SoundData::getData ( ) const

Raw PCM access.

在文件 SoundData.cpp46 行定义.

◆ getDuration()

double eve::sound::SoundData::getDuration ( ) const

Duration in seconds.

在文件 SoundData.cpp40 行定义.

引用了 getSampleCount().

被这些函数引用 eve::audio::Source::getDuration().

◆ getSampleCount()

int eve::sound::SoundData::getSampleCount ( ) const

Format metadata.

在文件 SoundData.cpp30 行定义.

被这些函数引用 getDuration().

◆ getSampleRate()

int eve::sound::SoundData::getSampleRate ( ) const

在文件 SoundData.cpp36 行定义.

◆ getSize()

size_t eve::sound::SoundData::getSize ( ) const

在文件 SoundData.cpp47 行定义.


该类的文档由以下文件生成: