home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #2 / amigaacscoverdisc1998-021998.iso / games / doom / source / linuxdoom-1.10 / i_sound.h < prev    next >
C/C++ Source or Header  |  1997-12-22  |  3KB  |  123 lines

  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. // UNIX hack, to be removed.
  29. #ifdef SNDSERV
  30. #include <stdio.h>
  31. extern FILE* sndserver;
  32. extern char* sndserver_filename;
  33. #endif
  34.  
  35. #include "doomstat.h"
  36. #include "sounds.h"
  37.  
  38.  
  39.  
  40. // Init at program start...
  41. void I_InitSound();
  42.  
  43. // ... update sound buffer and audio device at runtime...
  44. void I_UpdateSound(void);
  45. void I_SubmitSound(void);
  46.  
  47. // ... shut down and relase at program termination.
  48. void I_ShutdownSound(void);
  49.  
  50.  
  51. //
  52. //  SFX I/O
  53. //
  54.  
  55. // Initialize channels?
  56. void I_SetChannels();
  57.  
  58. // Get raw data lump index for sound descriptor.
  59. int I_GetSfxLumpNum (sfxinfo_t* sfxinfo );
  60.  
  61.  
  62. // Starts a sound in a particular sound channel.
  63. int
  64. I_StartSound
  65. ( int        id,
  66.   int        vol,
  67.   int        sep,
  68.   int        pitch,
  69.   int        priority );
  70.  
  71.  
  72. // Stops a sound channel.
  73. void I_StopSound(int handle);
  74.  
  75. // Called by S_*() functions
  76. //  to see if a channel is still playing.
  77. // Returns 0 if no longer playing, 1 if playing.
  78. int I_SoundIsPlaying(int handle);
  79.  
  80. // Updates the volume, separation,
  81. //  and pitch of a sound channel.
  82. void
  83. I_UpdateSoundParams
  84. ( int        handle,
  85.   int        vol,
  86.   int        sep,
  87.   int        pitch );
  88.  
  89.  
  90. //
  91. //  MUSIC I/O
  92. //
  93. void I_InitMusic(void);
  94. void I_ShutdownMusic(void);
  95. // Volume.
  96. void I_SetMusicVolume(int volume);
  97. // PAUSE game handling.
  98. void I_PauseSong(int handle);
  99. void I_ResumeSong(int handle);
  100. // Registers a song handle to song data.
  101. int I_RegisterSong(void *data);
  102. // Called by anything that wishes to start music.
  103. //  plays a song, and when the song is done,
  104. //  starts playing it again in an endless loop.
  105. // Horrible thing to do, considering.
  106. void
  107. I_PlaySong
  108. ( int        handle,
  109.   int        looping );
  110. // Stops a song over 3 seconds.
  111. void I_StopSong(int handle);
  112. // See above (register), then think backwards
  113. void I_UnRegisterSong(int handle);
  114.  
  115.  
  116.  
  117. #endif
  118. //-----------------------------------------------------------------------------
  119. //
  120. // $Log:$
  121. //
  122. //-----------------------------------------------------------------------------
  123.