Fixed compile on 64-bit Ubuntu

This commit is contained in:
casey langen 2016-06-10 22:20:42 -07:00
parent 509423a43a
commit b7c8cacddf
3 changed files with 4 additions and 2 deletions

View File

@ -86,7 +86,7 @@ AlsaOut::~AlsaOut() {
void AlsaOut::InitDevice() {
int err, dir;
size_t rate = this->rate;
unsigned int rate = (unsigned int) this->rate;
if ((err = snd_pcm_open(&this->pcmHandle, this->device.c_str(), SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
std::cerr << "AlsaOut: cannot open audio device 'default' :" << snd_strerror(err) << std::endl;

View File

@ -57,6 +57,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
if(MSVC AND ENABLE_STATIC_RUNTIME)
foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")

View File

@ -82,7 +82,7 @@ void MessageQueue::Remove(IMessageTarget *target, int type) {
void MessageQueue::Post(IMessagePtr message, int64 delayMs) {
boost::recursive_mutex::scoped_lock lock(this->queueMutex);
delayMs = std::max(0LL, delayMs);
delayMs = std::max((int64) 0, delayMs);
milliseconds now = duration_cast<milliseconds>(
system_clock::now().time_since_epoch());