Fixed a few compiler warnings.
parent
4aa9e36983
commit
3761b5f60b
|
@ -598,7 +598,7 @@ SDL_RunAudio(void *devicep)
|
||||||
/* if this fails...oh well. We'll play silence here. */
|
/* if this fails...oh well. We'll play silence here. */
|
||||||
SDL_AudioStreamPut(device->stream, stream, stream_len);
|
SDL_AudioStreamPut(device->stream, stream, stream_len);
|
||||||
|
|
||||||
while (SDL_AudioStreamAvailable(device->stream) >= device->spec.size) {
|
while (SDL_AudioStreamAvailable(device->stream) >= ((int) device->spec.size)) {
|
||||||
stream = SDL_AtomicGet(&device->enabled) ? current_audio.impl.GetDeviceBuf(device) : NULL;
|
stream = SDL_AtomicGet(&device->enabled) ? current_audio.impl.GetDeviceBuf(device) : NULL;
|
||||||
if (stream == NULL) {
|
if (stream == NULL) {
|
||||||
SDL_AudioStreamClear(device->stream);
|
SDL_AudioStreamClear(device->stream);
|
||||||
|
@ -701,7 +701,7 @@ SDL_CaptureAudio(void *devicep)
|
||||||
/* if this fails...oh well. */
|
/* if this fails...oh well. */
|
||||||
SDL_AudioStreamPut(device->stream, stream, stream_len);
|
SDL_AudioStreamPut(device->stream, stream, stream_len);
|
||||||
|
|
||||||
while (SDL_AudioStreamAvailable(device->stream) >= device->callbackspec.size) {
|
while (SDL_AudioStreamAvailable(device->stream) >= ((int) device->callbackspec.size)) {
|
||||||
const int got = SDL_AudioStreamGet(device->stream, device->callbackspec.size, device->fake_stream, device->fake_stream_len);
|
const int got = SDL_AudioStreamGet(device->stream, device->callbackspec.size, device->fake_stream, device->fake_stream_len);
|
||||||
SDL_assert((got < 0) || (got == device->callbackspec.size));
|
SDL_assert((got < 0) || (got == device->callbackspec.size));
|
||||||
if (got != device->callbackspec.size) {
|
if (got != device->callbackspec.size) {
|
||||||
|
|
|
@ -729,7 +729,7 @@ ResampleAudioStream(SDL_AudioStream *stream, const float *inbuf, const int inbuf
|
||||||
stream->resampler_state[i] = last_sample[i];
|
stream->resampler_state[i] = last_sample[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return (dst - outbuf) * sizeof (float);
|
return (int) ((dst - outbuf) * sizeof (float));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Uint8 *
|
static Uint8 *
|
||||||
|
@ -844,7 +844,7 @@ SDL_AudioStreamGet(SDL_AudioStream *stream, Uint32 len, void *buf, const Uint32
|
||||||
return SDL_SetError("Can't request partial sample frames");
|
return SDL_SetError("Can't request partial sample frames");
|
||||||
}
|
}
|
||||||
|
|
||||||
return SDL_ReadFromDataQueue(stream->queue, buf, buflen);
|
return (int) SDL_ReadFromDataQueue(stream->queue, buf, buflen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* number of converted/resampled bytes available */
|
/* number of converted/resampled bytes available */
|
||||||
|
|
Loading…
Reference in New Issue