[libOpenMPT Legacy] Updated to version 0.5.18

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-11 07:27:02 -07:00
parent dd307d27a7
commit f38f38ee4a
11 changed files with 56 additions and 31 deletions

View File

@ -1,4 +1,4 @@
MPT_SVNVERSION=17112
MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.17
MPT_SVNDATE=2022-03-13T14:51:00.976461Z
MPT_SVNVERSION=17278
MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.18
MPT_SVNDATE=2022-04-24T13:19:56.339906Z

View File

@ -1,10 +1,10 @@
#pragma once
#define OPENMPT_VERSION_SVNVERSION "17112"
#define OPENMPT_VERSION_REVISION 17112
#define OPENMPT_VERSION_SVNVERSION "17278"
#define OPENMPT_VERSION_REVISION 17278
#define OPENMPT_VERSION_DIRTY 0
#define OPENMPT_VERSION_MIXEDREVISIONS 0
#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.17"
#define OPENMPT_VERSION_DATE "2022-03-13T14:51:00.976461Z"
#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.18"
#define OPENMPT_VERSION_DATE "2022-04-24T13:19:56.339906Z"
#define OPENMPT_VERSION_IS_PACKAGE 1

View File

@ -14,6 +14,7 @@
#if defined(MPT_ENABLE_TEMPFILE) && MPT_OS_WINDOWS
#include <windows.h>
#include "mptFileIO.h"
#include <stdexcept>
#endif // MPT_ENABLE_TEMPFILE && MPT_OS_WINDOWS

View File

@ -18,6 +18,6 @@ OPENMPT_NAMESPACE_BEGIN
#define VER_MAJORMAJOR 1
#define VER_MAJOR 29
#define VER_MINOR 15
#define VER_MINORMINOR 06
#define VER_MINORMINOR 08
OPENMPT_NAMESPACE_END

View File

@ -5,6 +5,16 @@ Changelog {#changelog}
For fully detailed change log, please see the source repository directly. This
is just a high-level summary.
### libopenmpt 0.5.18 (2022-04-24)
* Pitch / Pan Separation and Random Variation instrument properties were not
resetting properly when seeking, potentially causing instruments to be
played e.g. at a vastly different pan position compared to playing the
module continuously.
* MED: Stereo samples were not imported correctly.
* zlib: Update to v1.2.12 (2022-03-27).
### libopenmpt 0.5.17 (2022-03-13)
* [**Sec**] Possible out-of-bounds write in malformed IT / XM / MPTM files

View File

@ -19,7 +19,7 @@
/*! \brief libopenmpt minor version number */
#define OPENMPT_API_VERSION_MINOR 5
/*! \brief libopenmpt patch version number */
#define OPENMPT_API_VERSION_PATCH 17
#define OPENMPT_API_VERSION_PATCH 18
/*! \brief libopenmpt pre-release tag */
#define OPENMPT_API_VERSION_PREREL ""
/*! \brief libopenmpt pre-release flag */

View File

@ -1,8 +1,8 @@
LIBOPENMPT_VERSION_MAJOR=0
LIBOPENMPT_VERSION_MINOR=5
LIBOPENMPT_VERSION_PATCH=17
LIBOPENMPT_VERSION_PATCH=18
LIBOPENMPT_VERSION_PREREL=
LIBOPENMPT_LTVER_CURRENT=2
LIBOPENMPT_LTVER_REVISION=17
LIBOPENMPT_LTVER_REVISION=18
LIBOPENMPT_LTVER_AGE=2

View File

@ -759,7 +759,10 @@ bool CSoundFile::ReadMED(FileReader &file, ModLoadingFlags loadFlags)
if(instrOffsets[ins - 1] != 0 && file.Seek(instrOffsets[ins - 1]))
{
file.ReadStruct(instrHeader);
sampleChunk = file.ReadChunk(instrHeader.length);
uint32 chunkLength = instrHeader.length;
if(instrHeader.type > 0 && (instrHeader.type & MMDInstrHeader::STEREO))
chunkLength *= 2u;
sampleChunk = file.ReadChunk(chunkLength);
}
const bool isSynth = instrHeader.type < 0;
const size_t maskedType = static_cast<size_t>(instrHeader.type & MMDInstrHeader::TYPEMASK);
@ -911,7 +914,7 @@ bool CSoundFile::ReadMED(FileReader &file, ModLoadingFlags loadFlags)
sampleIO |= SampleIO::_16bit;
length /= 2;
}
if (instrHeader.type & MMDInstrHeader::STEREO)
if(instrHeader.type & MMDInstrHeader::STEREO)
{
sampleIO |= SampleIO::stereoSplit;
length /= 2;

View File

@ -152,6 +152,28 @@ void ModChannel::SetInstrumentPan(int32 pan, const CSoundFile &sndFile)
}
void ModChannel::RestorePanAndFilter()
{
if(nRestorePanOnNewNote > 0)
{
nPan = (nRestorePanOnNewNote & 0x7FFF) - 1;
if(nRestorePanOnNewNote & 0x8000)
dwFlags.set(CHN_SURROUND);
nRestorePanOnNewNote = 0;
}
if(nRestoreResonanceOnNewNote > 0)
{
nResonance = nRestoreResonanceOnNewNote - 1;
nRestoreResonanceOnNewNote = 0;
}
if(nRestoreCutoffOnNewNote > 0)
{
nCutOff = nRestoreCutoffOnNewNote - 1;
nRestoreCutoffOnNewNote = 0;
}
}
void ModChannel::RecalcTuningFreq(Tuning::RATIOTYPE vibratoFactor, Tuning::NOTEINDEXTYPE arpeggioSteps, const CSoundFile &sndFile)
{
if(!HasCustomTuning())

View File

@ -195,6 +195,7 @@ struct ModChannel
void UpdateInstrumentVolume(const ModSample *smp, const ModInstrument *ins);
void SetInstrumentPan(int32 pan, const CSoundFile &sndFile);
void RestorePanAndFilter();
void RecalcTuningFreq(Tuning::RATIOTYPE vibratoFactor, Tuning::NOTEINDEXTYPE arpeggioSteps, const CSoundFile &sndFile);

View File

@ -550,7 +550,11 @@ std::vector<GetLengthType> CSoundFile::GetLength(enmGetLengthResetMode adjustMod
chn.nLastNote = NOTE_NONE;
memory.chnSettings[nChn].vol = 0xFF;
}
if (chn.rowCommand.IsNote()) chn.nLastNote = note;
if(chn.rowCommand.IsNote())
{
chn.nLastNote = note;
chn.RestorePanAndFilter();
}
// Update channel panning
if(chn.rowCommand.IsNote() || chn.rowCommand.instr)
@ -2940,23 +2944,7 @@ bool CSoundFile::ProcessEffects()
CheckNNA(nChn, instr, note, false);
}
if(chn.nRestorePanOnNewNote > 0)
{
chn.nPan = (chn.nRestorePanOnNewNote & 0x7FFF) - 1;
if(chn.nRestorePanOnNewNote & 0x8000)
chn.dwFlags.set(CHN_SURROUND);
chn.nRestorePanOnNewNote = 0;
}
if(chn.nRestoreResonanceOnNewNote > 0)
{
chn.nResonance = chn.nRestoreResonanceOnNewNote - 1;
chn.nRestoreResonanceOnNewNote = 0;
}
if(chn.nRestoreCutoffOnNewNote > 0)
{
chn.nCutOff = chn.nRestoreCutoffOnNewNote - 1;
chn.nRestoreCutoffOnNewNote = 0;
}
chn.RestorePanAndFilter();
}
// Instrument Change ?