Blender  V3.3
DNA_sound_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
7 #pragma once
8 
9 #include "DNA_ID.h"
10 #include "DNA_defs.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 struct Ipo;
17 struct PackedFile;
18 
19 typedef struct bSound {
20  ID id;
21 
26  char filepath[1024];
27 
32 
36  void *handle;
37 
42  struct Ipo *ipo;
43 
44  float volume;
45  float attenuation;
46  float pitch;
47  float min_gain;
48  float max_gain;
49  float distance;
50  short flags;
52  short tags;
53  char _pad[4];
54  double offset_time;
55 
56  /* Unused currently. */
57  // int type;
58  // struct bSound *child_sound;
59 
63  void *cache;
64 
68  void *waveform;
69 
75 
77  void *spinlock;
78  /* XXX unused currently (SOUND_TYPE_LIMITER) */
79  /* float start, end; */
80 
81  /* Description of Audio channels, as of eSoundChannels*/
83 
85 
87 
88 /* XXX unused currently */
89 #if 0
90 typedef enum eSound_Type {
91  SOUND_TYPE_INVALID = -1,
92  SOUND_TYPE_FILE = 0,
93  SOUND_TYPE_BUFFER = 1,
94  SOUND_TYPE_LIMITER = 2,
95 } eSound_Type;
96 #endif
97 
99 enum {
100 #ifdef DNA_DEPRECATED_ALLOW
101  /* deprecated! used for sound actuator loading */
102  SOUND_FLAGS_3D = (1 << 3),
103 #endif
105  SOUND_FLAGS_MONO = (1 << 5),
106 };
107 
109 enum {
110  /* Do not free/reset waveform on sound load, only used by undo code. */
113 };
114 
115 #ifdef __cplusplus
116 }
117 #endif
ID and Library types, which are fundamental for sdna.
@ SOUND_FLAGS_MONO
@ SOUND_FLAGS_CACHING
struct bSound bSound
@ SOUND_TAGS_WAVEFORM_LOADING
@ SOUND_TAGS_WAVEFORM_NO_RELOAD
Definition: DNA_ID.h:368
int samplerate
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
int audio_channels
short flags
char _pad[4]
float max_gain
float distance
float pitch
float attenuation
short tags
double offset_time
float volume