From c0763c3b4b4c1852c7d98bf7c91b5fc37c263f61 Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Fri, 22 May 2015 16:06:48 +0100 Subject: [PATCH] Pass preview duration preference to Nyquist. To get preview duration: (get '*project* 'preview-duration) --- src/effects/nyquist/Nyquist.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 8e82fab28..60ea6b87a 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -521,6 +521,11 @@ bool NyquistEffect::Process() mProps += wxString::Format(wxT("(putprop '*PROJECT* %d 'MIDITRACKS)\n"), numMidi); mProps += wxString::Format(wxT("(putprop '*PROJECT* %d 'TIMETRACKS)\n"), numTime); + double previewLen = 6.0; + gPrefs->Read(wxT("/AudioIO/EffectsPreviewLen"), &previewLen); + mProps += wxString::Format(wxT("(putprop '*PROJECT* (float %s) 'PREVIEW-DURATION)\n"), + Internat::ToString(previewLen).c_str()); + SelectedTrackListOfKindIterator sel(Track::Wave, mOutputTracks); int numChannels = 0; for (WaveTrack *t = (WaveTrack *) sel.First(); t; t = (WaveTrack *) sel.Next()) {