mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-07 07:39:29 +02:00
Fix for bug 7, but ifdef'd out pending a more
flexible solution. Reviewed by Leland as "perfectly safe".
This commit is contained in:
parent
581b836c18
commit
b7aeef5ec9
@ -196,4 +196,8 @@
|
||||
|
||||
// Define for new noise reduction effect from Paul Licameli.
|
||||
#define EXPERIMENTAL_NOISE_REDUCTION
|
||||
|
||||
// Define to enable Nyquist audio clip boundary control (Steve Daulton Dec 2014)
|
||||
// #define EXPERIMENTAL_NYQUIST_SPLIT_CONTROL
|
||||
|
||||
#endif
|
||||
|
@ -470,7 +470,15 @@ bool EffectNyquist::Process()
|
||||
this->CopyInputTracks(Track::All);
|
||||
SelectedTrackListOfKindIterator iter(Track::Wave, mOutputTracks);
|
||||
mCurTrack[0] = (WaveTrack *) iter.First();
|
||||
#if defined(EXPERIMENTAL_NYQUIST_SPLIT_CONTROL)
|
||||
mT0 = mCurTrack[0]->LongSamplesToTime(mCurTrack[0]->TimeToLongSamples(mT0));
|
||||
mAlignedT1 = mCurTrack[0]->LongSamplesToTime(mCurTrack[0]->TimeToLongSamples(mT1));
|
||||
mOutputTime = mT1 - mT0;
|
||||
mRestoreClips = true; // Normally we want to preserve split lines, but not always.
|
||||
mMergeClips = true; // Set to false to add split lines at selection ends.
|
||||
#else
|
||||
mOutputTime = mT1 - mT0;
|
||||
#endif
|
||||
mCount = 0;
|
||||
mProgressIn = 0;
|
||||
mProgressOut = 0;
|
||||
@ -1030,7 +1038,13 @@ bool EffectNyquist::ProcessOne()
|
||||
out = mOutputTrack[0];
|
||||
}
|
||||
|
||||
#if defined(EXPERIMENTAL_NYQUIST_SPLIT_CONTROL)
|
||||
mMergeClips = (mT0 + mOutputTime == mAlignedT1) ? true : false;
|
||||
mCurTrack[i]->ClearAndPaste(mT0, mT1, out, mRestoreClips, mMergeClips);
|
||||
#else
|
||||
mCurTrack[i]->ClearAndPaste(mT0, mT1, out, false, false);
|
||||
#endif
|
||||
|
||||
// If we were first in the group adjust non-selected group tracks
|
||||
if (mFirstInGroup) {
|
||||
SyncLockedTracksIterator git(mOutputTracks);
|
||||
|
@ -234,6 +234,11 @@ class AUDACITY_DLL_API EffectNyquist:public Effect
|
||||
wxArrayString mCategories;
|
||||
|
||||
wxString mProps;
|
||||
#if defined(EXPERIMENTAL_NYQUIST_SPLIT_CONTROL)
|
||||
bool mRestoreClips;
|
||||
bool mMergeClips;
|
||||
double mAlignedT1;
|
||||
#endif
|
||||
|
||||
friend class NyquistDialog;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user