#pragma once #include #define NUMBEROFSOUNDS 0 #define NUMBEROFSOUNDCHANNELS 8 #define BASESOUNDRESID 8096 typedef struct VSound { short ResID; SndListHandle sndList; } VSound; typedef struct VSoundManager { int NumberOfSounds; VSound * Sounds; SndChannelPtr SoundChannels[NUMBEROFSOUNDCHANNELS]; short CurrentSoundChannel; Boolean SoundAvailable; } VSoundManager; 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);