Skip to content

Commit

Permalink
Fixed 64-bit build on Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 13, 2017
1 parent f23f283 commit 5bd1209
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 27 deletions.
9 changes: 0 additions & 9 deletions VisualC/SDL_mixer.vcxproj
Expand Up @@ -278,15 +278,6 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
</CustomBuild>
<CustomBuild Include="external\lib\x64\libmikmod-2.dll">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename)%(Extension)</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\%(Filename)%(Extension)</Outputs>
</CustomBuild>
<CustomBuild Include="external\lib\x64\libmodplug-1.dll">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy %(FullPath) $(SolutionDir)\$(Platform)\$(Configuration)\</Command>
Expand Down
3 changes: 0 additions & 3 deletions VisualC/SDL_mixer.vcxproj.filters
Expand Up @@ -186,9 +186,6 @@
<CustomBuild Include="external\lib\x64\libmodplug-1.dll">
<Filter>x64</Filter>
</CustomBuild>
<CustomBuild Include="external\lib\x64\libmikmod-2.dll">
<Filter>x64</Filter>
</CustomBuild>
<CustomBuild Include="external\lib\x64\smpeg2.dll">
<Filter>x64</Filter>
</CustomBuild>
Expand Down
4 changes: 2 additions & 2 deletions load_voc.c
Expand Up @@ -329,7 +329,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)

static int voc_read(SDL_RWops *src, vs_t *v, Uint8 *buf, SDL_AudioSpec *spec)
{
int done = 0;
Uint32 done = 0;
Uint8 silence = 0x80;

if (v->rest == 0)
Expand All @@ -354,7 +354,7 @@ static int voc_read(SDL_RWops *src, vs_t *v, Uint8 *buf, SDL_AudioSpec *spec)

else
{
done = SDL_RWread(src, buf, 1, v->rest);
done = (Uint32)SDL_RWread(src, buf, 1, v->rest);
v->rest -= done;
if (v->size == ST_SIZE_WORD)
{
Expand Down
11 changes: 5 additions & 6 deletions music_flac.c
Expand Up @@ -211,8 +211,7 @@ static FLAC__StreamDecoderWriteStatus flac_write_music_cb(
else {
// we need to write to the overflow
if (!data->flac_data.overflow) {
data->flac_data.overflow_len =
4 * (frame->header.blocksize - i);
data->flac_data.overflow_len = (int)(4 * (frame->header.blocksize - i));
data->flac_data.overflow_read = 0;

// make it big enough for the rest of the block
Expand Down Expand Up @@ -409,18 +408,18 @@ static void FLAC_getsome(FLAC_music *music)
SDL_memcpy (music->flac_data.overflow,
music->flac_data.overflow + music->flac_data.max_to_read,
overflow_extra_len);
music->flac_data.overflow_len = overflow_extra_len;
music->flac_data.overflow_read = overflow_extra_len;
music->flac_data.overflow_len = (int)overflow_extra_len;
music->flac_data.overflow_read = (int)overflow_extra_len;
music->flac_data.max_to_read = 0;
} else {
SDL_memcpy (music->flac_data.data+music->flac_data.data_read,
music->flac_data.overflow, overflow_len);
music->flac_data.data_read += overflow_len;
music->flac_data.data_read += (int)overflow_len;
SDL_free (music->flac_data.overflow);
music->flac_data.overflow = NULL;
music->flac_data.overflow_len = 0;
music->flac_data.overflow_read = 0;
music->flac_data.max_to_read -= overflow_len;
music->flac_data.max_to_read -= (int)overflow_len;
}
}
else {
Expand Down
2 changes: 1 addition & 1 deletion music_modplug.c
Expand Up @@ -124,7 +124,7 @@ modplug_data *modplug_new_RW(SDL_RWops *src, int freesrc)
music = (modplug_data*)SDL_malloc(sizeof(modplug_data));
if (music) {
music->playing = 0;
music->file = modplug.ModPlug_Load(buf, sz);
music->file = modplug.ModPlug_Load(buf, (int)sz);
if (!music->file) {
SDL_free(music);
music = NULL;
Expand Down
2 changes: 1 addition & 1 deletion timidity/common.c
Expand Up @@ -136,7 +136,7 @@ FILE *open_file(const char *name, int decompress, int noise_mode)
while (plp) /* Try along the path then */
{
*current_filename=0;
l=strlen(plp->path);
l=(int)strlen(plp->path);
if(l)
{
strcpy(current_filename, plp->path);
Expand Down
8 changes: 3 additions & 5 deletions wavestream.c
Expand Up @@ -233,7 +233,7 @@ static int PlaySome(Uint8 *stream, int len)
if ((stop - pos) < original_len) {
original_len = (int)(stop - pos);
}
original_len = SDL_RWread(music->src, music->cvt.buf, 1, original_len);
original_len = (int)SDL_RWread(music->src, music->cvt.buf, 1, original_len);
music->cvt.len = original_len;
SDL_ConvertAudio(&music->cvt);
SDL_MixAudioFormat(stream, music->cvt.buf, mixer.format,music->cvt.len_cvt, wavestream_volume);
Expand All @@ -245,7 +245,7 @@ static int PlaySome(Uint8 *stream, int len)
}
data = SDL_stack_alloc(Uint8, len);
if (data) {
len = SDL_RWread(music->src, data, 1, len);
len = (int)SDL_RWread(music->src, data, 1, len);
SDL_MixAudioFormat(stream, data, mixer.format, len, wavestream_volume);
SDL_stack_free(data);
}
Expand Down Expand Up @@ -404,7 +404,7 @@ static SDL_bool ParseSMPL(WAVStream *wave, Uint32 chunk_length)
{
SamplerChunk *chunk;
Uint8 *data;
int i;
Uint32 i;
SDL_bool loaded = SDL_FALSE;

data = (Uint8 *)SDL_malloc(chunk_length);
Expand All @@ -427,8 +427,6 @@ static SDL_bool ParseSMPL(WAVStream *wave, Uint32 chunk_length)
}

loaded = SDL_TRUE;

done:
SDL_free(data);
return loaded;
}
Expand Down

0 comments on commit 5bd1209

Please sign in to comment.