Updated Visual C++ project
authorSam Lantinga <slouken@libsdl.org>
Thu, 11 May 2006 19:30:52 +0000
changeset 31077e72cff08e7
parent 309 e1c0ccfd16b6
child 311 9c32dbc9e383
Updated Visual C++ project
VisualC.zip
effect_stereoreverse.c
load_voc.c
mikmod/mikmod_internals.h
music.c
timidity/readmidi.c
timidity/resample.c
     1.1 Binary file VisualC.zip has changed
     2.1 --- a/effect_stereoreverse.c	Thu May 11 19:09:40 2006 +0000
     2.2 +++ b/effect_stereoreverse.c	Thu May 11 19:30:52 2006 +0000
     2.3 @@ -74,7 +74,7 @@
     2.4      /* get the last two bytes if len is not divisible by four... */
     2.5      if (len % sizeof (Uint32) != 0) {
     2.6          Uint16 *p = (Uint16 *) (((Uint8 *) stream) + (len - 2));
     2.7 -        *p = (((*p) & 0xFF00) >> 8) | (((*ptr) & 0x00FF) << 8);
     2.8 +        *p = (Uint16)((((*p) & 0xFF00) >> 8) | (((*ptr) & 0x00FF) << 8));
     2.9          len -= 2;
    2.10      }
    2.11  
     3.1 --- a/load_voc.c	Thu May 11 19:09:40 2006 +0000
     3.2 +++ b/load_voc.c	Thu May 11 19:30:52 2006 +0000
     3.3 @@ -244,7 +244,7 @@
     3.4                   * Adjust period.
     3.5                   */
     3.6                  if ((v->rate != -1) && (uc != v->rate))
     3.7 -                    period = (period * (256 - uc))/(256 - v->rate);
     3.8 +                    period = (Uint16)((period * (256 - uc))/(256 - v->rate));
     3.9                  else
    3.10                      v->rate = uc;
    3.11                  v->rest = period;
    3.12 @@ -434,7 +434,7 @@
    3.13          fillptr = ((Uint8 *) ptr) + (*audio_len - v.rest);
    3.14      }
    3.15  
    3.16 -    spec->samples = (*audio_len / v.size);
    3.17 +    spec->samples = (Uint16)(*audio_len / v.size);
    3.18  
    3.19      was_error = 0;  /* success, baby! */
    3.20  
     4.1 --- a/mikmod/mikmod_internals.h	Thu May 11 19:09:40 2006 +0000
     4.2 +++ b/mikmod/mikmod_internals.h	Thu May 11 19:30:52 2006 +0000
     4.3 @@ -88,6 +88,13 @@
     4.4  
     4.5  /*========== Memory allocation */
     4.6  
     4.7 +/* _mm_malloc and _mm_free are defined in malloc.h in Visual C++ 6 */
     4.8 +#ifdef _mm_malloc
     4.9 +#undef _mm_malloc
    4.10 +#endif
    4.11 +#ifdef _mm_free
    4.12 +#undef _mm_free
    4.13 +#endif
    4.14  extern void* _mm_malloc(size_t);
    4.15  extern void* _mm_calloc(size_t,size_t);
    4.16  #define _mm_free(p) { if (p) free(p); p = NULL; }
     5.1 --- a/music.c	Thu May 11 19:09:40 2006 +0000
     5.2 +++ b/music.c	Thu May 11 19:30:52 2006 +0000
     5.3 @@ -868,7 +868,7 @@
     5.4  #ifdef MP3_MUSIC
     5.5  	    case MUS_MP3:
     5.6  		if ( position > 0.0 ) {
     5.7 -			SMPEG_skip(music_playing->data.mp3, position);
     5.8 +			SMPEG_skip(music_playing->data.mp3, (float)position);
     5.9  		} else {
    5.10  			SMPEG_rewind(music_playing->data.mp3);
    5.11  			SMPEG_play(music_playing->data.mp3);
     6.1 --- a/timidity/readmidi.c	Thu May 11 19:09:40 2006 +0000
     6.2 +++ b/timidity/readmidi.c	Thu May 11 19:30:52 2006 +0000
     6.3 @@ -91,7 +91,7 @@
     6.4  {
     6.5    unsigned char *s=(unsigned char *)safe_malloc(len);
     6.6    int id, model, ch, port, adhi, adlo, cd, dta, dtb, dtc;
     6.7 -  if (len != SDL_RWread(rw, s, 1, len))
     6.8 +  if (len != (uint32)SDL_RWread(rw, s, 1, len))
     6.9      {
    6.10        free(s);
    6.11        return 0;
     7.1 --- a/timidity/resample.c	Thu May 11 19:09:40 2006 +0000
     7.2 +++ b/timidity/resample.c	Thu May 11 19:30:52 2006 +0000
     7.3 @@ -38,18 +38,18 @@
     7.4  #   define RESAMPLATION \
     7.5         v1=src[ofs>>FRACTION_BITS];\
     7.6         v2=src[(ofs>>FRACTION_BITS)+1];\
     7.7 -       *dest++ = v1 + (iplookup[(((v2-v1)<<5) & 0x03FE0) | \
     7.8 -           ((ofs & FRACTION_MASK) >> (FRACTION_BITS-5))]);
     7.9 +       *dest++ = (resample_t)(v1 + (iplookup[(((v2-v1)<<5) & 0x03FE0) | \
    7.10 +           ((ofs & FRACTION_MASK) >> (FRACTION_BITS-5))]));
    7.11  # else
    7.12  #   define RESAMPLATION \
    7.13        v1=src[ofs>>FRACTION_BITS];\
    7.14        v2=src[(ofs>>FRACTION_BITS)+1];\
    7.15 -      *dest++ = v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS);
    7.16 +      *dest++ = (resample_t)(v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS));
    7.17  # endif
    7.18  #  define INTERPVARS sample_t v1, v2
    7.19  #else
    7.20  /* Earplugs recommended for maximum listening enjoyment */
    7.21 -#  define RESAMPLATION *dest++=src[ofs>>FRACTION_BITS];
    7.22 +#  define RESAMPLATION *dest++ = src[ofs>>FRACTION_BITS];
    7.23  #  define INTERPVARS
    7.24  #endif
    7.25  
    7.26 @@ -734,7 +734,7 @@
    7.27      {
    7.28        v1 = src[ofs >> FRACTION_BITS];
    7.29        v2 = src[(ofs >> FRACTION_BITS) + 1];
    7.30 -      *dest++ = v1 + (((v2 - v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS);
    7.31 +      *dest++ = (resample_t)(v1 + (((v2 - v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS));
    7.32      }
    7.33    else
    7.34      *dest++ = src[ofs >> FRACTION_BITS];