🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #367

Re: Using a sound in an application...

#367
From: Eric P. Scott
Date: Fri, 31 Jul 1992 06:01
22 lines
1284 bytes
In article <30JUL92.17051704@enh.nist.gov> aoml@enh.nist.gov writes:
>I have a sound that exists in my nib section.  How can I execute that sound
>easily?

In article <1992Jul31.025720.901@jupiter.sun.csd.unb.ca>
	mtj@unbsj.ca (Mike Jory) writes:
>and whenever you want to play the sound:
>SNDPlaySoundfile(filename,0);

That doesn't help, because the sound doesn't have a file name.


You *could* use getsectdata(3) to "directly" obtain a
SNDSoundStruct * and feed that to SNDStartPlaying(), but it's
probably easier to use the SoundKit's Sound class
(+addName:fromMachO: or +findSoundFor:), and -play that.

Remember that sound playback occurs in a separate thread, and
you may want to use -waitUntilStopped or a -didPlay: delegate
method to keep things synchronized.

					-=EPS=-
Technical Details
Message-ID: <1992Jul31.060157.7029@csus.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!wupost!csus.edu!news
References: <30JUL92.17051704@enh.nist.gov> <1992Jul31.025720.901@jupiter.sun.csd.unb.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!wupost!csus.edu!news
From: eps@futon.SFSU.EDU (Eric P. Scott)
Subject: Re: Using a sound in an application...
Message-ID: <1992Jul31.060157.7029@csus.edu>
Sender: news@csus.edu
Reply-To: eps@cs.sfsu.edu
Organization: San Francisco State University
References: <30JUL92.17051704@enh.nist.gov> <1992Jul31.025720.901@jupiter.sun.csd.unb.ca>
Date: Fri, 31 Jul 1992 06:01:57 GMT
Lines: 22