[libOpenMPT Legacy] Updated to version 0.5.18
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
dd307d27a7
commit
f38f38ee4a
11 changed files with 56 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
MPT_SVNVERSION=17112
|
MPT_SVNVERSION=17278
|
||||||
MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.17
|
MPT_SVNURL=https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.18
|
||||||
MPT_SVNDATE=2022-03-13T14:51:00.976461Z
|
MPT_SVNDATE=2022-04-24T13:19:56.339906Z
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#define OPENMPT_VERSION_SVNVERSION "17112"
|
#define OPENMPT_VERSION_SVNVERSION "17278"
|
||||||
#define OPENMPT_VERSION_REVISION 17112
|
#define OPENMPT_VERSION_REVISION 17278
|
||||||
#define OPENMPT_VERSION_DIRTY 0
|
#define OPENMPT_VERSION_DIRTY 0
|
||||||
#define OPENMPT_VERSION_MIXEDREVISIONS 0
|
#define OPENMPT_VERSION_MIXEDREVISIONS 0
|
||||||
#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.17"
|
#define OPENMPT_VERSION_URL "https://source.openmpt.org/svn/openmpt/tags/libopenmpt-0.5.18"
|
||||||
#define OPENMPT_VERSION_DATE "2022-03-13T14:51:00.976461Z"
|
#define OPENMPT_VERSION_DATE "2022-04-24T13:19:56.339906Z"
|
||||||
#define OPENMPT_VERSION_IS_PACKAGE 1
|
#define OPENMPT_VERSION_IS_PACKAGE 1
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#if defined(MPT_ENABLE_TEMPFILE) && MPT_OS_WINDOWS
|
#if defined(MPT_ENABLE_TEMPFILE) && MPT_OS_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "mptFileIO.h"
|
#include "mptFileIO.h"
|
||||||
|
#include <stdexcept>
|
||||||
#endif // MPT_ENABLE_TEMPFILE && MPT_OS_WINDOWS
|
#endif // MPT_ENABLE_TEMPFILE && MPT_OS_WINDOWS
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,6 @@ OPENMPT_NAMESPACE_BEGIN
|
||||||
#define VER_MAJORMAJOR 1
|
#define VER_MAJORMAJOR 1
|
||||||
#define VER_MAJOR 29
|
#define VER_MAJOR 29
|
||||||
#define VER_MINOR 15
|
#define VER_MINOR 15
|
||||||
#define VER_MINORMINOR 06
|
#define VER_MINORMINOR 08
|
||||||
|
|
||||||
OPENMPT_NAMESPACE_END
|
OPENMPT_NAMESPACE_END
|
||||||
|
|
|
@ -5,6 +5,16 @@ Changelog {#changelog}
|
||||||
For fully detailed change log, please see the source repository directly. This
|
For fully detailed change log, please see the source repository directly. This
|
||||||
is just a high-level summary.
|
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)
|
### libopenmpt 0.5.17 (2022-03-13)
|
||||||
|
|
||||||
* [**Sec**] Possible out-of-bounds write in malformed IT / XM / MPTM files
|
* [**Sec**] Possible out-of-bounds write in malformed IT / XM / MPTM files
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
/*! \brief libopenmpt minor version number */
|
/*! \brief libopenmpt minor version number */
|
||||||
#define OPENMPT_API_VERSION_MINOR 5
|
#define OPENMPT_API_VERSION_MINOR 5
|
||||||
/*! \brief libopenmpt patch version number */
|
/*! \brief libopenmpt patch version number */
|
||||||
#define OPENMPT_API_VERSION_PATCH 17
|
#define OPENMPT_API_VERSION_PATCH 18
|
||||||
/*! \brief libopenmpt pre-release tag */
|
/*! \brief libopenmpt pre-release tag */
|
||||||
#define OPENMPT_API_VERSION_PREREL ""
|
#define OPENMPT_API_VERSION_PREREL ""
|
||||||
/*! \brief libopenmpt pre-release flag */
|
/*! \brief libopenmpt pre-release flag */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
LIBOPENMPT_VERSION_MAJOR=0
|
LIBOPENMPT_VERSION_MAJOR=0
|
||||||
LIBOPENMPT_VERSION_MINOR=5
|
LIBOPENMPT_VERSION_MINOR=5
|
||||||
LIBOPENMPT_VERSION_PATCH=17
|
LIBOPENMPT_VERSION_PATCH=18
|
||||||
LIBOPENMPT_VERSION_PREREL=
|
LIBOPENMPT_VERSION_PREREL=
|
||||||
|
|
||||||
LIBOPENMPT_LTVER_CURRENT=2
|
LIBOPENMPT_LTVER_CURRENT=2
|
||||||
LIBOPENMPT_LTVER_REVISION=17
|
LIBOPENMPT_LTVER_REVISION=18
|
||||||
LIBOPENMPT_LTVER_AGE=2
|
LIBOPENMPT_LTVER_AGE=2
|
||||||
|
|
|
@ -759,7 +759,10 @@ bool CSoundFile::ReadMED(FileReader &file, ModLoadingFlags loadFlags)
|
||||||
if(instrOffsets[ins - 1] != 0 && file.Seek(instrOffsets[ins - 1]))
|
if(instrOffsets[ins - 1] != 0 && file.Seek(instrOffsets[ins - 1]))
|
||||||
{
|
{
|
||||||
file.ReadStruct(instrHeader);
|
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 bool isSynth = instrHeader.type < 0;
|
||||||
const size_t maskedType = static_cast<size_t>(instrHeader.type & MMDInstrHeader::TYPEMASK);
|
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;
|
sampleIO |= SampleIO::_16bit;
|
||||||
length /= 2;
|
length /= 2;
|
||||||
}
|
}
|
||||||
if (instrHeader.type & MMDInstrHeader::STEREO)
|
if(instrHeader.type & MMDInstrHeader::STEREO)
|
||||||
{
|
{
|
||||||
sampleIO |= SampleIO::stereoSplit;
|
sampleIO |= SampleIO::stereoSplit;
|
||||||
length /= 2;
|
length /= 2;
|
||||||
|
|
|
@ -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)
|
void ModChannel::RecalcTuningFreq(Tuning::RATIOTYPE vibratoFactor, Tuning::NOTEINDEXTYPE arpeggioSteps, const CSoundFile &sndFile)
|
||||||
{
|
{
|
||||||
if(!HasCustomTuning())
|
if(!HasCustomTuning())
|
||||||
|
|
|
@ -195,6 +195,7 @@ struct ModChannel
|
||||||
void UpdateInstrumentVolume(const ModSample *smp, const ModInstrument *ins);
|
void UpdateInstrumentVolume(const ModSample *smp, const ModInstrument *ins);
|
||||||
|
|
||||||
void SetInstrumentPan(int32 pan, const CSoundFile &sndFile);
|
void SetInstrumentPan(int32 pan, const CSoundFile &sndFile);
|
||||||
|
void RestorePanAndFilter();
|
||||||
|
|
||||||
void RecalcTuningFreq(Tuning::RATIOTYPE vibratoFactor, Tuning::NOTEINDEXTYPE arpeggioSteps, const CSoundFile &sndFile);
|
void RecalcTuningFreq(Tuning::RATIOTYPE vibratoFactor, Tuning::NOTEINDEXTYPE arpeggioSteps, const CSoundFile &sndFile);
|
||||||
|
|
||||||
|
|
|
@ -550,7 +550,11 @@ std::vector<GetLengthType> CSoundFile::GetLength(enmGetLengthResetMode adjustMod
|
||||||
chn.nLastNote = NOTE_NONE;
|
chn.nLastNote = NOTE_NONE;
|
||||||
memory.chnSettings[nChn].vol = 0xFF;
|
memory.chnSettings[nChn].vol = 0xFF;
|
||||||
}
|
}
|
||||||
if (chn.rowCommand.IsNote()) chn.nLastNote = note;
|
if(chn.rowCommand.IsNote())
|
||||||
|
{
|
||||||
|
chn.nLastNote = note;
|
||||||
|
chn.RestorePanAndFilter();
|
||||||
|
}
|
||||||
|
|
||||||
// Update channel panning
|
// Update channel panning
|
||||||
if(chn.rowCommand.IsNote() || chn.rowCommand.instr)
|
if(chn.rowCommand.IsNote() || chn.rowCommand.instr)
|
||||||
|
@ -2940,23 +2944,7 @@ bool CSoundFile::ProcessEffects()
|
||||||
CheckNNA(nChn, instr, note, false);
|
CheckNNA(nChn, instr, note, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(chn.nRestorePanOnNewNote > 0)
|
chn.RestorePanAndFilter();
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instrument Change ?
|
// Instrument Change ?
|
||||||
|
|
Loading…
Reference in a new issue