summaryrefslogtreecommitdiff
path: root/tran/recip.alg
diff options
context:
space:
mode:
Diffstat (limited to 'tran/recip.alg')
-rw-r--r--tran/recip.alg11
1 files changed, 11 insertions, 0 deletions
diff --git a/tran/recip.alg b/tran/recip.alg
new file mode 100644
index 0000000..8a535d6
--- /dev/null
+++ b/tran/recip.alg
@@ -0,0 +1,11 @@
+(RECIP-ALG
+ (NAME "recip")
+ (ARGUMENTS ("sound_type" "s1"))
+ (STATE ("double" "scale" "(1.0 / s1->scale)"))
+ (INTERNAL-SCALING s1)
+ (CONSTANT "scale")
+ (START (MIN s1))
+ (INNER-LOOP "output = (sample_type) (scale / s1)")
+ (TERMINATE (MIN s1))
+ (LOGICAL-STOP (MIN s1))
+)