diff --git a/libs/audio/renderer/snd_jack.c b/libs/audio/renderer/snd_jack.c index cf4104831..397bafb1b 100644 --- a/libs/audio/renderer/snd_jack.c +++ b/libs/audio/renderer/snd_jack.c @@ -65,6 +65,14 @@ s_stop_all_sounds (void) SND_ScanChannels (1); } +static void +s_start_sound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin, + float fvol, float attenuation) +{ + if (!snd_shutdown) + SND_StartSound (entnum, entchannel, sfx, origin, fvol, attenuation); +} + static void s_update (const vec3_t origin, const vec3_t forward, const vec3_t right, const vec3_t up) @@ -84,6 +92,13 @@ s_extra_update (void) { } +static void +s_local_sound (const char *sound) +{ + if (!snd_shutdown) + SND_LocalSound (sound); +} + static void s_jack_activate (void) { @@ -123,6 +138,14 @@ s_unblock_sound (void) } } +static channel_t * +s_alloc_channel (void) +{ + if (!snd_shutdown) + return SND_AllocChannel (); + return 0; +} + static void s_snd_force_unblock (void) { @@ -238,17 +261,17 @@ static snd_render_funcs_t plugin_info_render_funcs = { SND_AmbientOff, SND_AmbientOn, SND_StaticSound, - SND_StartSound, + s_start_sound, SND_StopSound, SND_PrecacheSound, s_update, s_stop_all_sounds, s_extra_update, - SND_LocalSound, + s_local_sound, s_block_sound, s_unblock_sound, SND_LoadSound, - SND_AllocChannel, + s_alloc_channel, SND_ChannelStop, };