From a3c33e0fa9c424e8bb613f1e04d9d06680da9551 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 9 Dec 2024 00:12:51 +0300 Subject: [PATCH] engine: client: sound: make S_RawSampleStereo public to other parts of engine --- engine/client/s_main.c | 4 +--- engine/client/sound.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/client/s_main.c b/engine/client/s_main.c index e1a6d52b..4e8d26ca 100644 --- a/engine/client/s_main.c +++ b/engine/client/s_main.c @@ -20,8 +20,6 @@ GNU General Public License for more details. #include "pm_local.h" #include "platform/platform.h" -#define SND_CLIP_DISTANCE 1000.0f - dma_t dma; poolhandle_t sndpool; static soundfade_t soundfade; @@ -1111,7 +1109,7 @@ rawchan_t *S_FindRawChannel( int entnum, qboolean create ) S_RawSamplesStereo =================== */ -static uint S_RawSamplesStereo( portable_samplepair_t *rawsamples, uint rawend, uint max_samples, uint samples, uint rate, word width, word channels, const byte *data ) +uint S_RawSamplesStereo( portable_samplepair_t *rawsamples, uint rawend, uint max_samples, uint samples, uint rate, word width, word channels, const byte *data ) { uint fracstep, samplefrac; uint src, dst; diff --git a/engine/client/sound.h b/engine/client/sound.h index 4a8819c5..01dc6c5e 100644 --- a/engine/client/sound.h +++ b/engine/client/sound.h @@ -177,6 +177,7 @@ typedef struct #define MAX_CHANNELS (256 + MAX_DYNAMIC_CHANNELS) // Scourge Of Armagon has too many static sounds on hip2m4.bsp #define MAX_RAW_CHANNELS 48 #define MAX_RAW_SAMPLES 8192 +#define SND_CLIP_DISTANCE 1000.0f extern sound_t ambient_sfx[NUM_AMBIENTS]; extern qboolean snd_ambient; @@ -242,6 +243,7 @@ int S_GetCurrentStaticSounds( soundlist_t *pout, int size ); int S_GetCurrentDynamicSounds( soundlist_t *pout, int size ); sfx_t *S_GetSfxByHandle( sound_t handle ); rawchan_t *S_FindRawChannel( int entnum, qboolean create ); +uint S_RawSamplesStereo( portable_samplepair_t *rawsamples, uint rawend, uint max_samples, uint samples, uint rate, word width, word channels, const byte *data ); void S_RawEntSamples( int entnum, uint samples, uint rate, word width, word channels, const byte *data, int snd_vol ); void S_RawSamples( uint samples, uint rate, word width, word channels, const byte *data, int entnum ); void S_StopSound( int entnum, int channel, const char *soundname );