Kemena3D
Loading...
Searching...
No Matches
kaudiosource.h
Go to the documentation of this file.
1
5
6#ifndef KAUDIOSOURCE_H
7#define KAUDIOSOURCE_H
8
9#include "kexport.h"
10#include "kdatatype.h"
11
12namespace kemena
13{
21 {
23 kString name = "Audio Source";
25 bool isActive = true;
26 bool playOnAwake = false;
27 bool loop = false;
28 float volume = 1.0f;
29 float pitch = 1.0f;
30 bool spatialize = true;
31 float minDistance = 1.0f;
32 float maxDistance = 100.0f;
33 };
34
43 {
45 bool isActive = true;
46 };
47
48} // namespace kemena
49
50#endif // KAUDIOSOURCE_H
Core type aliases, enumerations, structs, and utility functions used throughout the engine.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
std::string kString
Standard string alias.
Definition kdatatype.h:42
Marks a scene object as the audio listener (typically the main camera).
Definition kaudiosource.h:43
bool isActive
When false, this object is not used as the active listener.
Definition kaudiosource.h:45
kString uuid
Unique identifier of this listener.
Definition kaudiosource.h:44
Describes an audio emitter attached to a scene object.
Definition kaudiosource.h:21
kString uuid
Unique identifier of this audio source.
Definition kaudiosource.h:22
float minDistance
Distance at which attenuation begins.
Definition kaudiosource.h:31
bool loop
If true, the clip repeats continuously.
Definition kaudiosource.h:27
kString audioFile
Path to the audio clip (WAV / MP3 / OGG / FLAC).
Definition kaudiosource.h:24
bool isActive
When false, the source is ignored by the audio manager.
Definition kaudiosource.h:25
float pitch
1 = normal speed/pitch.
Definition kaudiosource.h:29
float maxDistance
Distance beyond which the sound is inaudible.
Definition kaudiosource.h:32
bool playOnAwake
If true, playback starts automatically when the scene begins.
Definition kaudiosource.h:26
kString name
Human-readable name shown in the editor.
Definition kaudiosource.h:23
bool spatialize
false = 2-D (no panning/attenuation).
Definition kaudiosource.h:30
float volume
0 = silent, 1 = full volume.
Definition kaudiosource.h:28