Skip to content

Commit

Permalink
Updated Visual C++ project
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 11, 2006
1 parent ccd47f0 commit 58e19d8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
Binary file modified VisualC.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion effect_stereoreverse.c
Expand Up @@ -74,7 +74,7 @@ static void _Eff_reversestereo8(int chan, void *stream, int len, void *udata)
/* get the last two bytes if len is not divisible by four... */
if (len % sizeof (Uint32) != 0) {
Uint16 *p = (Uint16 *) (((Uint8 *) stream) + (len - 2));
*p = (((*p) & 0xFF00) >> 8) | (((*ptr) & 0x00FF) << 8);
*p = (Uint16)((((*p) & 0xFF00) >> 8) | (((*ptr) & 0x00FF) << 8));
len -= 2;
}

Expand Down
4 changes: 2 additions & 2 deletions load_voc.c
Expand Up @@ -244,7 +244,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
* Adjust period.
*/
if ((v->rate != -1) && (uc != v->rate))
period = (period * (256 - uc))/(256 - v->rate);
period = (Uint16)((period * (256 - uc))/(256 - v->rate));
else
v->rate = uc;
v->rest = period;
Expand Down Expand Up @@ -434,7 +434,7 @@ SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, int freesrc,
fillptr = ((Uint8 *) ptr) + (*audio_len - v.rest);
}

spec->samples = (*audio_len / v.size);
spec->samples = (Uint16)(*audio_len / v.size);

was_error = 0; /* success, baby! */

Expand Down
7 changes: 7 additions & 0 deletions mikmod/mikmod_internals.h
Expand Up @@ -88,6 +88,13 @@ extern MikMod_handler_t _mm_errorhandler;

/*========== Memory allocation */

/* _mm_malloc and _mm_free are defined in malloc.h in Visual C++ 6 */
#ifdef _mm_malloc
#undef _mm_malloc
#endif
#ifdef _mm_free
#undef _mm_free
#endif
extern void* _mm_malloc(size_t);
extern void* _mm_calloc(size_t,size_t);
#define _mm_free(p) { if (p) free(p); p = NULL; }
Expand Down
2 changes: 1 addition & 1 deletion music.c
Expand Up @@ -868,7 +868,7 @@ int music_internal_position(double position)
#ifdef MP3_MUSIC
case MUS_MP3:
if ( position > 0.0 ) {
SMPEG_skip(music_playing->data.mp3, position);
SMPEG_skip(music_playing->data.mp3, (float)position);
} else {
SMPEG_rewind(music_playing->data.mp3);
SMPEG_play(music_playing->data.mp3);
Expand Down
2 changes: 1 addition & 1 deletion timidity/readmidi.c
Expand Up @@ -91,7 +91,7 @@ static int sysex(uint32 len, uint8 *syschan, uint8 *sysa, uint8 *sysb, SDL_RWops
{
unsigned char *s=(unsigned char *)safe_malloc(len);
int id, model, ch, port, adhi, adlo, cd, dta, dtb, dtc;
if (len != SDL_RWread(rw, s, 1, len))
if (len != (uint32)SDL_RWread(rw, s, 1, len))
{
free(s);
return 0;
Expand Down
10 changes: 5 additions & 5 deletions timidity/resample.c
Expand Up @@ -38,18 +38,18 @@
# define RESAMPLATION \
v1=src[ofs>>FRACTION_BITS];\
v2=src[(ofs>>FRACTION_BITS)+1];\
*dest++ = v1 + (iplookup[(((v2-v1)<<5) & 0x03FE0) | \
((ofs & FRACTION_MASK) >> (FRACTION_BITS-5))]);
*dest++ = (resample_t)(v1 + (iplookup[(((v2-v1)<<5) & 0x03FE0) | \
((ofs & FRACTION_MASK) >> (FRACTION_BITS-5))]));
# else
# define RESAMPLATION \
v1=src[ofs>>FRACTION_BITS];\
v2=src[(ofs>>FRACTION_BITS)+1];\
*dest++ = v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS);
*dest++ = (resample_t)(v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS));
# endif
# define INTERPVARS sample_t v1, v2
#else
/* Earplugs recommended for maximum listening enjoyment */
# define RESAMPLATION *dest++=src[ofs>>FRACTION_BITS];
# define RESAMPLATION *dest++ = src[ofs>>FRACTION_BITS];
# define INTERPVARS
#endif

Expand Down Expand Up @@ -734,7 +734,7 @@ void pre_resample(Sample * sp)
{
v1 = src[ofs >> FRACTION_BITS];
v2 = src[(ofs >> FRACTION_BITS) + 1];
*dest++ = v1 + (((v2 - v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS);
*dest++ = (resample_t)(v1 + (((v2 - v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS));
}
else
*dest++ = src[ofs >> FRACTION_BITS];
Expand Down

0 comments on commit 58e19d8

Please sign in to comment.