载入中...
搜索中...
未找到
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.
 
 ~Audio () override
 Audio.
 
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.
 
int getSourceCount ()
 Return the current number of caller- or handler-owned live sources.
 
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
 Returns the volume.
 
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 ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

详细描述

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

在文件 Audio.h 第 29 行定义.

构造及析构函数说明

◆ Audio()

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

◆ ~Audio()

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

Audio.

在文件 Audio.cpp 第 41 行定义.

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

成员函数说明

◆ getSourceCount()

int eve::audio::Audio::getSourceCount ( )

Return the current number of caller- or handler-owned live sources.

在文件 Audio.cpp 第 170 行定义.

◆ getVolume()

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

Returns the volume.

在文件 Audio.cpp 第 179 行定义.

◆ 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.cpp 第 103 行定义.

引用了 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.cpp 第 132 行定义.

引用了 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.cpp 第 110 行定义.

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

◆ notifyWorker()

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

Internal: wakes the decode worker thread.

在文件 Audio.cpp 第 101 行定义.

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

◆ pause()

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

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

在文件 Audio.cpp 第 155 行定义.

引用了 s.

◆ play()

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

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

在文件 Audio.cpp 第 147 行定义.

引用了 s.

◆ pump()

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

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

在文件 Audio.cpp 第 188 行定义.

引用了 EV_PROFILE_MODULE , 以及 s.

◆ registerStream()

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

Internal: registers a streaming source with the decode worker.

在文件 Audio.cpp 第 86 行定义.

引用了 s.

◆ 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.cpp 第 183 行定义.

◆ setPosition()

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

Sets the listener position in world units.

在文件 Audio.cpp 第 181 行定义.

引用了 x, y , 以及 z.

◆ setVelocity()

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

Sets the listener velocity (used by OpenAL doppler).

在文件 Audio.cpp 第 182 行定义.

引用了 x, y , 以及 z.

◆ setVolume()

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

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

在文件 Audio.cpp 第 175 行定义.

引用了 v.

◆ stop()

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

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

在文件 Audio.cpp 第 151 行定义.

引用了 s.

◆ stopAll()

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

Stops every live source registered with this module.

在文件 Audio.cpp 第 159 行定义.

引用了 s.

◆ unregisterSource()

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

Internal: removes a source from all module tracking.

在文件 Audio.cpp 第 91 行定义.

引用了 s.

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

◆ unregisterStream()

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

Internal: removes a source from worker tracking.

在文件 Audio.cpp 第 97 行定义.

引用了 s , 以及 unregisterSource().


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