Make sound samples const

This commit is contained in:
Denis Pauk 2023-08-23 13:09:35 +03:00
parent 2fc15692d3
commit 3b82261dec
5 changed files with 6 additions and 6 deletions

View file

@ -276,7 +276,7 @@ void SDL_Update(void);
* playback
*/
void SDL_RawSamples(int samples, int rate, int width,
int channels, byte *data, float volume);
int channels, const byte *data, float volume);
/*
* Spartializes a sample
@ -348,7 +348,7 @@ void AL_Update(void);
* Plays raw samples
*/
void AL_RawSamples(int samples, int rate, int width,
int channels, byte *data, float volume);
int channels, const byte *data, float volume);
/*
* Unqueues any raw samples

View file

@ -42,7 +42,7 @@ void S_StartSound(vec3_t origin, int entnum, int entchannel,
void S_StartLocalSound(char *sound);
void S_RawSamples(int samples, int rate, int width, int channels,
byte *data, float volume);
const byte *data, float volume);
void S_StopAllSounds(void);
void S_Update(vec3_t origin, vec3_t forward, vec3_t right, vec3_t up);
void S_Activate(qboolean active);

View file

@ -954,7 +954,7 @@ AL_IssuePlaysounds(void)
*/
void
AL_RawSamples(int samples, int rate, int width, int channels,
byte *data, float volume)
const byte *data, float volume)
{
ALuint buffer;
ALuint format = 0;

View file

@ -1000,7 +1000,7 @@ SDL_Cache(sfx_t *sfx, wavinfo_t *info, byte *data, short volume,
* and cinematic playback.
*/
void
SDL_RawSamples(int samples, int rate, int width, int channels, byte *data, float volume)
SDL_RawSamples(int samples, int rate, int width, int channels, const byte *data, float volume)
{
float scale;
int dst;

View file

@ -1379,7 +1379,7 @@ S_BuildSoundList(int *sounds)
*/
void
S_RawSamples(int samples, int rate, int width,
int channels, byte *data, float volume)
int channels, const byte *data, float volume)
{
if (sound_started == SS_NOT)
{