home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!oracle!unrepliable!bounce
- Newsgroups: comp.sys.mac.programmer
- From: tmorrow@oracle.com (Thomas Morrow)
- Subject: help- sound playing w/ bufferCmd
- Message-ID: <TMORROW.93Jan2151912@af4hp.oracle.com>
- Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
- Nntp-Posting-Host: af4hp.us.oracle.com
- Organization: Oracle Corporation, Belmont, CA
- Distribution: comp
- Date: Sat, 2 Jan 1993 23:19:12 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
- Lines: 40
-
-
- I am having trouble using SndDoCommand to play a sampled sound header.
-
- I do:
- SndCommand mySndCmd;
-
- /* mySndH is a handle to a sound header and data */
- /* mySndChan is already properly opened */
- mySndCmd.cmd;
- mySndCmd.param1 = 0;
- mySndCmd.param2 = (long)(*mySndH) & 0xffffff;
- SndDoCommand(mySndChan, mySndCmd, false);
-
- This does not work for some reason; I can't figure out why because if
- I replace the SndDoCommand with a Snd Play, it works:
-
- SndPlay(mySndChan, mySndH, true);
-
- So the channel and header must be alright. I am new to Mac
- programming, and wasn't sure exactly how to set param2 (a long) to the
- header address (Ptr)... The IM IV uses ORD4() to do the type
- conversion, but I am using Think C rather than Lisa Pascal. My way
- seems to work, but what is the elegant way?
-
- Anyway, I use SndChannelStatus to get the status every event loop
- cycle, and the SCStatus returned is blank (zero) in all except CPUload
- (24), ChannelAttributes (initMono), and ChannelBusy (true). How can
- the channel be busy if StartTime == endTime == 0?
-
-
- Please email responses. I will summarize.
-
- Tom tmorrow@us.oracle.com
-
- --
-
- ---------------------------------------------------------------------------
- Tom Morrow 3OP4 voice:415-506-2202 Office: 427
- tmorrow@us.oracle.com fax:415-506-7292 Application Object Library
- ---------------------------------------------------------------------------
-