diff --git a/common/sound_api.h b/common/sound_api.h index 77d6e58a..d25c18be 100644 --- a/common/sound_api.h +++ b/common/sound_api.h @@ -162,8 +162,8 @@ typedef struct snd_globals_s // API from engine to client (client calls these) typedef struct sound_api_s { - qboolean (*CL_GetEntitySpatialization)( struct channel_s *ch ); - struct sfx_s* (*S_GetSfxByHandle)( sound_t handle ); + qboolean (*CL_GetEntitySpatialization)( channel_t *ch ); + sfx_t* (*S_GetSfxByHandle)( sound_t handle ); } sound_api_t; // Callbacks from client to engine (engine calls these when custom sound is active) diff --git a/engine/cdll_exp.h b/engine/cdll_exp.h index 3751b7e1..0cd04636 100644 --- a/engine/cdll_exp.h +++ b/engine/cdll_exp.h @@ -81,7 +81,7 @@ typedef struct cldll_func_s void (*pfnMoveEvent)( float forwardmove, float sidemove ); void (*pfnLookEvent)( float relyaw, float relpitch ); // Sound API - int (*pfnGetSoundInterface)( int version, sound_api_t *api, sound_interface_t *callback ); + int (*pfnGetSoundInterface)( int version, const sound_api_t *api, sound_interface_t *callback ); } cldll_func_t; #endif//CDLL_EXP_H diff --git a/engine/client/s_main.c b/engine/client/s_main.c index 349b8392..a4e38723 100644 --- a/engine/client/s_main.c +++ b/engine/client/s_main.c @@ -1935,7 +1935,7 @@ static void S_VoiceRecordStop_f( void ) Voice_RecordStop(); } -static const sound_api_t s_clientSoundAPI = { +static const sound_api_t gSoundAPI = { CL_GetEntitySpatialization, S_GetSfxByHandle, }; @@ -1952,7 +1952,7 @@ static qboolean S_InitSoundAPI( void ) if( clgame.dllFuncs.pfnGetSoundInterface ) { - if( clgame.dllFuncs.pfnGetSoundInterface( CL_SOUND_INTERFACE_VERSION, &s_clientSoundAPI, &clgame.soundFuncs )) + if( clgame.dllFuncs.pfnGetSoundInterface( CL_SOUND_INTERFACE_VERSION, &gSoundAPI, &clgame.soundFuncs )) { Con_Reportf( "%s: ^2initailized extended SoundAPI ^7ver. %i\n", __func__, CL_SOUND_INTERFACE_VERSION ); return true;