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

Re: Sounds



In article <4hTrq1y00iUz48JGR5@andrew.cmu.edu>, "Daniel A. Ferrell"
<df25+@andrew.cmu.edu> wrote:

> 
>     Does anyone have any experience playing "sounds" in MCL.  Sounds
> meaning like one would put in the System suitcase.  Thanks, for any help.
> 

Normally sounds are snd resources in file.
You have to know the resource id of your sound to play it.
The following code plays a resource with id 9632


Karsten


(require :resources)

(with-open-resource-file (f (choose-file-dialog))
  (let ((soundressorcehandle
         (#_GetResource "snd " 9632)))
    (require-trap #_sndplay (%null-ptr )
                  soundressorcehandle 0)))