X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=sound.h;h=4f44d24049fe947b220659ce6d2ceb1a6c02b532;hp=ebc0a849ccea6219d1c40fd7e9fdbf4d3e49853f;hb=38a6d5886112027efd65fa160c1902a0d3b3fd20;hpb=cca6f0cbe16bbb8d62d264bed54da2e6e6a7ed75 diff --git a/sound.h b/sound.h index ebc0a849..4f44d240 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 @@ -90,6 +91,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); @@ -177,5 +180,23 @@ void SNDDMA_Submit(void); void S_AmbientOff (void); void S_AmbientOn (void); +void *S_LockBuffer(void); +void S_UnlockBuffer(void); + +// add some data to the tail of the rawsamples queue +void S_RawSamples_Enqueue(short *samples, unsigned int length); +// read and remove some data from the head of the rawsamples queue +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