X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=sound.h;h=37e53b06f1e541983304a6a8e68603ca43184759;hb=179be6fd1f715bac570e73aa9cadb0e08d0f7979;hp=19f7e126b4a26f1f2e701465087423c8426f6efb;hpb=4afc8578d1934fafc515c720cacb37cccd5e01d8;p=xonotic%2Fdarkplaces.git diff --git a/sound.h b/sound.h index 19f7e126..37e53b06 100644 --- a/sound.h +++ b/sound.h @@ -45,6 +45,7 @@ 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; @@ -66,12 +67,15 @@ 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 serversound); +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); qboolean S_LocalSound (const char *s); void S_StaticSound (sfx_t *sfx, vec3_t origin, float fvol, float attenuation); @@ -82,6 +86,8 @@ void S_PauseGameSounds (qboolean toggle); void S_StopChannel (unsigned int channel_ind, qboolean lockmutex); 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);