1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-12 09:33:34 +02:00

Disable spectral editing effects in one place in Nyquist.cpp...

... by passing invalid frequency values,
rather than by checking the 'view property in each effect.

Spectral editing is now permitted only for appropriate track view types.

But I would suggest reconsideration of the exact conditions in which we do
this.
This commit is contained in:
Paul Licameli
2015-07-25 15:12:18 -04:00
parent 7f7506dbcd
commit 65f1bbe449
5 changed files with 51 additions and 55 deletions

View File

@@ -67,16 +67,8 @@
(remprop '*selection* 'high-hz))
(catch 'error-message
(cond
((not (get '*TRACK* 'VIEW)) ; 'View is NIL during Preview
(setf p-err (format nil "This effect requires a frequency selection in the~%~
'Spectral Selection' or 'Spectral Selection log(f)'~%~
track view.~%~%"))
(multichan-expand #'result *track*))
((string-not-equal (get '*TRACK* 'VIEW) "spectral" :end1 8 :end2 8)
"Use this effect in the 'Spectral Selection'\nor 'Spectral Selection log(f)' view.")
(T (setf p-err "")
(if (= control-gain 0) ; Allow dry preview
"Gain is zero. Nothing to do."
(multichan-expand #'result *track*)))))
(setf p-err "")
(if (= control-gain 0) ; Allow dry preview
"Gain is zero. Nothing to do."
(multichan-expand #'result *track*)))