diff --git a/include/amuse/SoundMacroState.hpp b/include/amuse/SoundMacroState.hpp index 8e0345f..f6fcf13 100644 --- a/include/amuse/SoundMacroState.hpp +++ b/include/amuse/SoundMacroState.hpp @@ -7,6 +7,10 @@ #include "Entity.hpp" #include "Common.hpp" +/* Squelch Win32 macro pollution >.< */ +#undef SendMessage +#undef GetMessage + namespace amuse { class Voice; diff --git a/lib/AudioGroupData.cpp b/lib/AudioGroupData.cpp index 5104153..7fc25c1 100644 --- a/lib/AudioGroupData.cpp +++ b/lib/AudioGroupData.cpp @@ -14,7 +14,7 @@ IntrusiveAudioGroupData::~IntrusiveAudioGroupData() } } -IntrusiveAudioGroupData::IntrusiveAudioGroupData(IntrusiveAudioGroupData&& other) +IntrusiveAudioGroupData::IntrusiveAudioGroupData(IntrusiveAudioGroupData&& other) noexcept : AudioGroupData(other.m_proj, other.m_projSz, other.m_pool, other.m_poolSz, other.m_sdir, other.m_sdirSz, other.m_samp, other.m_sampSz, other.m_fmt, other.m_absOffs) { @@ -22,7 +22,7 @@ IntrusiveAudioGroupData::IntrusiveAudioGroupData(IntrusiveAudioGroupData&& other other.m_owns = false; } -IntrusiveAudioGroupData& IntrusiveAudioGroupData::operator=(IntrusiveAudioGroupData&& other) +IntrusiveAudioGroupData& IntrusiveAudioGroupData::operator=(IntrusiveAudioGroupData&& other) noexcept { if (m_owns) { diff --git a/lib/AudioGroupPool.cpp b/lib/AudioGroupPool.cpp index cdfc6b4..917461f 100644 --- a/lib/AudioGroupPool.cpp +++ b/lib/AudioGroupPool.cpp @@ -73,7 +73,7 @@ AudioGroupPool::AudioGroupPool(const unsigned char* data) uint32_t count = SBig(*reinterpret_cast(cur + 8)); mappingsOut.reserve(count); const unsigned char* subcur = cur + 12; - for (int i = 0; i < count; ++i) + for (uint32_t i = 0; i < count; ++i) mappingsOut.push_back(reinterpret_cast(subcur + i * 12)); cur += size; @@ -133,7 +133,7 @@ AudioGroupPool::AudioGroupPool(const unsigned char* data, PCDataTag) uint32_t count = *reinterpret_cast(cur + 8); mappingsOut.reserve(count); const unsigned char* subcur = cur + 12; - for (int i = 0; i < count; ++i) + for (uint32_t i = 0; i < count; ++i) mappingsOut.push_back(reinterpret_cast(subcur + i * 12)); cur += size; diff --git a/lib/DSPCodec.c b/lib/DSPCodec.c index bbe106f..b3000ce 100644 --- a/lib/DSPCodec.c +++ b/lib/DSPCodec.c @@ -11,7 +11,7 @@ unsigned DSPDecompressFrame(int16_t* out, const uint8_t* in, int32_t factor2 = coefs[cIdx][1]; uint8_t exp = in[0] & 0xf; unsigned ret = 0; - for (int s=0 ; s<14 && s::applyEffect(T* audio, size_t frameCount, const ChannelMa for (size_t f = 0; f < frameCount;) { - for (int c = 0; c < chanMap.m_channelCount; ++c) + for (unsigned c = 0; c < chanMap.m_channelCount; ++c) { T* chanAud = audio + c; - for (int i = 0; i < m_blockSamples && f < frameCount; ++i, ++f) + for (unsigned i = 0; i < m_blockSamples && f < frameCount; ++i, ++f) { T& liveSamp = chanAud[chanMap.m_channelCount * i]; T& samp = x30_chanLines[c][xc_currentPos[c] * m_blockSamples + i]; diff --git a/lib/SongConverter.cpp b/lib/SongConverter.cpp index f901902..18aaba2 100644 --- a/lib/SongConverter.cpp +++ b/lib/SongConverter.cpp @@ -1324,7 +1324,7 @@ std::vector SongConverter::MIDIToSong(const std::vector& data, reg.m_progNum = 0xff; reg.m_unk1 = 0xff; reg.m_unk2 = 0; - reg.m_regionIndex = 0xffff; + reg.m_regionIndex = -1; reg.m_unk3 = 0; } else @@ -1333,7 +1333,7 @@ std::vector SongConverter::MIDIToSong(const std::vector& data, reg.m_progNum = 0xff; reg.m_unk1 = 0xff; reg.m_unk2 = 0; - reg.m_regionIndex = 0xffff; + reg.m_regionIndex = -1; reg.m_unk3 = 0; } } diff --git a/lib/SongState.cpp b/lib/SongState.cpp index db4a4e7..53c8137 100644 --- a/lib/SongState.cpp +++ b/lib/SongState.cpp @@ -372,7 +372,7 @@ bool SongState::Track::advance(Sequencer& seq, int32_t ticks) while (m_nextRegion->indexValid(m_parent.m_bigEndian)) { uint32_t nextRegTick = (m_parent.m_bigEndian ? SBig(m_nextRegion->m_startTick) : m_nextRegion->m_startTick); - if (endTick > nextRegTick) + if (uint32_t(endTick) > nextRegTick) advanceRegion(&seq); else break;