1 /** 2 * @file 3 * @brief Specifies sound API? 4 */ 5 6 /* 7 All original material Copyright (C) 2002-2013 UFO: Alien Invasion. 8 9 Original file from Quake 2 v3.21: quake2-2.31/client/sound.h 10 Copyright (C) 1997-2001 Id Software, Inc. 11 12 This program is free software; you can redistribute it and/or 13 modify it under the terms of the GNU General Public License 14 as published by the Free Software Foundation; either version 2 15 of the License, or (at your option) any later version. 16 17 This program is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 21 See the GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with this program; if not, write to the Free Software 25 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 26 27 */ 28 29 #pragma once 30 31 #include "../../shared/mathlib.h" /* for vec3_t */ 32 33 /** @brief These sounds are precached in S_LoadSamples */ 34 typedef enum { 35 SOUND_WATER_IN, 36 SOUND_WATER_OUT, 37 SOUND_WATER_MOVE, 38 39 MAX_SOUNDIDS 40 } stdsound_t; 41 42 #define SND_VOLUME_DEFAULT 1.0f 43 #define SND_VOLUME_WEAPONS 1.0f 44 45 void S_Init(void); 46 void S_Shutdown(void); 47 void S_Frame(void); 48 void S_Stop(void); 49 void S_PlayStdSample(const stdsound_t sId, const vec3_t origin, float atten, float volume); 50 void S_StartLocalSample(const char* s, float volume); 51 int S_LoadSampleIdx (const char* soundFile); 52 bool S_LoadAndPlaySample(const char* s, const vec3_t origin, float atten, float volume); 53 void S_SetSampleRepeatRate(int sampleRepeatRate); 54 void S_LoadSamples(void); 55