From: <sag...@us...> - 2013-10-19 16:37:35
|
Revision: 2938 http://sourceforge.net/p/modplug/code/2938 Author: saga-games Date: 2013-10-19 16:37:27 +0000 (Sat, 19 Oct 2013) Log Message: ----------- [Fix] ModSpecs are now also set to something sensible for formats that are not editable by OpenMPT (useful when using e.g. the pattern vis in xmp-openmpt, since it relies on effect letters from ModSpecs) [Fix] DMO plugins could potentially crash in 64-bit builds. Modified Paths: -------------- trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2013-10-19 14:28:29 UTC (rev 2937) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2013-10-19 16:37:27 UTC (rev 2938) @@ -3031,7 +3031,7 @@ m_Effect.numParams = dwParamCount; } if (FAILED(m_pMediaObject->QueryInterface(IID_IMediaParams, (void **)&m_pMediaParams))) m_pMediaParams = nullptr; - m_pMixBuffer = (int16 *)((((int)m_MixBuffer) + 15) & ~15); + m_pMixBuffer = (int16 *)((((intptr_t)m_MixBuffer) + 15) & ~15); // Callbacks m_Effect.dispatcher = DmoDispatcher; m_Effect.setParameter = DmoSetParameter; Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-10-19 14:28:29 UTC (rev 2937) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-10-19 16:37:27 UTC (rev 2938) @@ -901,7 +901,7 @@ if(GetType() != MOD_TYPE_NONE) { - SetModSpecsPointer(m_pModSpecs, m_nType); + SetModSpecsPointer(m_pModSpecs, GetBestSaveFormat()); const ORDERINDEX CacheSize = ModSequenceSet::s_nCacheSize; // workaround reference to static const member problem const ORDERINDEX nMinLength = std::min(CacheSize, GetModSpecifications().ordersMax); if (Order.GetLength() < nMinLength) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |