1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-07 15:22:34 +02:00
2015-04-07 22:10:17 -05:00

13 lines
344 B
Plaintext

(CLIP-ALG
(NAME "clip")
(ARGUMENTS ("sound_type" "s") ("double" "level"))
(STATE ("sample_type" "level" "(sample_type) level"))
(START (MIN s))
(INNER-LOOP "double x = s;
output = (sample_type)
(x > level ?
level : (x < -level ? -level : x))")
(TERMINATE (MIN s))
(LOGICAL-STOP (MIN s))
)