From: <sag...@us...> - 2015-03-14 15:23:12
|
Revision: 4885 http://sourceforge.net/p/modplug/code/4885 Author: saga-games Date: 2015-03-14 15:23:06 +0000 (Sat, 14 Mar 2015) Log Message: ----------- [Fix] Sample tab: Pitch shift was broken for stereo samples. [Fix] Sample tab: Preserve zoom when switching to another sample after using center around loop point functionality on an auto-zoomed sample. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/View_smp.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2015-03-13 23:52:26 UTC (rev 4884) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2015-03-14 15:23:06 UTC (rev 4885) @@ -2182,10 +2182,10 @@ switch(smpsize) { case 1: - CopySample<SC::ConversionChain<SC::Convert<float, int8>, SC::DecodeIdentity<int8> > >(buffer, len, 1, ptr, sizeof(int8) * len, nChn); + CopySample<SC::ConversionChain<SC::Convert<float, int8>, SC::DecodeIdentity<int8> > >(buffer, len, 1, ptr, sizeof(int8) * len * nChn, nChn); break; case 2: - CopySample<SC::ConversionChain<SC::Convert<float, int16>, SC::DecodeIdentity<int16> > >(buffer, len, 1, (int16 *)ptr, sizeof(int16) * len, nChn); + CopySample<SC::ConversionChain<SC::Convert<float, int16>, SC::DecodeIdentity<int16> > >(buffer, len, 1, (int16 *)ptr, sizeof(int16) * len * nChn, nChn); break; } @@ -3149,7 +3149,7 @@ // Crossfade loop to create smooth loop transitions #define DEFAULT_XFADE_LENGTH 16384 //4096 -SmpLength LimitXFadeLength(SmpLength len, const ModSample &sample) +static SmpLength LimitXFadeLength(SmpLength len, const ModSample &sample) { return Util::Min(len, sample.nLoopEnd - sample.nLoopStart, sample.nLoopEnd / 2); } Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2015-03-13 23:52:26 UTC (rev 4884) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2015-03-14 15:23:06 UTC (rev 4885) @@ -2944,9 +2944,13 @@ case kcSampleCenterSustainEnd: point = sample.nSustainEnd; break; } if(!m_nZoom) + { + SendCtrlMessage(CTRLMSG_SMP_SETZOOM, 1); SetZoom(1, point); - else + } else + { ScrollToSample(point); + } } return wParam; case kcPrevInstrument: OnPrevInstrument(); return wParam; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |