Skip to content

Commit

Permalink
audio: Adjusted const/static fields on some variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 28, 2023
1 parent 280c2c1 commit 441a5b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/audio/SDL_audiocvt.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream *stream)
}

SDL_LockMutex(stream->lock);
float freq_ratio = stream->freq_ratio;
const float freq_ratio = stream->freq_ratio;
SDL_UnlockMutex(stream->lock);

return freq_ratio;
Expand All @@ -581,8 +581,8 @@ int SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream *stream, float freq_ratio)
}

// Picked mostly arbitrarily.
static const float min_freq_ratio = 0.01f;
static const float max_freq_ratio = 100.0f;
const float min_freq_ratio = 0.01f;
const float max_freq_ratio = 100.0f;

if (freq_ratio < min_freq_ratio) {
return SDL_SetError("Frequency ratio is too low");
Expand Down

0 comments on commit 441a5b7

Please sign in to comment.