SimpleApp_Sound.h

/*
    File:       SimpleApp_Sound.h
 
    Contains:   Header for SimpleQT functions using SimpleApp framework.
 
    Written by: Mark Cookson    
 
    Copyright:  Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
 
                You may incorporate this Apple sample source code into your program(s) without
                restriction. This Apple sample source code has been provided "AS IS" and the
                responsibility for its operation is yours. You are not permitted to redistribute
                this Apple sample source code as "Apple sample source code" after having made
                changes. If you're going to re-distribute the source, we require that you make
                it clear in the source that the code was descended from Apple sample source
                code, but that you've made changes.
 
    Change History (most recent first):
                8/13/1999   Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
                8/27/1999   George Warner   Updated for New (& Improved!) SimpleAppLib.
*/
 
#include    <Windows.h>
 
#include    "SAL_Public.h"
 
#include    "DBFF.h"
 
#define oneBuffer               (1)
#define tenBuffers              (10)
#define soundPlaying            (!ASoundIsDone (mySoundInfo) && !paused)
#define qtStyle                 0
#define cdStyle                 1
#define kScrollMinValue         1
 
/* Globals */
ControlHandle           playButton1     = nil,
                        playButton2     = nil,
                        playButton3     = nil,
                        playButton4     = nil,
                        playButton5     = nil,
                        playButton6     = nil,
                        playAllButton   = nil,
                        muteCheck1      = nil,
                        muteCheck2      = nil,
                        muteCheck3      = nil,
                        muteCheck4      = nil,
                        muteCheck5      = nil,
                        muteCheck6      = nil,
                        recordButton    = nil;
Boolean                 gDone           = false,
                        sound1Set       = false,
                        sound2Set       = false,
                        sound3Set       = false,
                        sound4Set       = false,
                        sound5Set       = false,
                        sound6Set       = false,
                        sound1Playing   = false,
                        sound2Playing   = false,
                        sound3Playing   = false,
                        sound4Playing   = false,
                        sound5Playing   = false,
                        sound6Playing   = false,
                        playAll         = false,
                        prepairedToRecord = false,
                        recording       = false,
                        karakoe         = false;
SoundInfoPtr            mySoundInfo1    = nil,
                        mySoundInfo2    = nil,
                        mySoundInfo3    = nil,
                        mySoundInfo4    = nil,
                        mySoundInfo5    = nil,
                        mySoundInfo6    = nil;
GrafPtr                 gTheWindow      = nil;
short                   soundsToSync    = 0;
 
/* Function declarations */
#if 0
        short   DoPlay1         (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoPlay2         (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoPlay3         (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoPlay4         (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoPlay5         (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoPlay6         (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoPlayAll       (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        OSErr   MuteSound1      (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        OSErr   MuteSound2      (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        OSErr   MuteSound3      (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        OSErr   MuteSound4      (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        OSErr   MuteSound5      (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        OSErr   MuteSound6      (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        short   DoRecord        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
        pascal  OSErr   ClearAllSounds  (long menuResult);
        void    MyIdleProc      (EventRecord *evt);
        void    main            (void);
        void    EnableControl   (ControlRef cr);
        void    DisableControl  (ControlRef cr);
#endif 0