FS2_Open
Open source remastering of the Freespace 2 engine
channel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 #ifndef __CHANNEL_H__
12 #define __CHANNEL_H__
13 
14 #include "sound/openal.h"
15 
16 typedef struct channel
17 {
18  int sig; // uniquely identifies the sound playing on the channel
19  int snd_id; // identifies which kind of sound is playing
20  ALuint source_id; // OpenAL source id
21  int sid; // currently bound sound buffer index (-1 if none)
22  int looping; // flag to indicate that the sound is looping
23  float vol; // in linear scale
24  int priority; // implementation dependant priority
25  unsigned int last_position;
27  bool is_ambient;
28 
29  channel() :
30  sig(-1), snd_id(-1), source_id(0), sid(-1), looping(0), vol(1.0f),
31  priority(0), last_position(0), is_voice_msg(false), is_ambient(false)
32  {
33  }
34 } channel;
35 
36 
37 // #define MAX_CHANNELS 16
38 extern channel* Channels; //[MAX_CHANNELS];
39 
40 #endif /* __CHANNEL_H__ */
GLclampf f
Definition: Glext.h:7097
ALuint source_id
Definition: channel.h:20
struct channel channel
unsigned int last_position
Definition: channel.h:25
float vol
Definition: channel.h:23
bool is_ambient
Definition: channel.h:27
int looping
Definition: channel.h:22
channel * Channels
Definition: ds.cpp:46
int snd_id
Definition: channel.h:19
int priority
Definition: channel.h:24
bool is_voice_msg
Definition: channel.h:26
false
Definition: lua.cpp:6789
int sid
Definition: channel.h:21
channel()
Definition: channel.h:29
int sig
Definition: channel.h:18