X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sound.h;h=7fd841ded43dc871e549ac345a5fcbbf73ce1cd3;hb=efd89dee09ac8a3c6b31dd71d61dd5bca54ca6eb;hp=5ab1c4d8f020f8bcd5c0d832225a362b3f16943e;hpb=edfcde7fdd922dfdd65d5eaa93e1ec9cca33bab0;p=xonotic%2Fdarkplaces.git diff --git a/sound.h b/sound.h index 5ab1c4d8..7fd841de 100644 --- a/sound.h +++ b/sound.h @@ -46,6 +46,7 @@ typedef struct sfx_s char name[MAX_QPATH]; mempool_t *mempool; sfxcache_t *sfxcache; + int silentlymissing; // true if missing and loaded with complain = false } sfx_t; typedef struct @@ -65,6 +66,7 @@ typedef struct typedef struct { sfx_t *sfx; // sfx number + int forceloop; // force looping even if the sound is not looped int leftvol; // 0-255 volume int rightvol; // 0-255 volume int end; // end time in global paintsamples @@ -90,6 +92,8 @@ typedef struct void S_Init (void); void S_Startup (void); void S_Shutdown (void); +void S_Open (void); +void S_Close (void); void S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation); void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuation); void S_StopSound (int entnum, int entchannel); @@ -110,7 +114,7 @@ void S_InitPaintChannels (void); channel_t *SND_PickChannel(int entnum, int entchannel); // spatializes a channel -void SND_Spatialize(channel_t *ch); +void SND_Spatialize(channel_t *ch, int isstatic); // initializes cycling through a DMA buffer and returns information on it qboolean SNDDMA_Init(void); @@ -186,6 +190,14 @@ void S_RawSamples_Enqueue(short *samples, unsigned int length); void S_RawSamples_Dequeue(int *samples, unsigned int length); // empty the rawsamples queue void S_RawSamples_ClearQueue(void); +// returns how much more data the queue wants, or 0 if it is already full enough +int S_RawSamples_QueueWantsMore(void); + +// resamples one sound buffer into another, while changing the length +void S_ResampleBuffer16Stereo(short *input, int inputlength, short *output, int outputlength); + +// returns the rate that the rawsamples system is running at +int S_RawSamples_SampleRate(void); #endif