Welcome to mirror list, hosted at ThFree Co, Russian Federation.

AUD_Sequence.h « C « bindings « audaspace « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 668960c7d50f1cae4e84092cc55a33a646c77fe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
/*******************************************************************************
 * Copyright 2009-2016 Jörg Müller
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

#pragma once

#include "AUD_Device.h"

#ifdef __cplusplus
extern "C" {
#endif

/// Possible animatable properties for Sequence Factories and Entries.
typedef enum
{
	AUD_AP_VOLUME,
	AUD_AP_PANNING,
	AUD_AP_PITCH,
	AUD_AP_LOCATION,
	AUD_AP_ORIENTATION
} AUD_AnimateablePropertyType;

/**
 * Creates a new sequenced sound scene.
 * \param fps The FPS of the scene.
 * \param muted Whether the scene is muted.
 * \return The new sound scene.
 */
extern AUD_API AUD_Sound* AUD_Sequence_create(float fps, int muted);

/**
 * Deletes a sound scene.
 * \param sequence The sound scene.
 */
extern AUD_API void AUD_Sequence_free(AUD_Sound* sequence);

/**
 * Adds a new entry to the scene.
 * \param sequence The sound scene.
 * \param sound The sound this entry should play.
 * \param begin The start time.
 * \param end The end time or a negative value if determined by the sound.
 * \param skip How much seconds should be skipped at the beginning.
 * \return The entry added.
 */
extern AUD_API AUD_SequenceEntry* AUD_Sequence_add(AUD_Sound* sequence, AUD_Sound* sound, float begin, float end, float skip);

/**
 * Removes an entry from the scene.
 * \param sequence The sound scene.
 * \param entry The entry to remove.
 */
extern AUD_API void AUD_Sequence_remove(AUD_Sound* sequence, AUD_SequenceEntry* entry);

/**
 * Writes animation data to a sequence.
 * \param sequence The sound scene.
 * \param type The type of animation data.
 * \param frame The frame this data is for.
 * \param data The data to write.
 * \param animated Whether the attribute is animated.
 */
extern AUD_API void AUD_Sequence_setAnimationData(AUD_Sound* sequence, AUD_AnimateablePropertyType type, int frame, float* data, char animated);

/**
 * Retrieves the distance model of a sequence.
 * param sequence The sequence to get the distance model from.
 * return The distance model of the sequence.
 */
extern AUD_API AUD_DistanceModel AUD_Sequence_getDistanceModel(AUD_Sound* sequence);

/**
 * Sets the distance model of a sequence.
 * param sequence The sequence to set the distance model from.
 * param value The new distance model to set.
 */
extern AUD_API void AUD_Sequence_setDistanceModel(AUD_Sound* sequence, AUD_DistanceModel value);

/**
 * Retrieves the doppler factor of a sequence.
 * param sequence The sequence to get the doppler factor from.
 * return The doppler factor of the sequence.
 */
extern AUD_API float AUD_Sequence_getDopplerFactor(AUD_Sound* sequence);

/**
 * Sets the doppler factor of a sequence.
 * param sequence The sequence to set the doppler factor from.
 * param value The new doppler factor to set.
 */
extern AUD_API void AUD_Sequence_setDopplerFactor(AUD_Sound* sequence, float value);

/**
 * Retrieves the fps of a sequence.
 * param sequence The sequence to get the fps from.
 * return The fps of the sequence.
 */
extern AUD_API float AUD_Sequence_getFPS(AUD_Sound* sequence);

/**
 * Sets the fps of a sequence.
 * param sequence The sequence to set the fps from.
 * param value The new fps to set.
 */
extern AUD_API void AUD_Sequence_setFPS(AUD_Sound* sequence, float value);

/**
 * Retrieves the muted of a sequence.
 * param sequence The sequence to get the muted from.
 * return The muted of the sequence.
 */
extern AUD_API int AUD_Sequence_isMuted(AUD_Sound* sequence);

/**
 * Sets the muted of a sequence.
 * param sequence The sequence to set the muted from.
 * param value The new muted to set.
 */
extern AUD_API void AUD_Sequence_setMuted(AUD_Sound* sequence, int value);

/**
 * Retrieves the specs of a sequence.
 * param sequence The sequence to get the specs from.
 * return The specs of the sequence.
 */
extern AUD_API AUD_Specs AUD_Sequence_getSpecs(AUD_Sound* sequence);

/**
 * Sets the specs of a sequence.
 * param sequence The sequence to set the specs from.
 * param value The new specs to set.
 */
extern AUD_API void AUD_Sequence_setSpecs(AUD_Sound* sequence, AUD_Specs value);

/**
 * Retrieves the speed of sound of a sequence.
 * param sequence The sequence to get the speed of sound from.
 * return The speed of sound of the sequence.
 */
extern AUD_API float AUD_Sequence_getSpeedOfSound(AUD_Sound* sequence);

/**
 * Sets the speed of sound of a sequence.
 * param sequence The sequence to set the speed of sound from.
 * param value The new speed of sound to set.
 */
extern AUD_API void AUD_Sequence_setSpeedOfSound(AUD_Sound* sequence, float value);



/**
 * Moves the entry.
 * \param entry The sequenced entry.
 * \param begin The new start time.
 * \param end The new end time or a negative value if unknown.
 * \param skip How many seconds to skip at the beginning.
 */
extern AUD_API void AUD_SequenceEntry_move(AUD_SequenceEntry* entry, float begin, float end, float skip);

