From: <sag...@us...> - 2014-05-24 17:05:50
|
Revision: 4062 http://sourceforge.net/p/modplug/code/4062 Author: saga-games Date: 2014-05-24 17:05:42 +0000 (Sat, 24 May 2014) Log Message: ----------- [Fix] Sample tab: When removing DC offset from a sample, the wrong volume variable on channels currently playing the modified sample was modified. [Int] Make mptrack depend on the plugin bridge so that it always definitely get recompiled if e.g. version number changes. Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/soundlib/modsmp_ctrl.cpp Modified: trunk/OpenMPT/mptrack/MPTRACK_10.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK_10.sln 2014-05-24 07:59:34 UTC (rev 4061) +++ trunk/OpenMPT/mptrack/MPTRACK_10.sln 2014-05-24 17:05:42 UTC (rev 4062) @@ -1,6 +1,9 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mptrack", "mptrack_10.vcxproj", "{21D95071-FB97-4E69-B3B1-050D0D4A5021}" + ProjectSection(ProjectDependencies) = postProject + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10} = {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flac", "..\build\gen\flac.vcxproj", "{E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}" EndProject Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2014-05-24 07:59:34 UTC (rev 4061) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2014-05-24 17:05:42 UTC (rev 4062) @@ -495,12 +495,16 @@ { CriticalSection cs; - smp.nGlobalVol = MIN((uint16)(smp.nGlobalVol / dAmplify), 64); + smp.nGlobalVol = std::min((uint16)(smp.nGlobalVol / dAmplify), uint16(64)); for (CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) { if(sndFile.m_PlayState.Chn[i].pModSample == &smp) { - sndFile.m_PlayState.Chn[i].nGlobalVol = smp.nGlobalVol; + sndFile.m_PlayState.Chn[i].nInsVol = smp.nGlobalVol; + if(sndFile.m_PlayState.Chn[i].pModInstrument) + { + sndFile.m_PlayState.Chn[i].nInsVol = (smp.nGlobalVol * sndFile.m_PlayState.Chn[i].pModInstrument->nGlobalVol) >> 6; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |