OpenAL audio module: device management, master listener state, and Source factory. Script: audio <- eve.Audio();
更多...
#include <Audio.h>
Public 成员函数 | |
| Module_REG (Audio) | |
| Audio () | |
| ~Audio () override | |
| Source * | newSource (sound::SoundData *data) |
| Creates a static (non-streaming) Source from decoded sound data. | |
| Source * | newSourceFromDecoder (sound::Decoder *decoder, std::string type) |
| Creates a Source from a decoder; type must be "static" or "stream". | |
| Source * | newSourceFromData (Data *data, std::string type) |
| Creates a Source from raw encoded data; type must be "static" or "stream". | |
| void | play (Source *s) |
| Starts playback of a source (no-op when s is null). | |
| void | stop (Source *s) |
| Stops playback of a source (no-op when s is null). | |
| void | stopAll () |
| Stops every live source registered with this module. | |
| void | pause (Source *s) |
| Pauses a source (no-op when s is null). | |
| void | setVolume (float v) |
| Sets master volume (clamped to >= 0) applied to the OpenAL listener. | |
| float | getVolume () const |
| void | setPosition (float x, float y, float z) |
| Sets the listener position in world units. | |
| void | setVelocity (float x, float y, float z) |
| Sets the listener velocity (used by OpenAL doppler). | |
| void | setOrientation (float fx, float fy, float fz, float ux, float uy, float uz) |
| Sets the listener forward and up orientation vectors. | |
| void | pump () |
| Advances streaming sources; call once per frame from the main thread. | |
| void | registerStream (Source *s) |
| Internal: registers a streaming source with the decode worker. | |
| void | unregisterStream (Source *s) |
| Internal: removes a source from worker tracking. | |
| void | unregisterSource (Source *s) |
| Internal: removes a source from all module tracking. | |
| void | notifyWorker () |
| Internal: wakes the decode worker thread. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
详细描述
OpenAL audio module: device management, master listener state, and Source factory. Script: audio <- eve.Audio();
构造及析构函数说明
◆ Audio()
| eve::audio::Audio::Audio | ( | ) |
◆ ~Audio()
成员函数说明
◆ getVolume()
◆ Module_REG()
| eve::audio::Audio::Module_REG | ( | Audio | ) |
◆ newSource()
| Source * eve::audio::Audio::newSource | ( | sound::SoundData * | data | ) |
Creates a static (non-streaming) Source from decoded sound data.
- 参数
-
data Decoded audio (must be non-null; the caller keeps ownership).
被这些函数引用 newSourceFromData() , 以及 newSourceFromDecoder().
◆ newSourceFromData()
◆ newSourceFromDecoder()
| Source * eve::audio::Audio::newSourceFromDecoder | ( | sound::Decoder * | decoder, |
| std::string | type | ||
| ) |
◆ notifyWorker()
| void eve::audio::Audio::notifyWorker | ( | ) |
Internal: wakes the decode worker thread.
被这些函数引用 eve::audio::Source::play(), eve::audio::Source::pump(), eve::audio::Source::seek() , 以及 eve::audio::Source::Source().
◆ pause()
| void eve::audio::Audio::pause | ( | Source * | s | ) |
◆ play()
| void eve::audio::Audio::play | ( | Source * | s | ) |
◆ pump()
| void eve::audio::Audio::pump | ( | ) |
◆ registerStream()
| void eve::audio::Audio::registerStream | ( | Source * | s | ) |
Internal: registers a streaming source with the decode worker.
引用了 s.
被这些函数引用 eve::audio::Source::Source().
◆ setOrientation()
| void eve::audio::Audio::setOrientation | ( | float | fx, |
| float | fy, | ||
| float | fz, | ||
| float | ux, | ||
| float | uy, | ||
| float | uz | ||
| ) |
◆ setPosition()
| void eve::audio::Audio::setPosition | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
◆ setVelocity()
| void eve::audio::Audio::setVelocity | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
◆ setVolume()
| void eve::audio::Audio::setVolume | ( | float | v | ) |
◆ stop()
| void eve::audio::Audio::stop | ( | Source * | s | ) |
◆ stopAll()
| void eve::audio::Audio::stopAll | ( | ) |
◆ unregisterSource()
| void eve::audio::Audio::unregisterSource | ( | Source * | s | ) |
Internal: removes a source from all module tracking.
引用了 s.
被这些函数引用 unregisterStream() , 以及 eve::audio::Source::~Source().
◆ unregisterStream()
| void eve::audio::Audio::unregisterStream | ( | Source * | s | ) |
Internal: removes a source from worker tracking.
引用了 s , 以及 unregisterSource().
该类的文档由以下文件生成:
Public 成员函数 继承自