#include "bool.h"
Include dependency graph for audio.h:

Go to the source code of this file.
Defines | |
| #define | DistSq(p1, p2) |
| Computes the square of the distance between two players. | |
| #define | MAX_SQ_DIST (27500<<2) |
| The maximum squared distance that can be heard by the player. | |
| #define | PlayLocalTankMove() PlaySound(SND_MOVE, SND_CH_TANK, -1) |
| Plays the sound of the local player's tank moving. | |
| #define | PlayTankIdle() PlaySound(SND_IDLE, SND_CH_TANK, -1) |
| Plays the sound of the local player's tank idling. | |
| #define | PlayTankKilled(distsq) PlaySoundDist(SND_DEATH, -1, distsq, 0) |
| Plays the sound of the destruction of a tank other than the local player's tank. | |
| #define | PlayTankMove(distsq) PlaySoundDist(SND_MOVE, SND_CH_TANK, distsq, -1) |
| Plays the sound of a tank, other than the local player's tank, moving. | |
| #define | PlayTankShoot(distsq) PlaySoundDist(SND_SHOOT, -1, distsq, 0) |
| Plays the sound of a tank, other than the local player's tank, shooting. | |
Enumerations | |
| enum | SND_CHANNEL { SND_CH_LOCALSHOOT, SND_CH_TANK, SND_CH_RESERVE, SND_CH_MAX = 8 } |
| The audio channels that are mixed together to produce the final output. More... | |
| enum | SND_SOUND { SND_IDLE, SND_MOVE, SND_SHOOT, SND_DEATH, SND_MAX } |
| The available sounds. More... | |
Functions | |
| Bool | InitAudio () |
| Prepares for auido output by requesting output resources and loading in the game sounds. | |
| void | PauseSound (int chan) |
| Pauses the sound on a specific mixing channel. | |
| Bool | PlayLocalDeath () |
| Stops all sounds and plays the sound of the local player's tank being destroyed. | |
| Bool | PlaySound (int snd, int chan, int count) |
| Plays a sound; intended to play sounds caused by actions taken by the local player. | |
| Bool | PlaySoundDist (int snd, int chan, int distsq, int count) |
| Plays a sound with its volume attenuated according to its distance from the local player. | |
| void | StopAllSounds () |
| Halts all playing sounds on all channels. | |
| void | UninitAudio () |
| Stops all sounds and frees all resources needed for audio output. | |
Copyright (C) 2007 Jeff Jackowski
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at: http://www.gnu.org/
Definition in file audio.h.
1.5.2