s_music.h

Go to the documentation of this file.
00001 
00006 /*
00007 All original material Copyright (C) 2002-2010 UFO: Alien Invasion.
00008 
00009 Original file from Quake 2 v3.21: quake2-2.31/client/sound.h
00010 Copyright (C) 1997-2001 Id Software, Inc.
00011 
00012 This program is free software; you can redistribute it and/or
00013 modify it under the terms of the GNU General Public License
00014 as published by the Free Software Foundation; either version 2
00015 of the License, or (at your option) any later version.
00016 
00017 This program is distributed in the hope that it will be useful,
00018 but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020 
00021 See the GNU General Public License for more details.
00022 
00023 You should have received a copy of the GNU General Public License
00024 along with this program; if not, write to the Free Software
00025 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00026 
00027 */
00028 
00029 #ifndef CLIENT_SOUND_MUSIC_H
00030 #define CLIENT_SOUND_MUSIC_H
00031 
00032 /* 2 channels and a width of 2 bytes (short) */
00033 #define SAMPLE_SIZE 4
00034 #define MAX_RAW_SAMPLES 4096 * SAMPLE_SIZE
00035 
00036 typedef struct musicStream_s {
00037     qboolean playing;
00038     byte sampleBuf[MAX_RAW_SAMPLES];
00039     int mixerPos;
00040     int samplePos;
00041 } musicStream_t;
00042 
00043 void M_PlayMusicStream(musicStream_t *userdata);
00044 void M_AddToSampleBuffer(musicStream_t *userdata, int rate, int samples, const byte *data);
00045 void M_StopMusicStream(musicStream_t *userdata);
00046 void M_ParseMusic(const char *name, const char **text);
00047 void M_Frame(void);
00048 void M_Init(void);
00049 void M_Shutdown(void);
00050 void M_Stop(void);
00051 
00052 #endif

Generated by  doxygen 1.6.2