home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!zaphod.mps.ohio-state.edu!howland.reston.ans.net!spool.mu.edu!olivea!apple!goofy!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
- From: REEKES@applelink.apple.com (Jim Reekes)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Novice programmer seeks help with Sound Manager
- Message-ID: <REEKES-250193125843@90.10.20.67>
- Date: 25 Jan 93 20:57:17 GMT
- References: <C1CEK3.7Gt@dartvax.dartmouth.edu>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.programmer
- Organization: Apple Computer, Inc.
- Lines: 37
-
- In article <C1CEK3.7Gt@dartvax.dartmouth.edu>, bryan.y.lee@dartmouth.edu
- (Bryan Lee) wrote:
- >
- > Well, this is my first time posting to this group, so here goes,
- >
- > I've read about the sound manager, and have read a few example routines
- > that play sound, using the sound manager. I figured out how to make new
- > channels, and use sndPlay on 'snd ' resources. No sweat. However, I still
- > don't understand how to use type 2 'snd ' files. I have read Inside
- > Macintosh 5 about these resource types, but still haven't had any luck
- > with them.
- > I do the following (simplified a little):
- > SndNewChannel(&my_chan, sampledSynth, 0, NULL);
- > SndPlay(my_chan, my_type2snd, 1);
- > SndDoCommand(my_chan, my_command, 0);
- >
- > In this case, "my_command" = noteCmd; <==Does this command do anything or
- > what?
- >
- > I thought it would be neat to be able to play my own melodies using the
- > sounds from these type2 resources, but when I try to play a note using
- > noteCmd, only silence plays for the duration of the note. Am I totally
- > off base, or is there something simple I am missing? Maybe there is a FAQ
- > that has this somewhere?
-
- Before you can use the noteCmd (now known as the "frequencyCmd") you must
- use the soundCmd to install the sound header into the channel. The SndPlay
- trap will only play the sound as described in the resource. To use the
- soundCmd with a resource you'll have to parse the 'snd ' and find the sound
- header within it.
-
- -----------------------------------------------------------------------
- Jim Reekes, Polterzeitgeist | Macintosh Toolbox Engineering
- | Sound Manager Expert
- Apple Computer, Inc. | "All opinions expressed are mine, and do
- 20525 Mariani Ave. MS: 81-KS | not necessarily represent those of my
- Cupertino, CA 95014 | employer, Apple Computer Inc."
-