/**
 * Writes animation data to a sequenced entry.
 * \param entry The sequenced entry.
 * \param type The type of animation data.
 * \param frame The frame this data is for.
 * \param data The data to write.
 * \param animated Whether the attribute is animated.
 */
extern AUD_API void AUD_SequenceEntry_setAnimationData(AUD_SequenceEntry* entry, AUD_AnimateablePropertyType type, int frame, float* data, char animated);

/**
 * Retrieves the attenuation of a sequence_entry.
 * param sequence_entry The sequence_entry to get the attenuation from.
 * return The attenuation of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getAttenuation(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the attenuation of a sequence_entry.
 * param sequence_entry The sequence_entry to set the attenuation from.
 * param value The new attenuation to set.
 */
extern AUD_API void AUD_SequenceEntry_setAttenuation(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the cone angle inner of a sequence_entry.
 * param sequence_entry The sequence_entry to get the cone angle inner from.
 * return The cone angle inner of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getConeAngleInner(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the cone angle inner of a sequence_entry.
 * param sequence_entry The sequence_entry to set the cone angle inner from.
 * param value The new cone angle inner to set.
 */
extern AUD_API void AUD_SequenceEntry_setConeAngleInner(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the cone angle outer of a sequence_entry.
 * param sequence_entry The sequence_entry to get the cone angle outer from.
 * return The cone angle outer of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getConeAngleOuter(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the cone angle outer of a sequence_entry.
 * param sequence_entry The sequence_entry to set the cone angle outer from.
 * param value The new cone angle outer to set.
 */
extern AUD_API void AUD_SequenceEntry_setConeAngleOuter(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the cone volume outer of a sequence_entry.
 * param sequence_entry The sequence_entry to get the cone volume outer from.
 * return The cone volume outer of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getConeVolumeOuter(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the cone volume outer of a sequence_entry.
 * param sequence_entry The sequence_entry to set the cone volume outer from.
 * param value The new cone volume outer to set.
 */
extern AUD_API void AUD_SequenceEntry_setConeVolumeOuter(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the distance maximum of a sequence_entry.
 * param sequence_entry The sequence_entry to get the distance maximum from.
 * return The distance maximum of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getDistanceMaximum(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the distance maximum of a sequence_entry.
 * param sequence_entry The sequence_entry to set the distance maximum from.
 * param value The new distance maximum to set.
 */
extern AUD_API void AUD_SequenceEntry_setDistanceMaximum(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the distance reference of a sequence_entry.
 * param sequence_entry The sequence_entry to get the distance reference from.
 * return The distance reference of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getDistanceReference(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the distance reference of a sequence_entry.
 * param sequence_entry The sequence_entry to set the distance reference from.
 * param value The new distance reference to set.
 */
extern AUD_API void AUD_SequenceEntry_setDistanceReference(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the muted of a sequence_entry.
 * param sequence_entry The sequence_entry to get the muted from.
 * return The muted of the sequence_entry.
 */
extern AUD_API int AUD_SequenceEntry_isMuted(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the muted of a sequence_entry.
 * param sequence_entry The sequence_entry to set the muted from.
 * param value The new muted to set.
 */
extern AUD_API void AUD_SequenceEntry_setMuted(AUD_SequenceEntry* sequence_entry, int value);

/**
 * Retrieves the relative of a sequence_entry.
 * param sequence_entry The sequence_entry to get the relative from.
 * return The relative of the sequence_entry.
 */
extern AUD_API int AUD_SequenceEntry_isRelative(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the relative of a sequence_entry.
 * param sequence_entry The sequence_entry to set the relative from.
 * param value The new relative to set.
 */
extern AUD_API void AUD_SequenceEntry_setRelative(AUD_SequenceEntry* sequence_entry, int value);

/**
 * Retrieves the sound of a sequence_entry.
 * param sequence_entry The sequence_entry to get the sound from.
 * return The sound of the sequence_entry.
 */
extern AUD_API AUD_Sound* AUD_SequenceEntry_getSound(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the sound of a sequence_entry.
 * param sequence_entry The sequence_entry to set the sound from.
 * param value The new sound to set.
 */
extern AUD_API void AUD_SequenceEntry_setSound(AUD_SequenceEntry* sequence_entry, AUD_Sound* value);

/**
 * Retrieves the volume maximum of a sequence_entry.
 * param sequence_entry The sequence_entry to get the volume maximum from.
 * return The volume maximum of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getVolumeMaximum(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the volume maximum of a sequence_entry.
 * param sequence_entry The sequence_entry to set the volume maximum from.
 * param value The new volume maximum to set.
 */
extern AUD_API void AUD_SequenceEntry_setVolumeMaximum(AUD_SequenceEntry* sequence_entry, float value);

/**
 * Retrieves the volume minimum of a sequence_entry.
 * param sequence_entry The sequence_entry to get the volume minimum from.
 * return The volume minimum of the sequence_entry.
 */
extern AUD_API float AUD_SequenceEntry_getVolumeMinimum(AUD_SequenceEntry* sequence_entry);

/**
 * Sets the volume minimum of a sequence_entry.
 * param sequence_entry The sequence_entry to set the volume minimum from.
 * param value The new volume minimum to set.
 */
extern AUD_API void AUD_SequenceEntry_setVolumeMinimum(AUD_SequenceEntry* sequence_entry, float value);

#ifdef __cplusplus
}
#endif