#define NUMBEROFSOUNDS 0 #define NUMBEROFSOUNDCHANNELS 8 #define BASESOUNDRESID 8096 typedef struct VSound VSound; typedef struct VSoundManager VSoundManager; struct VSound { short ResID; SndListHandle sndList; }; struct VSoundManager { int NumberOfSounds; VSound * Sounds; SndChannelPtr SoundChannels[NUMBEROFSOUNDCHANNELS]; short CurrentSoundChannel; Boolean SoundAvailable; }; void InitSoundManager(VSoundManager * sm); void CleanUpSoundManager(VSoundManager * sm); void SuspendSoundManager(VSoundManager * sm); void ResumeSoundManager(VSoundManager * sm); OSErr LoadSound(VSound * s, int ResID); void CleanUpSound(VSound * s); OSErr AllocateSoundChannels(VSoundManager * sm); void CleanUpSoundChannels(VSoundManager * sm); void PlaySound(VSoundManager * sm, int soundID); Boolean AnySoundsPlaying(VSoundManager * sm);