[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: firstname.lastname@example.org
- Subject: Re: sound
- From: email@example.com (UEDA masaya)
- Date: Mon, 5 Dec 94 11:42:13 JST
- Cc: firstname.lastname@example.org
- Sender: email@example.com
In article <gisAg8C00iUzM32VdJ@andrew.cmu.edu> Franklin Chang
I'm interested in being able to play simple snd resources from mcl.
I'm sure I could figure out how to do it, but I was just wondering if
anyone out there has done this before, and has some c/lisp code for
You can get a named snd resource and play it synchronously as follows.
? (setq foo (with-pstrs ((snd-name "quack"))
(#_getnamedresource "snd " snd-name)))
#<A Mac Handle to resource 'snd '(5) : Unlocked, Size 2082 #x7984C>
? (unless (%null-ptr-p foo)
(#_SndPlay (%null-ptr) foo nil))
If you want to play it asynchronously, you must allocate a new
sound-channel record. Don't forget to dispose it when you do not need
it any more.
? (setq bar
(rlet ((foo :ptr (%null-ptr)))
(#_SndNewChannel foo #$sampledSynth
#<A Mac Zone Pointer Size 1060 #x1CC250>
? (#_SndPlay bar foo t)
? (#_disposptr bar)
----- Thanks -----
Information Technology Research Lab., SHARP Co.
2613-1 Ichinomoto, Tenri, Nara 632, JAPAN