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

Playing a "snd " resource f



                       Subject:                               Time:5:24 PM
  OFFICE MEMO          Playing a "snd " resource from disk    Date:10/5/1993
Can anyone clue me into why this attempt to use SndStartFilePlay doesn't work? 
When I use SndPlay instead of SndStartFilePlay, it works fine.  I ultimately
need to allow other stuff to process while the sound is playing.

(defun play-sound-resource (resourceID)
  (rlet ((channel :pointer)
           (sndChannel :sndChannel))
    (setf (%get-ptr channel) sndChannel)
    (#_SndNewChannel channel 0 0 (%null-ptr))
    (#_SndStartFilePlay 
       (%get-ptr channel)
       0
       resourceID
       (#_SizeResource (#_GetResource "snd " resourceID))
       (%null-ptr) 
       (%null-ptr) 
       (%null-ptr) 
       nil)
    (#_SndDisposeChannel (%get-ptr channel) nil)))