1 /* 2 * Copyright (C) 2002 Terence M. Welsh 3 * Ported to Linux by Tugrul Galatali <tugrul@galatali.com> 4 * 5 * Skyrocket is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * 9 * Skyrocket is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 #ifndef SKYROCKET_SOUND_H 20 #define SKYROCKET_SOUND_H 21 22 #include "config.h" 23 24 #ifdef HAVE_OPENAL 25 26 #include "rsMath/rsVec.h" 27 28 #define NUM_SOURCES 16 29 #define NUM_BUFFERS 10 30 #define LAUNCH1SOUND 0 31 #define LAUNCH2SOUND 1 32 #define BOOM1SOUND 2 33 #define BOOM2SOUND 3 34 #define BOOM3SOUND 4 35 #define BOOM4SOUND 5 36 #define POPPERSOUND 6 37 #define SUCKSOUND 7 38 #define NUKESOUND 8 39 #define WHISTLESOUND 9 40 41 void initSound (); 42 void insertSoundNode (int sound, rsVec source, rsVec observer); 43 void updateSound (float *listenerPos, float *listenerVel, float *listenerOri); 44 void cleanupSound (); 45 46 extern unsigned int boom1SoundData_size; 47 extern unsigned int boom2SoundData_size; 48 extern unsigned int boom3SoundData_size; 49 extern unsigned int boom4SoundData_size; 50 extern unsigned int boom1SoundData_compressedsize; 51 extern unsigned int boom2SoundData_compressedsize; 52 extern unsigned int boom3SoundData_compressedsize; 53 extern unsigned int boom4SoundData_compressedsize; 54 extern unsigned char *boom1SoundData; 55 extern unsigned char *boom2SoundData; 56 extern unsigned char *boom3SoundData; 57 extern unsigned char *boom4SoundData; 58 59 extern unsigned int launch1SoundData_size; 60 extern unsigned int launch2SoundData_size; 61 extern unsigned int launch1SoundData_compressedsize; 62 extern unsigned int launch2SoundData_compressedsize; 63 extern unsigned char *launch1SoundData; 64 extern unsigned char *launch2SoundData; 65 66 extern unsigned int nukeSoundData_size; 67 extern unsigned int nukeSoundData_compressedsize; 68 extern unsigned char *nukeSoundData; 69 70 extern unsigned int popperSoundData_size; 71 extern unsigned int popperSoundData_compressedsize; 72 extern unsigned char *popperSoundData; 73 74 extern unsigned int suckSoundData_size; 75 extern unsigned int suckSoundData_compressedsize; 76 extern unsigned char *suckSoundData; 77 78 extern unsigned int whistleSoundData_size; 79 extern unsigned int whistleSoundData_compressedsize; 80 extern unsigned char *whistleSoundData; 81 82 #endif 83 84 #endif 85