Mercurial > SDL_sound_CoreAudio
diff SDL_sound.c @ 441:5b00e43ec23c
Patches to make SDL_sound more Visual C happy.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 31 Jan 2003 01:53:12 +0000 |
parents | ddce7101673e |
children | d0393837bfac |
line wrap: on
line diff
--- a/SDL_sound.c Sun Jan 12 22:06:38 2003 +0000 +++ b/SDL_sound.c Fri Jan 31 01:53:12 2003 +0000 @@ -38,6 +38,7 @@ #include <ctype.h> #include "SDL.h" +#include "SDL_thread.h" #include "SDL_sound.h" #define __SDL_SOUND_INTERNAL__ @@ -389,7 +390,7 @@ Uint32 __Sound_convertMsToBytePos(Sound_AudioInfo *info, Uint32 ms) { /* "frames" == "sample frames" */ - float frames_per_ms = ((float) info->rate) / 1000.0; + float frames_per_ms = ((float) info->rate) / 1000.0f; Uint32 frame_offset = (Uint32) (frames_per_ms * ((float) ms)); Uint32 frame_size = (Uint32) ((info->format & 0xFF) / 8) * info->channels; return(frame_offset * frame_size);