Fixes for compiling with Visual C++ 8.0 Express Edition

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402369
This commit is contained in:
Sam Lantinga 2007-06-19 05:53:56 +00:00
parent 80dcd123dc
commit ed60e3a7d4
8 changed files with 12 additions and 13 deletions

View file

@ -555,7 +555,7 @@ prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared)
switch (orig->channels) {
case 0:{
const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
if ((!env) || ((prepared->channels = SDL_atoi(env)) == 0)) {
if ((!env) || ((prepared->channels = (Uint8)SDL_atoi(env)) == 0)) {
prepared->channels = 2; /* a reasonable default */
}
break;

View file

@ -1177,7 +1177,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
case 32:
{
/* !!! FIXME: need 32-bit converter here! */
#ifdef DEBUG_CONVERT
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
#endif
}
}
} else {
@ -1214,7 +1216,9 @@ SDL_RateSLOW(SDL_AudioCVT * cvt, SDL_AudioFormat format)
case 32:
{
/* !!! FIXME: need 32-bit converter here! */
#ifdef DEBUG_CONVERT
fprintf(stderr, "FIXME: need 32-bit converter here!\n");
#endif
}
}
}

View file

@ -303,8 +303,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
float src1, src2;
double dst_sample;
/* !!! FIXME: are these right? */
const double max_audioval = 3.40282347e+38F;
const double min_audioval = -3.40282347e+38F;
const double max_audioval = 3.402823466e+38F;
const double min_audioval = -3.402823466e+38F;
len /= 4;
while (len--) {
@ -332,8 +332,8 @@ SDL_MixAudioFormat(Uint8 * dst, const Uint8 * src, SDL_AudioFormat format,
float src1, src2;
double dst_sample;
/* !!! FIXME: are these right? */
const double max_audioval = 3.40282347e+38F;
const double min_audioval = -3.40282347e+38F;
const double max_audioval = 3.402823466e+38F;
const double min_audioval = -3.402823466e+38F;
len /= 4;
while (len--) {