blob: 1bf56fe575d3b661b5063ed442488114b220d21f (
plain)
1
2
3
4
5
6
7
8
9
|
(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))
)
|