载入中...
搜索中...
未找到
Sound.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Module.h"
4#include "common/Data.h"
5
6namespace eve {
7namespace sound {
8
9class Decoder;
10class SoundData;
11
16class Sound : public Module {
17public:
19
20 Sound();
21 ~Sound() override;
22
24 Decoder *newDecoder(Data *data, int bufferSize = 16384);
37 SoundData *newSoundDataFromFile(std::string path);
39 SoundData *newSoundDataEmpty(int samples, int rate, int bitDepth, int channels);
40};
41
42} // namespace sound
43} // namespace eve
Streaming audio decoder (medialoader-backed). Owns the raw encoded bytes and decodes incrementally vi...
Definition Decoder.h:20
Raw PCM audio buffer with format metadata (samples/rate/bit depth/channels).
Definition SoundData.h:13
Sound module: decodes compressed audio and produces SoundData buffers. Script: sound <- eve....
Definition Sound.h:16
SoundData * newSoundDataFromDecoder(Decoder *decoder)
Fully decodes a Decoder into a SoundData buffer.
Definition Sound.cpp:181
SoundData * newSoundDataFromFile(std::string path)
Decodes a sound file from a VFS path through the unified resource cache. Repeated loads of one path s...
Definition Sound.cpp:210
SoundData * newSoundData(Data *data)
Fully decodes data into a SoundData buffer.
Definition Sound.cpp:198
~Sound() override
SoundData * newSoundDataEmpty(int samples, int rate, int bitDepth, int channels)
Creates an empty PCM buffer (e.g. for synthesis).
Definition Sound.cpp:220
Decoder * newDecoder(Data *data, int bufferSize=16384)
Creates a streaming decoder over raw encoded data.
Definition Sound.cpp:136
Definition Build.cpp:11