载入中...
搜索中...
未找到
eve::audio::Audio类 参考

OpenAL audio module: device management, master listener state, and Source factory. Script: audio <- eve.Audio(); 更多...

#include <Audio.h>

类 eve::audio::Audio 继承关系图:
eve::Module

Public 成员函数

 Module_REG (Audio)
 
 Audio ()
 
 ~Audio () override
 
SourcenewSource (sound::SoundData *data)
 Creates a static (non-streaming) Source from decoded sound data.
 
SourcenewSourceFromDecoder (sound::Decoder *decoder, std::string type)
 Creates a Source from a decoder; type must be "static" or "stream".
 
SourcenewSourceFromData (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.h27 行定义.

构造及析构函数说明

◆ Audio()

eve::audio::Audio::Audio ( )

在文件 Audio.cpp22 行定义.

引用了 eve::audio::registerAudioCapabilities().

◆ ~Audio()

eve::audio::Audio::~Audio ( )
override

在文件 Audio.cpp35 行定义.

成员函数说明

◆ getVolume()

float eve::audio::Audio::getVolume ( ) const

在文件 Audio.cpp167 行定义.

◆ 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.

参数
dataDecoded audio (must be non-null; the caller keeps ownership).

在文件 Audio.cpp96 行定义.

引用了 data , 以及 s.

被这些函数引用 newSourceFromData() , 以及 newSourceFromDecoder().

◆ newSourceFromData()

Source * eve::audio::Audio::newSourceFromData ( Data data,
std::string  type 
)

Creates a Source from raw encoded data; type must be "static" or "stream".

在文件 Audio.cpp125 行定义.

引用了 data, newSource(), s , 以及 type.

◆ newSourceFromDecoder()

Source * eve::audio::Audio::newSourceFromDecoder ( sound::Decoder decoder,
std::string  type 
)

Creates a Source from a decoder; type must be "static" or "stream".

在文件 Audio.cpp103 行定义.

引用了 newSource(), s , 以及 type.

◆ notifyWorker()

void eve::audio::Audio::notifyWorker ( )

Internal: wakes the decode worker thread.

在文件 Audio.cpp94 行定义.

被这些函数引用 eve::audio::Source::play(), eve::audio::Source::pump(), eve::audio::Source::seek() , 以及 eve::audio::Source::Source().

◆ pause()

void eve::audio::Audio::pause ( Source s)

Pauses a source (no-op when s is null).

在文件 Audio.cpp148 行定义.

引用了 s.

◆ play()

void eve::audio::Audio::play ( Source s)

Starts playback of a source (no-op when s is null).

在文件 Audio.cpp140 行定义.

引用了 s.

◆ pump()

void eve::audio::Audio::pump ( )

Advances streaming sources; call once per frame from the main thread.

在文件 Audio.cpp176 行定义.

引用了 s.

◆ registerStream()

void eve::audio::Audio::registerStream ( Source s)

Internal: registers a streaming source with the decode worker.

在文件 Audio.cpp79 行定义.

引用了 s.

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

◆ setOrientation()

void eve::audio::Audio::setOrientation ( float  fx,
float  fy,
float  fz,
float  ux,
float  uy,
float  uz 
)

Sets the listener forward and up orientation vectors.

在文件 Audio.cpp171 行定义.

◆ setPosition()

void eve::audio::Audio::setPosition ( float  x,
float  y,
float  z 
)

Sets the listener position in world units.

在文件 Audio.cpp169 行定义.

引用了 x, y , 以及 z.

◆ setVelocity()

void eve::audio::Audio::setVelocity ( float  x,
float  y,
float  z 
)

Sets the listener velocity (used by OpenAL doppler).

在文件 Audio.cpp170 行定义.

引用了 x, y , 以及 z.

◆ setVolume()

void eve::audio::Audio::setVolume ( float  v)

Sets master volume (clamped to >= 0) applied to the OpenAL listener.

在文件 Audio.cpp163 行定义.

引用了 v.

◆ stop()

void eve::audio::Audio::stop ( Source s)

Stops playback of a source (no-op when s is null).

在文件 Audio.cpp144 行定义.

引用了 s.

◆ stopAll()

void eve::audio::Audio::stopAll ( )

Stops every live source registered with this module.

在文件 Audio.cpp152 行定义.

引用了 s.

◆ unregisterSource()

void eve::audio::Audio::unregisterSource ( Source s)

Internal: removes a source from all module tracking.

在文件 Audio.cpp84 行定义.

引用了 s.

被这些函数引用 unregisterStream() , 以及 eve::audio::Source::~Source().

◆ unregisterStream()

void eve::audio::Audio::unregisterStream ( Source s)

Internal: removes a source from worker tracking.

在文件 Audio.cpp90 行定义.

引用了 s , 以及 unregisterSource().


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