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

Sound module: decodes compressed audio and produces SoundData buffers. Script: sound <- eve.Sound(); 更多...

#include <Sound.h>

类 eve::sound::Sound 继承关系图:
eve::Module

Public 成员函数

 Module_REG (Sound)
 
 Sound ()
 Sound.
 
 ~Sound () override
 Sound.
 
Decoder * newDecoder (Data *data, int bufferSize=16384)
 Creates a streaming decoder over raw encoded data.
 
SoundData * newSoundData (Data *data)
 Fully decodes data into a SoundData buffer.
 
SoundData * newSoundDataFromDecoder (Decoder *decoder)
 Fully decodes a Decoder into a SoundData buffer.
 
SoundData * newSoundDataFromFile (std::string path)
 Decodes a sound file from a VFS path through the unified resource cache. Repeated loads of one path share a single decoded buffer; a file change refreshes it in place (see ResourceManager).
 
SoundData * newSoundDataEmpty (int samples, int rate, int bitDepth, int channels)
 Creates an empty PCM buffer (e.g. for synthesis).
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

详细描述

Sound module: decodes compressed audio and produces SoundData buffers. Script: sound <- eve.Sound();

在文件 Sound.h 第 18 行定义.

构造及析构函数说明

◆ Sound()

eve::sound::Sound::Sound ( )

Sound.

在文件 Sound.cpp 第 107 行定义.

◆ ~Sound()

eve::sound::Sound::~Sound ( )
overridedefault

成员函数说明

◆ Module_REG()

eve::sound::Sound::Module_REG ( Sound  )

◆ newDecoder()

Decoder * eve::sound::Sound::newDecoder ( Data *  data,
int  bufferSize = 16384 
)

Creates a streaming decoder over raw encoded data.

在文件 Sound.cpp 第 136 行定义.

引用了 impl, owned, ptr , 以及 size.

被这些函数引用 newSoundData().

◆ newSoundData()

SoundData * eve::sound::Sound::newSoundData ( Data *  data)

Fully decodes data into a SoundData buffer.

在文件 Sound.cpp 第 198 行定义.

引用了 newDecoder() , 以及 newSoundDataFromDecoder().

◆ newSoundDataEmpty()

SoundData * eve::sound::Sound::newSoundDataEmpty ( int  samples,
int  rate,
int  bitDepth,
int  channels 
)

Creates an empty PCM buffer (e.g. for synthesis).

在文件 Sound.cpp 第 220 行定义.

引用了 bytes, channels , 以及 rate.

◆ newSoundDataFromDecoder()

SoundData * eve::sound::Sound::newSoundDataFromDecoder ( Decoder *  decoder)

◆ newSoundDataFromFile()

SoundData * eve::sound::Sound::newSoundDataFromFile ( std::string  path)

Decodes a sound file from a VFS path through the unified resource cache. Repeated loads of one path share a single decoded buffer; a file change refreshes it in place (see ResourceManager).

参数
pathThe VFS path of the audio file.
返回
The cached SoundData.
异常
eve::Exceptionwhen the file cannot be read or decoded.

在文件 Sound.cpp 第 210 行定义.

引用了 eve::ResourceManager::get(), eve::ResourceManager::getInstance(), path , 以及 resource.


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