small refactor of model loading
[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_free(void);
27 void audio_ambient_sprite_play( v3f co, audio_clip *clip );
28 void audio_ambient_sprites_update( world_instance *world, v3f co );
29
30 /* TODO(ASSETS):
31 * Have these as asignable ID's and not a bunch of different arrays.
32 */
33 extern audio_clip audio_board[];
34 extern audio_clip audio_taps[];
35 extern audio_clip audio_flips[];
36 extern audio_clip audio_hits[];
37 extern audio_clip audio_splash;
38 extern audio_clip audio_jumps[];
39 extern audio_clip audio_footsteps[];
40 extern audio_clip audio_footsteps_grass[];
41 extern audio_clip audio_footsteps_wood[];
42 extern audio_clip audio_lands[];
43 extern audio_clip audio_water[];
44 extern audio_clip audio_grass[];
45 extern audio_clip audio_ambience[];
46 extern audio_clip audio_gate_pass;
47 extern audio_clip audio_gate_lap;
48 extern audio_clip audio_gate_ambient;
49 extern audio_clip audio_rewind[];
50 extern audio_clip audio_ui[];
51 extern audio_clip audio_challenge[];
52
53 enum audio_sprite_type
54 {
55 k_audio_sprite_type_none,
56 k_audio_sprite_type_grass,
57 k_audio_sprite_type_water
58 };