X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg_audio.h;h=59ad0574e88acf1ade05b94a422291375812a20f;hb=HEAD;hp=6272cafccbe29ef41e546abc0fcf57c264fa051b;hpb=3b14f3dcd5bf9dd3c85144f2123d667bfa4bb63f;p=vg.git diff --git a/vg_audio.h b/vg_audio.h index 6272caf..f660cbb 100644 --- a/vg_audio.h +++ b/vg_audio.h @@ -3,6 +3,7 @@ #pragma once #include "vg_platform.h" +#include "vg_engine.h" #include "vg_string.h" #include "vg_vorbis.h" @@ -16,6 +17,7 @@ #define AUDIO_FLAG_NO_DOPPLER 0x2 #define AUDIO_FLAG_SPACIAL_3D 0x4 #define AUDIO_FLAG_AUTO_START 0x8 +#define AUDIO_FLAG_NO_DSP 0x10 #define AUDIO_FLAG_FORMAT 0x1E00 enum audio_format @@ -49,18 +51,23 @@ typedef struct audio_lfo audio_lfo; struct audio_clip { - union { /* TODO oof.. */ - u64 _p64_; + union + { const char *path; void *func; + + u64 _p64_; /* force width to be 64 because we save this structure on + disk in Skaterift yay */ }; u32 flags; u32 size; - union{ - u64 _p64; + union + { void *data; + + u64 _p64; }; }; @@ -167,7 +174,8 @@ struct vg_audio_system } channels[ AUDIO_CHANNELS ]; - int debug_ui, debug_ui_3d, debug_dsp, dsp_enabled; + bool inspector_open; + int dsp_enabled; v3f internal_listener_pos, internal_listener_ears, @@ -216,12 +224,3 @@ int audio_oneshot( audio_clip *clip, f32 volume, f32 pan ); void audio_set_lfo_wave( int id, enum lfo_wave_type type, f32 coefficient ); void audio_set_lfo_frequency( int id, float freq ); int audio_channel_load_source( audio_channel *ch ); - -void audio_debug_ui( - -#ifdef VG_3D - m4x4f -#else - m3x3f -#endif - mtx_pv );