SOUNDST.H 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //**************************************************************************
  2. //**
  3. //** soundst.h : Heretic 2 : Raven Software, Corp.
  4. //**
  5. //** $RCSfile: soundst.h,v $
  6. //** $Revision: 1.13 $
  7. //** $Date: 95/10/12 18:01:27 $
  8. //** $Author: cjr $
  9. //**
  10. //**************************************************************************
  11. #ifndef __SOUNDSTH__
  12. #define __SOUNDSTH__
  13. typedef struct
  14. {
  15. char name[8];
  16. int p1;
  17. } musicinfo_t;
  18. typedef struct sfxinfo_s
  19. {
  20. char tagName[32];
  21. char lumpname[12]; // Only need 9 bytes, but padded out to be dword aligned
  22. //struct sfxinfo_s *link; // Make alias for another sound
  23. int priority; // Higher priority takes precendence
  24. int usefulness; // Determines when a sound should be cached out
  25. void *snd_ptr;
  26. int lumpnum;
  27. int numchannels; // total number of channels a sound type may occupy
  28. boolean changePitch;
  29. } sfxinfo_t;
  30. typedef struct
  31. {
  32. mobj_t *mo;
  33. int sound_id;
  34. int handle;
  35. int volume;
  36. int pitch;
  37. int priority;
  38. } channel_t;
  39. typedef struct
  40. {
  41. long id;
  42. unsigned short priority;
  43. char *name;
  44. mobj_t *mo;
  45. int distance;
  46. } ChanInfo_t;
  47. typedef struct
  48. {
  49. int channelCount;
  50. int musicVolume;
  51. int soundVolume;
  52. ChanInfo_t chan[8];
  53. } SoundInfo_t;
  54. extern int snd_MaxVolume;
  55. extern int snd_MusicVolume;
  56. void S_Start(void);
  57. void S_StartSound(mobj_t *origin, int sound_id);
  58. int S_GetSoundID(char *name);
  59. void S_StartSoundAtVolume(mobj_t *origin, int sound_id, int volume);
  60. void S_StopSound(mobj_t *origin);
  61. void S_StopAllSound(void);
  62. void S_PauseSound(void);
  63. void S_ResumeSound(void);
  64. void S_UpdateSounds(mobj_t *listener);
  65. void S_StartSong(int song, boolean loop);
  66. void S_StartSongName(char *songLump, boolean loop);
  67. void S_Init(void);
  68. void S_GetChannelInfo(SoundInfo_t *s);
  69. void S_SetMusicVolume(void);
  70. boolean S_GetSoundPlayingInfo(mobj_t *mobj, int sound_id);
  71. #endif