1 // 2 // Copyright(C) 1993-1996 Id Software, Inc. 3 // Copyright(C) 2005-2014 Simon Howard 4 // 5 // This program is free software; you can redistribute it and/or 6 // modify it under the terms of the GNU General Public License 7 // as published by the Free Software Foundation; either version 2 8 // of the License, or (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // DESCRIPTION: 16 // The not so system specific sound interface. 17 // 18 19 20 #ifndef __S_SOUND__ 21 #define __S_SOUND__ 22 23 #include "p_mobj.h" 24 #include "sounds.h" 25 26 // 27 // Initializes sound stuff, including volume 28 // Sets channels, SFX and music volume, 29 // allocates channel buffer, sets S_sfx lookup. 30 // 31 32 void S_Init(int sfxVolume, int musicVolume); 33 34 35 // Shut down sound 36 37 void S_Shutdown(void); 38 39 40 41 // 42 // Per level startup code. 43 // Kills playing sounds at start of level, 44 // determines music if any, changes music. 45 // 46 47 void S_Start(void); 48 49 // 50 // Start sound for thing at <origin> 51 // using <sound_id> from sounds.h 52 // 53 54 void S_StartSound(void *origin, int sound_id); 55 56 // Stop sound for thing at <origin> 57 void S_StopSound(mobj_t *origin); 58 59 60 // Start music using <music_id> from sounds.h 61 void S_StartMusic(int music_id); 62 63 // Start music using <music_id> from sounds.h, 64 // and set whether looping 65 void S_ChangeMusic(int music_id, int looping); 66 67 // query if music is playing 68 boolean S_MusicPlaying(void); 69 70 // Stops the music fer sure. 71 void S_StopMusic(void); 72 73 // Stop and resume music, during game PAUSE. 74 void S_PauseSound(void); 75 void S_ResumeSound(void); 76 77 78 // 79 // Updates music & sounds 80 // 81 void S_UpdateSounds(mobj_t *listener); 82 83 void S_SetMusicVolume(int volume); 84 void S_SetSfxVolume(int volume); 85 86 extern int snd_channels; 87 88 #endif 89 90