mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-28 16:23:49 +01:00
Move library tree where it belongs
This commit is contained in:
11
lib-src/libnyquist/nyquist/tran/quantize.alg
Normal file
11
lib-src/libnyquist/nyquist/tran/quantize.alg
Normal file
@@ -0,0 +1,11 @@
|
||||
(QUANTIZE-ALG
|
||||
(NAME "quantize")
|
||||
(ARGUMENTS ("sound_type" "s1") ("long" "steps"))
|
||||
(INTERNAL-SCALING s1)
|
||||
(START (MIN s1))
|
||||
(STATE ("double" "factor" "s1->scale * steps; scale_factor = (sample_type) (1.0 / steps);"))
|
||||
(INNER-LOOP "register long xx = (long) (s1 * factor); output = (float) xx;")
|
||||
(TERMINATE (MIN s1))
|
||||
(CONSTANT "factor")
|
||||
(LOGICAL-STOP (MIN s1))
|
||||
)
|
||||
Reference in New Issue
Block a user