Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. // Emacs style mode select   -*- C++ -*-
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. //
  18. // DESCRIPTION:
  19. //      System interface, sound.
  20. //
  21. //-----------------------------------------------------------------------------
  22.  
  23. #ifndef __I_SOUND__
  24. #define __I_SOUND__
  25.  
  26. #include "doomdef.h"
  27.  
  28. #include "doomstat.h"
  29. #include "sounds.h"
  30.  
  31.  
  32.  
  33. // Init at program start...
  34. void I_InitSound();
  35.  
  36. // ... shut down and relase at program termination.
  37. void I_ShutdownSound(void);
  38.  
  39.  
  40. //
  41. //  SFX I/O
  42. //
  43.  
  44. // Initialize channels?
  45. void I_SetChannels();
  46.  
  47. // Get raw data lump index for sound descriptor.
  48. int I_GetSfxLumpNum (sfxinfo_t* sfxinfo );
  49.  
  50.  
  51. // Starts a sound in a particular sound channel.
  52. int
  53. I_StartSound
  54. ( int           id,
  55.   int           vol,
  56.   int           sep,
  57.   int           pitch,
  58.   int           priority );
  59.  
  60.  
  61. // Stops a sound channel.
  62. void I_StopSound(int handle);
  63.  
  64. // Called by S_*() functions
  65. //  to see if a channel is still playing.
  66. // Returns 0 if no longer playing, 1 if playing.
  67. int I_SoundIsPlaying(int handle);
  68.  
  69. // Updates the volume, separation,
  70. //  and pitch of a sound channel.
  71. void
  72. I_UpdateSoundParams
  73. ( int           handle,
  74.   int           vol,
  75.   int           sep,
  76.   int           pitch );
  77.  
  78.  
  79. //
  80. //  MUSIC I/O
  81. //
  82. void I_InitMusic(void);
  83. void I_ShutdownMusic(void);
  84. // Volume.
  85. void I_SetMusicVolume(int volume);
  86. // PAUSE game handling.
  87. void I_PauseSong(int handle);
  88. void I_ResumeSong(int handle);
  89. // Registers a song handle to song data.
  90. int I_RegisterSong(void *data);
  91. // Called by anything that wishes to start music.
  92. //  plays a song, and when the song is done,
  93. //  starts playing it again in an endless loop.
  94. // Horrible thing to do, considering.
  95. void
  96. I_PlaySong
  97. ( int           handle,
  98.   int           looping );
  99. // Stops a song over 3 seconds.
  100. void I_StopSong(int handle);
  101. // See above (register), then think backwards
  102. void I_UnRegisterSong(int handle);
  103.  
  104.  
  105.  
  106. #endif
  107. //-----------------------------------------------------------------------------
  108. //
  109. // $Log:$
  110. //
  111. //-----------------------------------------------------------------------------
  112.