diff --git a/include/QF/plugin/snd_output.h b/include/QF/plugin/snd_output.h index 840647b0c..d989a1571 100644 --- a/include/QF/plugin/snd_output.h +++ b/include/QF/plugin/snd_output.h @@ -37,6 +37,7 @@ typedef struct snd_output_funcs_s { void (*shutdown) (struct snd_s *snd); int (*get_dma_pos) (struct snd_s *snd); void (*submit) (struct snd_s *snd); + void (*on_update) (struct snd_s *snd); void (*block_sound) (struct snd_s *snd); void (*unblock_sound) (struct snd_s *snd); } snd_output_funcs_t; diff --git a/libs/audio/renderer/snd_dma.c b/libs/audio/renderer/snd_dma.c index 5f995c5e2..390e10524 100644 --- a/libs/audio/renderer/snd_dma.c +++ b/libs/audio/renderer/snd_dma.c @@ -214,6 +214,10 @@ s_update (const vec3_t origin, const vec3_t forward, const vec3_t right, if (!sound_started || (snd_blocked > 0)) return; + if (snd_output_funcs->on_update) { + snd_output_funcs->on_update (&snd); + } + SND_SetListener (&snd, origin, forward, right, up, ambient_sound_level); if (snd_output_data->model == som_push) {