<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I get a crash that I cannot seem to understand with the following code. In the do loop when I set the test to (= i 40400) I get a squarish-wave in the editor; but when I set it to 40500 or above I get an endless loop and a crash.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I was trying to create a 2 sec. test.snd, then write the samples to the editor to fill out the 2 sec. or 44100 samples if sr is 22050, but I must be doing something wrong.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>(set! *clm-srate* 22050) <br>
</span>
<div><br>
</div>
<div> (let* ((dur (* *clm-srate* 2)) <br>
</div>
<div> (ind (new-sound "test.snd" 1 *clm-srate* mus-ldouble mus-riff :size dur))<br>
</div>
<div> (v1 (make-float-vector 100 .75))<br>
</div>
<div> (v2 (make-float-vector 98 -.5))<br>
</div>
<div> )<br>
</div>
<div> (do ((i 0 (+ i 200)))<br>
</div>
<div> ((= i 40400)) ;xxx 40400 works, but 40500 crashes<br>
</div>
<div> (set! (samples i (+ i 100)) v1)<br>
</div>
<div> (set! (samples (+ i 101) (+ i 199)) v2)<br>
</div>
<div> ) <br>
</div>
<span> )</span><br>
</div>
</body>
</html>