[CM] clm-3 and cmucl-19a problem

Bill Sack wsack@acsu.buffalo.edu
Fri, 21 Jan 2005 13:18:45 -0500


This is a multi-part message in MIME format.
--------------020901050208090200060003
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

hi all,
in trying to migrate to cmucl and clm-3, i may have come up with an 
issue. i get segfaults everytime i run a particular instrument, and i 
think i've narrowed it down to this: declaring a variable in the run 
loop with 'let,' then setting it to another value later on.
z.B.:
...
(run
  (loop for blah
   (let ((this something))
     (setf this another_thing)
...

i have acl5 on another machine, but haven't gotten around to switching 
it over to clm-3 - i haven't checked whether this will also kill acl.

other details: cmucl-19a, fc1 linux

attached find the offending .ins file.

thanks,
bill
-- 
_________
Bill Sack
wsack(a)acsu.buffalo.edu
----------------------

--------------020901050208090200060003
Content-Type: text/plain;
 name="bad.ins"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bad.ins"

(definstrument squelchy (beg dur file skip squelch)
  (let* ((skipsamp (floor (* (or skip 0) (sound-srate file))))
	 (fdA (open-input file :channel 0 :start skipsamp :verbose t))
	 (two-chans (and (= (sound-chans file) 2) (= (mus-channels *output*) 2)))
	 (fdB (and two-chans (open-input file :channel 1 :start skipsamp :verbose t)))
	 (rdA (make-readin fdA))
	 (rdB (make-readin fdB))
         (st (floor (* *srate* beg)))
         (nd (+ st (floor (* *srate* dur))))
         )
    (run
     (loop for i from st below nd do
	   (let ((outvalA (readin rdA))
		 (outvalB (readin rdB)))
	     (if (< (* -1 squelch) outvalA squelch)
	       (setf outvalA 0))
	     (if (< (* -1 squelch) outvalB squelch)
	       (setf outvalB 0))
	     (outa i outvalA)
	     (if two-chans (outb i outvalB)))
	   ))
    (close-input fdA)
    (if two-chans (close-input fdB))))
#|
(compile-file "squelchy.ins")
(load "squelchy.cmucl")

(with-sound (:srate 44100 :channels 2 :statistics t :scaled-to .5 :output "/zap/squelchy.snd") 
  (squelchy 0 10 "/home/bsack/sounds/apresafter.wav" 48 .005))
|#

--------------020901050208090200060003--