Fixed build warning on Android
This commit is contained in:
@@ -292,14 +292,14 @@ static int SDL_ResampleAudio(const int chans, const int inrate, const int outrat
|
|||||||
const int framelen = chans * (int)sizeof(float);
|
const int framelen = chans * (int)sizeof(float);
|
||||||
const int inframes = inbuflen / framelen;
|
const int inframes = inbuflen / framelen;
|
||||||
/* outbuflen isn't total to write, it's total available. */
|
/* outbuflen isn't total to write, it's total available. */
|
||||||
const int wantedoutframes = ((Sint64)inframes) * outrate / inrate;
|
const int wantedoutframes = (int)((Sint64)inframes * outrate / inrate);
|
||||||
const int maxoutframes = outbuflen / framelen;
|
const int maxoutframes = outbuflen / framelen;
|
||||||
const int outframes = SDL_min(wantedoutframes, maxoutframes);
|
const int outframes = SDL_min(wantedoutframes, maxoutframes);
|
||||||
float *dst = outbuf;
|
float *dst = outbuf;
|
||||||
int i, j, chan;
|
int i, j, chan;
|
||||||
|
|
||||||
for (i = 0; i < outframes; i++) {
|
for (i = 0; i < outframes; i++) {
|
||||||
const int srcindex = ((Sint64)i) * inrate / outrate;
|
const int srcindex = (int)((Sint64)i * inrate / outrate);
|
||||||
/* Calculating the following way avoids subtraction or modulo of large
|
/* Calculating the following way avoids subtraction or modulo of large
|
||||||
* floats which have low result precision.
|
* floats which have low result precision.
|
||||||
* interpolation1
|
* interpolation1
|
||||||
|
|||||||
Reference in New Issue
Block a user