Blender  V2.93
DNA_sound_types.h
Go to the documentation of this file.
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  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
23 #pragma once
24 
25 #include "DNA_ID.h"
26 #include "DNA_defs.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 struct Ipo;
33 struct PackedFile;
34 
35 typedef struct bSound {
36  ID id;
37 
42  char filepath[1024];
43 
48 
52  void *handle;
53 
58  struct Ipo *ipo;
59 
60  float volume;
61  float attenuation;
62  float pitch;
63  float min_gain;
64  float max_gain;
65  float distance;
66  short flags;
68  short tags;
69  char _pad[4];
70  double offset_time;
71 
72  /* Unused currently. */
73  // int type;
74  // struct bSound *child_sound;
75 
79  void *cache;
80 
84  void *waveform;
85 
91 
93  void *spinlock;
94  /* XXX unused currently (SOUND_TYPE_LIMITER) */
95  /* float start, end; */
97 
98 /* XXX unused currently */
99 #if 0
100 typedef enum eSound_Type {
101  SOUND_TYPE_INVALID = -1,
102  SOUND_TYPE_FILE = 0,
103  SOUND_TYPE_BUFFER = 1,
104  SOUND_TYPE_LIMITER = 2,
105 } eSound_Type;
106 #endif
107 
109 enum {
110 #ifdef DNA_DEPRECATED_ALLOW
111  /* deprecated! used for sound actuator loading */
112  SOUND_FLAGS_3D = (1 << 3),
113 #endif
115  SOUND_FLAGS_MONO = (1 << 5),
116 };
117 
119 enum {
120  /* Do not free/reset waveform on sound load, only used by undo code. */
123 };
124 
125 #ifdef __cplusplus
126 }
127 #endif
ID and Library types, which are fundamental for sdna.
@ SOUND_TAGS_WAVEFORM_LOADING
@ SOUND_TAGS_WAVEFORM_NO_RELOAD
struct bSound bSound
@ SOUND_FLAGS_MONO
@ SOUND_FLAGS_CACHING
Definition: DNA_ID.h:273
void * playback_handle
struct PackedFile * packedfile
struct PackedFile * newpackedfile
char filepath[1024]
void * handle
struct Ipo * ipo
void * cache
float min_gain
void * spinlock
void * waveform
short flags
char _pad[4]
float max_gain
float distance
float pitch
float attenuation
short tags
double offset_time
float volume