Blender V5.0
DNA_sound_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
7
8#pragma once
9
10#include "DNA_ID.h"
11#include "DNA_defs.h"
12
13struct PackedFile;
14
15typedef struct bSound {
16#ifdef __cplusplus
18 static constexpr ID_Type id_type = ID_SO;
19#endif
20
22
23 void *_pad1;
24
28 char filepath[/*FILE_MAX*/ 1024];
29
34
38 void *handle;
39
44 void *_pad0;
45
46 float volume;
48 float pitch;
49 float min_gain;
50 float max_gain;
51 float distance;
52 short flags;
54 short tags;
55 char _pad[4];
57
58 /* Unused currently. */
59 // int type;
60 // struct bSound *child_sound;
61
65 void *cache;
66
70 void *waveform;
71
77
79 void *spinlock;
80 /* XXX unused currently (SOUND_TYPE_LIMITER) */
81 // float start, end;
82
83 /* Description of Audio channels, as of #eSoundChannels. */
85
87
89
90/* XXX unused currently */
91#if 0
92typedef enum eSound_Type {
93 SOUND_TYPE_INVALID = -1,
94 SOUND_TYPE_FILE = 0,
95 SOUND_TYPE_BUFFER = 1,
96 SOUND_TYPE_LIMITER = 2,
97} eSound_Type;
98#endif
99
101enum {
102#ifdef DNA_DEPRECATED_ALLOW
103 /* deprecated! used for sound actuator loading */
104 SOUND_FLAGS_3D = (1 << 3),
105#endif
108};
109
111enum {
112 /* Do not free/reset waveform on sound load, only used by undo code. */
115};
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_SO
@ SOUND_FLAGS_MONO
@ SOUND_FLAGS_CACHING
@ SOUND_TAGS_WAVEFORM_LOADING
@ SOUND_TAGS_WAVEFORM_NO_RELOAD
Definition DNA_ID.h:414
void * _pad1
void * playback_handle
struct PackedFile * packedfile
struct PackedFile * newpackedfile
char filepath[1024]
void * handle
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
double offset_time
float volume
void * _pad0