Change UpdateSound() to accept const void *
The function means to accept a const * so let's declare it. Will allow passing const buffers in games. Also constness is next to godliness! Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
This commit is contained in:
parent
5df10d824c
commit
c394708c43
1 changed files with 11 additions and 10 deletions
|
|
@ -342,7 +342,7 @@ void UnloadSound(Sound sound)
|
|||
|
||||
// Update sound buffer with new data
|
||||
// NOTE: data must match sound.format
|
||||
void UpdateSound(Sound sound, void *data, int numSamples)
|
||||
void UpdateSound(Sound sound, const void *data, int numSamples)
|
||||
{
|
||||
ALint sampleRate, sampleSize, channels;
|
||||
alGetBufferi(sound.buffer, AL_FREQUENCY, &sampleRate);
|
||||
|
|
|
|||
Loading…
Reference in a new issue