VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
vae_emitter.hpp
Go to the documentation of this file.
1#ifndef _VAE_EMITTER
2#define _VAE_EMITTER
3
4#include "../vae_types.hpp"
5namespace vae { namespace core {
6 /**
7 * @brief Allows placement of a Sound in 3D
8 * @details Also can trigger a event if a listener is closer than maxDist.
9 */
10 struct Emitter {
11 Vec3 position = { 0, 0, 0 };
12 Real spread = 0.5; ///< The width of the source, 1 means all speaker will play
13 Real maxDist = 100; ///< if event is valid, it will be emitted once the emitter is closer
14 EventHandle event; ///< Will be triggerd
15 BankHandle bank; ///< Needed to identify event
16 bool autoplaying : 1; ///< whether the event was already triggered
17 };
18
19 constexpr int _VAE_EMITTER_SIZE = sizeof(Emitter);
20} } // vae::core
21
22#endif // _VAE_EMITTER
float Real
Definition: vae_types.hpp:48
glm::vec3 Vec3
Definition: vae_types.hpp:47
constexpr int _VAE_EMITTER_SIZE
Definition: vae_emitter.hpp:19
Contains Typedefinitions and basic structures use by the public API and internally.
Definition: vae.hpp:31
SmallHandle BankHandle
Definition: vae.hpp:40
GenericHandle EventHandle
The handle used to address events within a bank.
Definition: vae.hpp:41
Allows placement of a Sound in 3D.
Definition: vae_emitter.hpp:10
bool autoplaying
whether the event was already triggered
Definition: vae_emitter.hpp:16
BankHandle bank
Needed to identify event.
Definition: vae_emitter.hpp:15
Real maxDist
if event is valid, it will be emitted once the emitter is closer
Definition: vae_emitter.hpp:13
EventHandle event
Will be triggerd.
Definition: vae_emitter.hpp:14
Real spread
The width of the source, 1 means all speaker will play.
Definition: vae_emitter.hpp:12