[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Check your INITs/CDEVs

    Date: Thu, 1 Mar 90 11:07 PST
    From: larry@atc.boeing.com (Larry Baum)

    According to the MacIvory Programmer's Reference, I should be able to
    access the following two functions:

    _SndPlay (channel sndhdl async)
    _SndNewChannel (chan synth init userroutine) -> newchan

    But if I do... I get into the debugger with the error:

    mac-os-error-badchannel: Invalid channel queue length

    Larry Baum

We have experienced the same problem, but sporadically in space (works on some
machines, fails on others) and time (works on my machine sometimes, and sometimes
it doesn't).  My code looks like this:

(defmacro1 with-sound-channel0 ((channel channel-type) &body body)
  (let ((channel-code
	  (case channel-type
	    (:noteSynth 1)
	    (:waveTableSynth 3)
	    (:sampledSynth 5)
	    (:MIDISynthIn 7)
	    (:MIDISynthOut 9))))
    `(let ((,channel (mtb:_SndNewChannel nil ,channel-code nil nil)))
       (mtb:_SndDisposeChannel ,channel nil))))

(defun1 play-sampled-sound0 (snd-resource-name)
  (with-sound-channel (channel :sampledSynth)
    (mtb:_SndPlay channel (mtb:_GetNamedResource "snd " snd-resource-name) t)))

I have noticed an interesting sensitivity.  Until recently I was the only one in
my group using Adobe Type Manager (ATM), and was also the only person in my group
who never got this error.  I recently turned ATM off (I did not remove it from the
System folder), and now I get the error all the time.  It sure sounds like a
boundary alignment problem to me.

No, this is not an endorsement for ATM.  In fact, with ATM on, I would get dropped
into MacsBug at least once a day.  Turning it off seems to fix that (I have
ATM version 1.01, created October 10, 1989).

Any clues will be appreciated.  Sorry for the lack of further insight.