Skip to content

Commit

Permalink
audio: Moved unchanging variable out of loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 11, 2017
1 parent cb8bf6b commit 0085f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/SDL_audiocvt.c
Expand Up @@ -484,6 +484,7 @@ SDL_ResampleAudio(const int chans, const int inrate, const int outrate,
const float *inbuf, const int inbuflen,
float *outbuf, const int outbuflen)
{
const double finrate = (double) inrate;
const float outtimeincr = 1.0f / ((float) outrate);
const float ratio = ((float) outrate) / ((float) inrate);
const int paddinglen = ResamplerPadding(inrate, outrate);
Expand All @@ -498,7 +499,6 @@ SDL_ResampleAudio(const int chans, const int inrate, const int outrate,

for (i = 0; i < outframes; i++) {
const int srcindex = (int) (outtime * inrate);
const float finrate = (float) inrate;
const float intime = ((float) srcindex) / finrate;
const float innexttime = ((float) (srcindex + 1)) / finrate;

Expand Down

0 comments on commit 0085f91

Please sign in to comment.