home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-04 | 793 b | 49 lines | [TEXT/KAHL] |
-
- LoadSound(soundH, soundID, soundName)
- Handle *soundH;
- short soundID;
- Str255 soundName;
- {
- if ((*soundH = GetResource('snd ', soundID)) == 0L) {
- ExitAppl();
- } /* if */
- MoveHHi(*soundH);
- HLock(*soundH);
- HNoPurge(*soundH);
-
- } /* LoadSound() */
-
- UnloadSound(soundH)
- Handle soundH;
- {
- HUnlock(soundH);
- HPurge(soundH);
- ReleaseResource(soundH);
-
- } /* UnloadSound() */
-
- ExitAppl()
- {
- extern CWindowPtr gPictureWindow;
-
- if (gPictureWindow)
- DisposeWindow((WindowPtr)gPictureWindow);
- FlushEvents(everyEvent, 0);
- UnloadSounds();
- ExitToShell();
-
- } /* ExitAppl() */
-
- ErasePort(whichPort, whatRect)
- CGrafPort *whichPort;
- Rect whatRect;
- {
- GrafPtr savePort;
-
- GetPort(&savePort);
- SetPort((GrafPtr)whichPort);
- EraseRect (&whatRect);
- SetPort(savePort);
-
- } /* ErasePort() */
-