Blender V4.5
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 Ipo;
14struct PackedFile;
15
16typedef struct bSound {
17#ifdef __cplusplus
19 static constexpr ID_Type id_type = ID_SO;
20#endif
21
23
27 char filepath[/*FILE_MAX*/ 1024];
28
33
37 void *handle;
38
43 struct Ipo *ipo;
44
45 float volume;
47 float pitch;
48 float min_gain;
49 float max_gain;
50 float distance;
51 short flags;
53 short tags;
54 char _pad[4];
56
57 /* Unused currently. */
58 // int type;
59 // struct bSound *child_sound;
60
64 void *cache;
65
69 void *waveform;
70
76
78 void *spinlock;
79 /* XXX unused currently (SOUND_TYPE_LIMITER) */
80 // float start, end;
81
82 /* Description of Audio channels, as of #eSoundChannels. */
84
86
88
89/* XXX unused currently */
90#if 0
91typedef enum eSound_Type {
92 SOUND_TYPE_INVALID = -1,
93 SOUND_TYPE_FILE = 0,
94 SOUND_TYPE_BUFFER = 1,
95 SOUND_TYPE_LIMITER = 2,
96} eSound_Type;
97#endif
98
100enum {
101#ifdef DNA_DEPRECATED_ALLOW
102 /* deprecated! used for sound actuator loading */
103 SOUND_FLAGS_3D = (1 << 3),
104#endif
107};
108
110enum {
111 /* Do not free/reset waveform on sound load, only used by undo code. */
114};
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_SO
@ SOUND_TAGS_WAVEFORM_LOADING
@ SOUND_TAGS_WAVEFORM_NO_RELOAD
@ SOUND_FLAGS_MONO
@ SOUND_FLAGS_CACHING
Definition DNA_ID.h:404
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
double offset_time
float volume