X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sound.h;h=cb35c112707c2926deb9a1967af67a048955b747;hb=e24277377e64376fe6a8bbbdfad73f614f3909bf;hp=74f9ffe9b73e77274ab1ab99865c2dda8f2ae6e5;hpb=da29a8beeb35293e2fd38b51883c91b5cf4cf4ad;p=xonotic%2Fdarkplaces.git diff --git a/sound.h b/sound.h index 74f9ffe9..cb35c112 100644 --- a/sound.h +++ b/sound.h @@ -45,10 +45,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct sfx_s sfx_t; +extern cvar_t mastervolume; extern cvar_t bgmvolume; extern cvar_t volume; extern cvar_t snd_initialized; extern cvar_t snd_staticvolume; +extern cvar_t snd_mutewhenidle; // ==================================================================== @@ -60,16 +62,21 @@ void S_Terminate (void); void S_Startup (void); void S_Shutdown (void); +void S_UnloadAllSounds_f (void); void S_Update(const matrix4x4_t *listenermatrix); void S_ExtraUpdate (void); -sfx_t *S_PrecacheSound (const char *sample, qboolean complain, qboolean lock); -void S_ServerSounds (char serversound [][MAX_QPATH], unsigned int numsounds); +sfx_t *S_PrecacheSound (const char *sample, qboolean complain, qboolean levelsound); +float S_SoundLength(const char *name); +void S_ClearUsed (void); +void S_PurgeUnused (void); qboolean S_IsSoundPrecached (const sfx_t *sfx); // S_StartSound returns the channel index, or -1 if an error occurred int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation); +int S_StartSound_StartPosition (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation, float startposition); +int S_StartSound_StartPosition_Flags (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation, float startposition, int flags); qboolean S_LocalSound (const char *s); void S_StaticSound (sfx_t *sfx, vec3_t origin, float fvol, float attenuation); @@ -77,12 +84,16 @@ void S_StopSound (int entnum, int entchannel); void S_StopAllSounds (void); void S_PauseGameSounds (qboolean toggle); -void S_StopChannel (unsigned int channel_ind); +void S_StopChannel (unsigned int channel_ind, qboolean lockmutex, qboolean freesfx); qboolean S_SetChannelFlag (unsigned int ch_ind, unsigned int flag, qboolean value); void S_SetChannelVolume (unsigned int ch_ind, float fvol); +float S_GetChannelPosition (unsigned int ch_ind); +float S_GetEntChannelPosition(int entnum, int entchannel); void S_BlockSound (void); void S_UnblockSound (void); +int S_GetSoundRate (void); +int S_GetSoundChannels (void); #endif