Kemena3D
Loading...
Searching...
No Matches
kemena::kAudioSource Struct Reference

Describes an audio emitter attached to a scene object. More...

#include <kaudiosource.h>

Public Attributes

kString uuid
 Unique identifier of this audio source.
kString name = "Audio Source"
 Human-readable name shown in the editor.
kString audioFile = ""
 Path to the audio clip (WAV / MP3 / OGG / FLAC).
bool isActive = true
 When false, the source is ignored by the audio manager.
bool playOnAwake = false
 If true, playback starts automatically when the scene begins.
bool loop = false
 If true, the clip repeats continuously.
float volume = 1.0f
 0 = silent, 1 = full volume.
float pitch = 1.0f
 1 = normal speed/pitch.
bool spatialize = true
 false = 2-D (no panning/attenuation).
float minDistance = 1.0f
 Distance at which attenuation begins.
float maxDistance = 100.0f
 Distance beyond which the sound is inaudible.

Detailed Description

Describes an audio emitter attached to a scene object.

At runtime kAudioManager loads the referenced file and positions the sound at the owning object's world-space position each frame.

Member Data Documentation

◆ audioFile

kString kemena::kAudioSource::audioFile = ""

Path to the audio clip (WAV / MP3 / OGG / FLAC).

◆ isActive

bool kemena::kAudioSource::isActive = true

When false, the source is ignored by the audio manager.

◆ loop

bool kemena::kAudioSource::loop = false

If true, the clip repeats continuously.

◆ maxDistance

float kemena::kAudioSource::maxDistance = 100.0f

Distance beyond which the sound is inaudible.

◆ minDistance

float kemena::kAudioSource::minDistance = 1.0f

Distance at which attenuation begins.

◆ name

kString kemena::kAudioSource::name = "Audio Source"

Human-readable name shown in the editor.

◆ pitch

float kemena::kAudioSource::pitch = 1.0f

1 = normal speed/pitch.

◆ playOnAwake

bool kemena::kAudioSource::playOnAwake = false

If true, playback starts automatically when the scene begins.

◆ spatialize

bool kemena::kAudioSource::spatialize = true

false = 2-D (no panning/attenuation).

◆ uuid

kString kemena::kAudioSource::uuid

Unique identifier of this audio source.

◆ volume

float kemena::kAudioSource::volume = 1.0f

0 = silent, 1 = full volume.


The documentation for this struct was generated from the following file: