mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 17:09:26 +02:00
Apply patch for http://bugzilla.audacityteam.org/show_bug.cgi?id=152.
This commit is contained in:
parent
0bd054fd9f
commit
07fba9768f
@ -342,11 +342,9 @@
|
||||
|
||||
; convenient biquad: normalize a0, and use zero initial conditions.
|
||||
(defun nyq:biquad (x b0 b1 b2 a0 a1 a2)
|
||||
(if (< a0 1.0)
|
||||
(error (format T "a0 < 1 in biquad~%"))
|
||||
(let ((a0r (/ 1.0 a0)))
|
||||
(snd-biquad x (* a0r b0) (* a0r b1) (* a0r b2)
|
||||
(* a0r a1) (* a0r a2) 0 0))))
|
||||
(let ((a0r (/ 1.0 a0)))
|
||||
(snd-biquad x (* a0r b0) (* a0r b1) (* a0r b2)
|
||||
(* a0r a1) (* a0r a2) 0 0)))
|
||||
|
||||
|
||||
(defun biquad (x b0 b1 b2 a0 a1 a2)
|
||||
@ -366,6 +364,8 @@
|
||||
|
||||
;; NYQ:LOWPASS2 -- operates on single channel
|
||||
(defun nyq:lowpass2 (x hz q)
|
||||
(if (or (> hz (/ (snd-srate x) 2.0))(< hz 0))
|
||||
(error "frequency out of range" hz))
|
||||
(let* ((w (* 2.0 Pi (/ hz (snd-srate x))))
|
||||
(cw (cos w))
|
||||
(sw (sin w))
|
||||
@ -383,6 +383,8 @@
|
||||
(multichan-expand #'nyq:highpass2 x hz q))
|
||||
|
||||
(defun nyq:highpass2 (x hz q)
|
||||
(if (or (> hz (/ (snd-srate x) 2.0))(< hz 0))
|
||||
(error "frequency out of range" hz))
|
||||
(let* ((w (* 2.0 Pi (/ hz (snd-srate x))))
|
||||
(cw (cos w))
|
||||
(sw (sin w))
|
||||
|
Loading…
x
Reference in New Issue
Block a user