Jump to content

Record sound: Difference between revisions

no edit summary
(Nimrod -> Nim)
No edit summary
Line 257:
while( true ) 1::second => now;</lang>
 
=={{header|Common Lisp}}==
{{trans|C}}
<lang lisp>
(defun record (n)
(with-open-file (in "/dev/dsp" :element-type '(unsigned-byte 8))
(loop repeat n collect (read-byte in))
)
)
(defun play (byte-list)
(with-open-file (out "/dev/dsp" :direction :output :element-type '(unsigned-byte 8) :if-exists :append)
(mapcar (lambda (b) (write-byte b out)) byte-list)
)
)
(play (record 65536))
</lang>
 
=={{header|GUISS}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.