This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def audioformat (new javax.sound.sampled.AudioFormat 44100 16 2 true true)) | |
(def info (new javax.sound.sampled.DataLine$Info javax.sound.sampled.TargetDataLine audioformat)) | |
(if (not= (javax.sound.sampled.AudioSystem/isLineSupported info))(print "dataline not supported")(print "ok lets start\n")) | |
(def line (javax.sound.sampled.AudioSystem/getTargetDataLine audioformat)) | |
(.open line audioformat) | |
(.start line) | |
(let [size (/ (.getBufferSize line) 5) | |
buf (byte-array size)] |