Odamex
Setting the Standard in Multiplayer Doom
client/sdl/i_sound.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*- 
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: i_sound.h 1788 2010-08-24 04:42:57Z russellrice $
00005 //
00006 // Copyright (C) 1993-1996 by id Software, Inc.
00007 // Copyright (C) 2006-2010 by The Odamex Team.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 //
00020 // DESCRIPTION:
00021 //      System interface, sound.
00022 //      [Odamex] Fitted to work with SDL
00023 //
00024 //-----------------------------------------------------------------------------
00025 
00026 
00027 #ifndef __I_SOUND__
00028 #define __I_SOUND__
00029 
00030 #include "doomdef.h"
00031 
00032 #include "doomstat.h"
00033 #include "s_sound.h"
00034 
00035 
00036 
00037 // Init at program start...
00038 void I_InitSound();
00039 
00040 // ... shut down and relase at program termination.
00041 void STACK_ARGS I_ShutdownSound (void);
00042 
00043 void I_SetSfxVolume (float volume);
00044 
00045 //
00046 //      SFX I/O
00047 //
00048 
00049 // Initialize channels
00050 void I_SetChannels (int);
00051 
00052 // load a sound from disk
00053 void I_LoadSound (struct sfxinfo_struct *sfx);
00054 
00055 // Starts a sound in a particular sound channel.
00056 int
00057 I_StartSound
00058 (int                    id,
00059  int                    vol,
00060  int                    sep,
00061  int                    pitch,
00062  bool                   loop);
00063 
00064 // Stops a sound channel.
00065 void I_StopSound(int handle);
00066 
00067 // Called by S_*() functions
00068 //      to see if a channel is still playing.
00069 // Returns 0 if no longer playing, 1 if playing.
00070 int I_SoundIsPlaying(int handle);
00071 
00072 // Updates the volume, separation,
00073 //      and pitch of a sound channel.
00074 void I_UpdateSoundParams(int handle, float vol, int sep, int pitch);
00075 
00076 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends