home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
luschsrc.sit
/
noise.c
< prev
next >
Wrap
Text File
|
1990-05-23
|
871b
|
50 lines
/********************************************************************************
* noise.c
*
* Noise Playing Package
*
* Written by Paco Xander Nathan
* ⌐1990, Motorola Inc. Public domain source code.
********************************************************************************/
#include "applic.h"
#include "noise.h"
#include <SoundMgr.h>
#include <OSUtil.h>
/* External Data Structures
*/
Boolean
noiseDone = FALSE;
/* Local Data Structures
*/
static Boolean
noiseStarted = FALSE;
static SndChannelPtr
noiseChan;
/* Play the specified piece of noise
*/
void
NoisePlay (theNoise)
register short theNoise;
{
register Handle noiseHdl;
if (laMachine.hasSound) {
if (noiseHdl = GetResource('snd ', theNoise)) {
if (!noiseStarted)
SndPlay(NULL, noiseHdl, TRUE);
ReleaseResource((Handle) noiseHdl);
}
}
else
SysBeep(5);
}