载入中...
搜索中...
未找到
eve::audio 命名空间参考

类

class  Audio
 OpenAL audio module: device management, master listener state, and Source factory. Script: audio <- eve.Audio(); 更多...
 
struct  AudioZoneItem
 One Pcg audio-zone track timing and gain profile. 更多...
 
struct  AudioZoneOutput
 Commands to apply to a caller-owned audio Source. 更多...
 
class  AudioZoneProfile
 Caller-owned Pcg audio-zone configuration and track list. 更多...
 
struct  AudioZoneState
 Persistent playback state owned by the caller. 更多...
 
struct  PcmChunk
 解码后待排队的一帧 PCM 数据。 更多...
 
class  Source
 A playable audio source (static buffer or streaming decoder). Not thread-safe for playback control except fillPendingFromDecoder(), which is synchronized for the Audio worker thread. 更多...
 

枚举

enum class  AudioZonePhase : std::uint8_t { Active , BecomingInactive , Inactive }
 AudioZonePhase public API. 更多...
 

函数

 Module_IMPL (Audio, new Audio())
 
void registerAudioCapabilities ()
 Registers audio capabilities.
 
Result< AudioZoneOutput > evaluateAudioZone (const AudioZoneProfile &profile, AudioZoneState &state, float now, float playerX, float playerY, float playerZ, float masterVolume, std::uint32_t seed)
 Evaluate PcgAudioManager/PcgAudioZone for one explicit time and player observation.
 
Result< void > applyAudioZoneOutput (Source *source, const AudioZoneOutput &output)
 Apply one evaluated command to the caller-selected track Source without retaining it.
 
void bindAudioEventSinkOwner (Audio *owner) noexcept
 Bind the live Audio module into the platform event pump sink. @ownership Borrowed; cleared when the Audio module is destroyed. @lifetime Valid from Audio construction until Audio destruction.
 
Result< void > applyUnderwaterAudio (Source *submergeDown, Source *submergeUp, Source *ambience, bool playDown, bool playUp, bool loopAmbience, float volume)
 Apply one Pcg underwater audio transition to caller-owned sources.
 

变量

constexpr int kStreamBufferCount = 4
 流式 Source 的 OpenAL 缓冲数量。
 
constexpr int kStreamBufferFrames = 4096
 每个流式缓冲的采样帧数。
 

枚举类型说明

◆ AudioZonePhase

enum class eve::audio::AudioZonePhase : std::uint8_t
strong

AudioZonePhase public API.

枚举值
Active 
BecomingInactive 
Inactive 

在文件 AudioZone.h 第 16 行定义.

函数说明

◆ applyAudioZoneOutput()

EVENGINE_API_BACKENDS Result< void > eve::audio::applyAudioZoneOutput ( Source *  source,
const AudioZoneOutput &  output 
)

Apply one evaluated command to the caller-selected track Source without retaining it.

在文件 AudioZone.cpp 第 59 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, output, source , 以及 eve::Result< T >::success().

◆ applyUnderwaterAudio()

EVENGINE_API_BACKENDS Result< void > eve::audio::applyUnderwaterAudio ( Source *  submergeDown,
Source *  submergeUp,
Source *  ambience,
bool  playDown,
bool  playUp,
bool  loopAmbience,
float  volume 
)

Apply one Pcg underwater audio transition to caller-owned sources.

参数
submergeDownOptional one-shot source played when playDown is true.
submergeUpOptional one-shot source played when playUp is true.
ambienceRequired looping underwater ambience source.
playDownWhether to play the downward transition once.
playUpWhether to play the upward transition once.
loopAmbienceWhether ambience should be playing after this call.
volumeNormalized transition and ambience gain in [0,1].
返回
Success or InvalidArgument; validation completes before source mutation. @ownership Sources remain caller-owned and are never retained. @thread Audio owner thread only; callbacks are not invoked.

在文件 UnderwaterAudio.cpp 第 9 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::audio::Source::isPlaying(), eve::audio::Source::play(), eve::audio::Source::setLooping(), eve::audio::Source::setVolume(), eve::audio::Source::stop(), eve::Result< T >::success() , 以及 volume.

◆ bindAudioEventSinkOwner()

void eve::audio::bindAudioEventSinkOwner ( Audio *  owner)
noexcept

Bind the live Audio module into the platform event pump sink. @ownership Borrowed; cleared when the Audio module is destroyed. @lifetime Valid from Audio construction until Audio destruction.

在文件 EventSink.cpp 第 35 行定义.

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

◆ evaluateAudioZone()

EVENGINE_API_BACKENDS Result< AudioZoneOutput > eve::audio::evaluateAudioZone ( const AudioZoneProfile &  profile,
AudioZoneState &  state,
float  now,
float  playerX,
float  playerY,
float  playerZ,
float  masterVolume,
std::uint32_t  seed 
)

Evaluate PcgAudioManager/PcgAudioZone for one explicit time and player observation.

参数
profileImmutable zone configuration.
stateCaller-owned playback state, atomically updated on success.
nowAbsolute simulation time in seconds.
playerXPlayer world position.
playerYPlayer world position.
playerZPlayer world position.
masterVolumePcg master-volume ceiling.
seedNamed audio-zone RNG stream seed used when a new track starts.

在文件 AudioZone.cpp 第 21 行定义.

引用了 Active, BecomingInactive, dx, dy, dz, eve::Diagnostic::error(), eve::Result< T >::failure(), Inactive, eve::InvalidArgument, p, eve::audio::AudioZoneOutput::play, px, py, pz, seed, state, eve::audio::AudioZoneOutput::stop, eve::Result< T >::success(), eve::audio::AudioZoneOutput::trackIndex, unit, volume , 以及 eve::audio::AudioZoneOutput::volume.

◆ Module_IMPL()

eve::audio::Module_IMPL ( Audio  ,
new   Audio() 
)

◆ registerAudioCapabilities()

void eve::audio::registerAudioCapabilities ( )

Registers audio capabilities.

在文件 AudioCapabilities.cpp 第 619 行定义.

引用了 impl.

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

变量说明

◆ kStreamBufferCount

constexpr int eve::audio::kStreamBufferCount = 4
constexpr

流式 Source 的 OpenAL 缓冲数量。

在文件 AudioTypes.h 第 11 行定义.

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

◆ kStreamBufferFrames

constexpr int eve::audio::kStreamBufferFrames = 4096
constexpr

每个流式缓冲的采样帧数。

在文件 AudioTypes.h 第 13 行定义.