diff --git a/FindMPG123.cmake b/FindMPG123.cmake index 9b871d439..a9b6dd8b2 100644 --- a/FindMPG123.cmake +++ b/FindMPG123.cmake @@ -20,7 +20,7 @@ FIND_LIBRARY(MPG123_LIBRARIES NAMES mpg123 mpg123-0 PATH_SUFFIXES lib ) -MARK_AS_ADVANCED(MPG123_LIBRARIES MPG123_INCLUDE_DIR) +# MARK_AS_ADVANCED(MPG123_LIBRARIES MPG123_INCLUDE_DIR) # handle the QUIETLY and REQUIRED arguments and set MPG123_FOUND to TRUE if # all listed variables are TRUE diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index 2f30b95ab..62561aa95 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -23,6 +23,7 @@ #include "i_sound.h" #include "i_music.h" #include "s_sound.h" +#include "files.h" void I_InitMusicWin32 (); void I_ShutdownMusicWin32 (); diff --git a/src/sound/sndfile_decoder.cpp b/src/sound/sndfile_decoder.cpp index 4f86515b1..1eba863d4 100644 --- a/src/sound/sndfile_decoder.cpp +++ b/src/sound/sndfile_decoder.cpp @@ -15,7 +15,7 @@ sf_count_t SndFileDecoder::file_seek(sf_count_t offset, int whence, void *user_d { FileReader *reader = reinterpret_cast(user_data)->Reader; - if(reader->Seek(offset, whence) != 0) + if(reader->Seek((long)offset, whence) != 0) return -1; return reader->Tell(); } @@ -23,7 +23,7 @@ sf_count_t SndFileDecoder::file_seek(sf_count_t offset, int whence, void *user_d sf_count_t SndFileDecoder::file_read(void *ptr, sf_count_t count, void *user_data) { FileReader *reader = reinterpret_cast(user_data)->Reader; - return reader->Read(ptr, count); + return reader->Read(ptr, (long)count); } sf_count_t SndFileDecoder::file_write(const void *ptr, sf_count_t count, void *user_data) @@ -93,7 +93,7 @@ size_t SndFileDecoder::read(char *buffer, size_t bytes) size_t todo = std::min(frames-total, 64/SndInfo.channels); float tmp[64]; - size_t got = sf_readf_float(SndFile, tmp, todo); + size_t got = (size_t)sf_readf_float(SndFile, tmp, todo); if(got < todo) frames = total + got; for(size_t i = 0;i < got*SndInfo.channels;i++) @@ -111,7 +111,7 @@ TArray SndFileDecoder::readAll() int framesize = 2 * SndInfo.channels; TArray output; - output.Resize(SndInfo.frames * framesize); + output.Resize((unsigned)(SndInfo.frames * framesize)); size_t got = read(&output[0], output.Size()); output.Resize(got); @@ -128,12 +128,12 @@ bool SndFileDecoder::seek(size_t ms_offset) size_t SndFileDecoder::getSampleOffset() { - return sf_seek(SndFile, 0, SEEK_CUR); + return (size_t)sf_seek(SndFile, 0, SEEK_CUR); } size_t SndFileDecoder::getSampleLength() { - return (SndInfo.frames > 0) ? SndInfo.frames : 0; + return (size_t)((SndInfo.frames > 0) ? SndInfo.frames : 0); } #endif