Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
audio_events.hpp
Go to the documentation of this file.
1
8
#pragma once
9
#include <string>
10
#include <toast/events/event.hpp>
11
#include <
toast/export.hpp
>
12
13
namespace
event {
14
15
// TODO: refactor when we have the message system
16
20
struct
TOAST_API MusicBeat : Event<MusicBeat> {
21
int
bar
;
22
int
beat
;
23
int
position_ms;
24
float
tempo;
25
int
time_sig_upper
;
26
int
time_sig_lower
;
27
28
MusicBeat(
int
bar
,
int
beat
,
int
position_ms,
float
tempo,
int
upper,
int
lower)
29
:
bar
(
bar
),
30
beat
(
beat
),
31
position_ms(position_ms),
32
tempo(tempo),
33
time_sig_upper
(upper),
34
time_sig_lower
(lower) { }
35
};
36
40
struct
TOAST_API MusicMarker : Event<MusicMarker> {
41
std::string name;
42
int
position_ms;
43
44
MusicMarker(std::string name,
int
position_ms) : name(std::move(name)), position_ms(position_ms) { }
45
};
46
50
struct
TOAST_API
MusicStopped
: Event<MusicStopped> {
51
// TODO: refactor when we have the message system
52
};
53
54
}
export.hpp
event::MusicBeat::time_sig_lower
int time_sig_lower
denominator of the time signature
Definition
audio_events.hpp:26
event::MusicBeat::beat
int beat
0-based beat within the bar
Definition
audio_events.hpp:22
event::MusicBeat::time_sig_upper
int time_sig_upper
numerator of the time signature
Definition
audio_events.hpp:25
event::MusicBeat::bar
int bar
0-based bar number
Definition
audio_events.hpp:21
event::MusicStopped
Fired when a track finishes playing.
Definition
audio_events.hpp:50
engine
src
toast
audio
audio_events.hpp
Generated by
1.17.0