option between water plane / water trigger
[carveJwlIkooP6JGAAIwe30JlM.git] / audio.h
1 /*
2 * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
3 */
4
5 #pragma once
6
7 #include "vg/vg_engine.h"
8 #include "vg/vg_audio.h"
9 #include "vg/vg_audio_dsp.h"
10 #include "world.h"
11
12 struct air_synth_data {
13 f32 speed;
14
15 /* internal */
16 f32 t;
17 struct dsp_biquad lpf;
18 SDL_SpinLock sl;
19
20 /* not used in locking */
21 audio_channel *channel;
22 }
23 extern air_audio_data;
24
25 void audio_init(void);
26 void audio_ambient_sprite_play( v3f co, audio_clip *clip );
27 void audio_ambient_sprites_update( world_instance *world, v3f co );
28
29 /* TODO(ASSETS):
30 * Have these as asignable ID's and not a bunch of different arrays.
31 */
32 extern audio_clip audio_board[];
33 extern audio_clip audio_taps[];
34 extern audio_clip audio_flips[];
35 extern audio_clip audio_hits[];
36 extern audio_clip audio_splash;
37 extern audio_clip audio_jumps[];
38 extern audio_clip audio_footsteps[];
39 extern audio_clip audio_footsteps_grass[];
40 extern audio_clip audio_footsteps_wood[];
41 extern audio_clip audio_lands[];
42 extern audio_clip audio_water[];
43 extern audio_clip audio_grass[];
44 extern audio_clip audio_ambience[];
45 extern audio_clip audio_gate_pass;
46 extern audio_clip audio_gate_lap;
47 extern audio_clip audio_gate_ambient;
48 extern audio_clip audio_rewind[];
49 extern audio_clip audio_ui[];
50 extern audio_clip audio_challenge[];
51
52 enum audio_sprite_type
53 {
54 k_audio_sprite_type_none,
55 k_audio_sprite_type_grass,
56 k_audio_sprite_type_water
57 };