1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 /** \file
18  * \ingroup DNA
19  */
20 
21 #pragma once
22 
23 #include "DNA_ID.h"
24 
25 struct AnimData;
26 struct bSound;
27 
28 typedef struct Speaker {
29   ID id;
30   /** Animation data (must be immediately after id for utilities to use it). */
31   struct AnimData *adt;
32 
33   struct bSound *sound;
34 
35   /* not animatable properties */
36   float volume_max;
37   float volume_min;
38   float distance_max;
39   float distance_reference;
40   float attenuation;
41   float cone_angle_outer;
42   float cone_angle_inner;
43   float cone_volume_outer;
44 
45   /* animatable properties */
46   float volume;
47   float pitch;
48 
49   /* flag */
50   short flag;
51   char _pad1[6];
52 } Speaker;
53 
54 /* **************** SPEAKER ********************* */
55 
56 /* flag */
57 #define SPK_DS_EXPAND (1 << 0)
58 #define SPK_MUTED (1 << 1)
59 // #define SPK_RELATIVE    (1 << 2)  /* UNUSED */
60