home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Abalone 1.4.2 / src / SoundPlay.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-21  |  1.3 KB  |  49 lines  |  [TEXT/MPS ]

  1. #ifndef SOUNDPLAY_H
  2. #define SOUNDPLAY_H
  3.  
  4. #include "Rules.h"
  5.  
  6. #ifndef THINK_C
  7. #include <Types.h>
  8. #endif
  9.  
  10. //    These procedures try to play the sound associated with a move or event.
  11.  
  12. void        SndPlayMove (BoardPtr board, FieldsPtr move, short direction);
  13. void        SndPlayFlicheMove (BoardPtr board, FieldsPtr move, short direction);
  14. void        SndPlayBallDown (void);
  15. void        SndPlayBeep (void);
  16.  
  17. //    Sound channels should preferably be disposed immediately after playing,
  18. //    but since I try to use asynchronous sound, this is difficult:
  19. //    disposing immediately after playing either stops the sound halfway,
  20. //    or makes you wait until the sound has stopped playing.
  21. //    therefore, I leave the channel open, which is allowed,
  22. //    but on the condition you dispose it when another sound is going to play,
  23. //    for example before calling SysBeep or before being deactivated,
  24. //    since the application activated may use sound as well.
  25. //    This procedure disposes the channel, if still open.
  26.  
  27. void            SndDisposeChannels (void);
  28.  
  29. #endif
  30.  
  31. #ifdef SOUNDPLAY_C
  32.  
  33. #include "Error.h"
  34. #include "Global.h"
  35. #include "Settings.h"
  36.  
  37. #ifndef THINK_C
  38. #include <Memory.h>
  39. #include <Packages.h>
  40. #include <Resources.h>
  41. #endif
  42. #include <Sound.h>
  43.  
  44. Boolean            PlayResource (SndChannelPtr *channel, short resID);
  45. void            DisposeSoundChannel (SndChannelPtr *channel);
  46. SndChannelPtr    CreateSoundChannel (void);
  47.  
  48. #endif
  49.