Cleaning up warnings on MacOS X
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401491
This commit is contained in:
parent
6ef737becd
commit
c0aec157c6
23 changed files with 316 additions and 356 deletions
|
@ -29,7 +29,7 @@
|
|||
#include "SDL_sysaudio.h"
|
||||
|
||||
#ifdef __OS2__
|
||||
// We'll need the DosSetPriority() API!
|
||||
/* We'll need the DosSetPriority() API! */
|
||||
#define INCL_DOSPROCESS
|
||||
#include <os2.h>
|
||||
#endif
|
||||
|
@ -178,8 +178,8 @@ int SDL_RunAudio(void *audiop)
|
|||
#endif
|
||||
|
||||
#ifdef __OS2__
|
||||
// Increase the priority of this thread to make sure that
|
||||
// the audio will be continuous all the time!
|
||||
/* Increase the priority of this thread to make sure that
|
||||
the audio will be continuous all the time! */
|
||||
#ifdef USE_DOSSETPRIORITY
|
||||
if (SDL_getenv("SDL_USE_TIMECRITICAL_AUDIO"))
|
||||
{
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
|
||||
#if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT)
|
||||
#if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
|
||||
void SDL_MixAudio_MMX_S16(char* ,char* ,unsigned int ,int );
|
||||
void SDL_MixAudio_MMX_S8(char* ,char* ,unsigned int ,int );
|
||||
#endif
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
|
||||
|
||||
#if ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
|
||||
// headers for MMX assembler version of SDL_MixAudio
|
||||
// Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
|
||||
// Converted to Intel ASM notation by Cth
|
||||
// This code is licensed under the LGPL (see COPYING for details)
|
||||
//
|
||||
// Assumes buffer size in bytes is a multiple of 16
|
||||
// Assumes SDL_MIX_MAXVOLUME = 128
|
||||
|
||||
/* headers for MMX assembler version of SDL_MixAudio
|
||||
Copyright 2002 Stephane Marchesin (stephane.marchesin@wanadoo.fr)
|
||||
Converted to Intel ASM notation by Cth
|
||||
This code is licensed under the LGPL (see COPYING for details)
|
||||
|
||||
Assumes buffer size in bytes is a multiple of 16
|
||||
Assumes SDL_MIX_MAXVOLUME = 128
|
||||
*/
|
||||
void SDL_MixAudio_MMX_S16_VC(char* ,char* ,unsigned int ,int );
|
||||
void SDL_MixAudio_MMX_S8_VC(char* ,char* ,unsigned int ,int );
|
||||
#endif
|
||||
|
|
|
@ -433,7 +433,7 @@ SDL_AudioSpec * SDL_LoadWAV_RW (SDL_RWops *src, int freesrc,
|
|||
was_error = 1;
|
||||
goto done;
|
||||
}
|
||||
headerDiff += sizeof(Uint32); // for WAVE
|
||||
headerDiff += sizeof(Uint32); /* for WAVE */
|
||||
|
||||
/* Read the audio data format chunk */
|
||||
chunk.data = NULL;
|
||||
|
@ -446,7 +446,7 @@ SDL_AudioSpec * SDL_LoadWAV_RW (SDL_RWops *src, int freesrc,
|
|||
was_error = 1;
|
||||
goto done;
|
||||
}
|
||||
// 2 Uint32's for chunk header+len, plus the lenread
|
||||
/* 2 Uint32's for chunk header+len, plus the lenread */
|
||||
headerDiff += lenread + 2 * sizeof(Uint32);
|
||||
} while ( (chunk.magic == FACT) || (chunk.magic == LIST) );
|
||||
|
||||
|
@ -527,7 +527,7 @@ SDL_AudioSpec * SDL_LoadWAV_RW (SDL_RWops *src, int freesrc,
|
|||
*audio_buf = chunk.data;
|
||||
if(chunk.magic != DATA) headerDiff += lenread + 2 * sizeof(Uint32);
|
||||
} while ( chunk.magic != DATA );
|
||||
headerDiff += 2 * sizeof(Uint32); // for the data chunk and len
|
||||
headerDiff += 2 * sizeof(Uint32); /* for the data chunk and len */
|
||||
|
||||
if ( MS_ADPCM_encoded ) {
|
||||
if ( MS_ADPCM_decode(audio_buf, audio_len) < 0 ) {
|
||||
|
@ -554,7 +554,7 @@ done:
|
|||
if ( freesrc ) {
|
||||
SDL_RWclose(src);
|
||||
} else {
|
||||
// seek to the end of the file (given by the RIFF chunk)
|
||||
/* seek to the end of the file (given by the RIFF chunk) */
|
||||
SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,8 +128,8 @@ static OSStatus audioCallback (void *inRefCon,
|
|||
len = bufferSize - bufferOffset;
|
||||
if (len > remaining)
|
||||
len = remaining;
|
||||
SDL_memcpy(ptr, buffer + bufferOffset, len);
|
||||
ptr += len;
|
||||
SDL_memcpy(ptr, (char *)buffer + bufferOffset, len);
|
||||
ptr = (char *)ptr + len;
|
||||
remaining -= len;
|
||||
bufferOffset += len;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue