74a28f68aa62

Rename `square` to avoid name conflict
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 16 Dec 2016 23:41:37 -0500
parents a4741fecf88d
children 768effcba68b
branches/tags (none)
files src/emulator.lisp

Changes

--- a/src/emulator.lisp	Fri Dec 16 23:41:29 2016 -0500
+++ b/src/emulator.lisp	Fri Dec 16 23:41:37 2016 -0500
@@ -337,7 +337,8 @@
 (defconstant +audio-buffer-size+ 512)
 (defconstant +audio-buffer-time+ (* +audio-buffer-size+ (/ +sample-rate+)))
 
-(defun square (angle)
+
+(defun sqr (angle)
   (if (< (mod angle +tau+) +pi+)
     1.0
     -1.0))
@@ -367,7 +368,7 @@
     (finally (return (mod angle +tau+)))))
 
 (defun fill-square (buffer rate start)
-  (fill-buffer buffer #'square rate start))
+  (fill-buffer buffer #'sqr rate start))
 
 (defun fill-sine (buffer rate start)
   (fill-buffer buffer #'sin rate start))