Sound module: decodes compressed audio and produces SoundData buffers. Script: sound <- eve.Sound();
更多...
#include <Sound.h>
Public 成员函数 | |
| Module_REG (Sound) | |
| Sound () | |
| ~Sound () override | |
| 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 () |
| virtual std::string | getName () const =0 |
详细描述
Sound module: decodes compressed audio and produces SoundData buffers. Script: sound <- eve.Sound();
构造及析构函数说明
◆ Sound()
◆ ~Sound()
|
overridedefault |
成员函数说明
◆ Module_REG()
| eve::sound::Sound::Module_REG | ( | Sound | ) |
◆ newDecoder()
◆ newSoundData()
Fully decodes data into a SoundData buffer.
引用了 data, newDecoder() , 以及 newSoundDataFromDecoder().
◆ newSoundDataEmpty()
| SoundData * eve::sound::Sound::newSoundDataEmpty | ( | int | samples, |
| int | rate, | ||
| int | bitDepth, | ||
| int | channels | ||
| ) |
◆ newSoundDataFromDecoder()
Fully decodes a Decoder into a SoundData buffer.
引用了 eve::sound::Decoder::decode(), eve::sound::Decoder::getBitDepth(), eve::sound::Decoder::getBuffer(), eve::sound::Decoder::getChannelCount(), eve::sound::Decoder::getSampleRate(), eve::sound::Decoder::isFinished() , 以及 n.
被这些函数引用 newSoundData().
◆ 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).
- 参数
-
path The VFS path of the audio file.
- 返回
- The cached SoundData.
- 异常
-
eve::Exception when the file cannot be read or decoded.
引用了 eve::ResourceManager::get() , 以及 eve::ResourceManager::getInstance().
该类的文档由以下文件生成:
Public 成员函数 继承自