Record sound: Difference between revisions
Content deleted Content added
m omissions |
|||
Line 186:
data = stream.read(chunk)
print [ord(i) for i in data]</lang>
=={{header|Racket}}==
{{trans|C}}
<lang racket>
#lang racket
(define (record n) (with-input-from-file "/dev/dsp" ( () (read-bytes n))))
(define (play bs) (display-to-file bs "/dev/dsp" #:exists 'append))
(play (record 65536))
</lang>
=={{header|Tcl}}==
|