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

AUD_Handle.h « C « bindings « audaspace « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27cbd251de582fe6b73feb4952247cb40880ec20 (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
/*******************************************************************************
 * 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_Types.h"

#ifdef __cplusplus
extern "C" {
#endif

/// Status of a playback handle.
typedef enum
{
	AUD_STATUS_INVALID = 0,			/// Invalid handle. Maybe due to stopping.
	AUD_STATUS_PLAYING,				/// Sound is playing.
	AUD_STATUS_PAUSED,				/// Sound is being paused.
	AUD_STATUS_STOPPED				/// Sound is stopped but kept in the device.
} AUD_Status;

/**
 * Pauses a played back sound.
 * \param handle The handle to the sound.
 * \return Whether the handle has been playing or not.
 */
extern AUD_API int AUD_Handle_pause(AUD_Handle* handle);

/**
 * Resumes a paused sound.
 * \param handle The handle to the sound.
 * \return Whether the handle has been paused or not.
 */
extern AUD_API int AUD_Handle_resume(AUD_Handle* handle);

/**
 * Stops a playing or paused sound.
 * \param handle The handle to the sound.
 * \return Whether the handle has been valid or not.
 */
extern AUD_API int AUD_Handle_stop(AUD_Handle* handle);

/**
 * Retrieves the attenuation of a handle.
 * param handle The handle to get the attenuation from.
 * return The attenuation of the handle.
 */
extern AUD_API float AUD_Handle_getAttenuation(AUD_Handle* handle);

/**
 * Sets the attenuation of a handle.
 * param handle The handle to set the attenuation from.
 * param value The new attenuation to set.
 */
extern AUD_API int AUD_Handle_setAttenuation(AUD_Handle* handle, float value);

/**
 * Retrieves the cone angle inner of a handle.
 * param handle The handle to get the cone angle inner from.
 * return The cone angle inner of the handle.
 */
extern AUD_API float AUD_Handle_getConeAngleInner(AUD_Handle* handle);

/**
 * Sets the cone angle inner of a handle.
 * param handle The handle to set the cone angle inner from.
 * param value The new cone angle inner to set.
 */
extern AUD_API int AUD_Handle_setConeAngleInner(AUD_Handle* handle, float value);

/**
 * Retrieves the cone angle outer of a handle.
 * param handle The handle to get the cone angle outer from.
 * return The cone angle outer of the handle.
 */
extern AUD_API float AUD_Handle_getConeAngleOuter(AUD_Handle* handle);

/**
 * Sets the cone angle outer of a handle.
 * param handle The handle to set the cone angle outer from.
 * param value The new cone angle outer to set.
 */
extern AUD_API int AUD_Handle_setConeAngleOuter(AUD_Handle* handle, float value);

/**
 * Retrieves the cone volume outer of a handle.
 * param handle The handle to get the cone volume outer from.
 * return The cone volume outer of the handle.
 */
extern AUD_API float AUD_Handle_getConeVolumeOuter(AUD_Handle* handle);

/**
 * Sets the cone volume outer of a handle.
 * param handle The handle to set the cone volume outer from.
 * param value The new cone volume outer to set.
 */
extern AUD_API int AUD_Handle_setConeVolumeOuter(AUD_Handle* handle, float value);

/**
 * Retrieves the distance maximum of a handle.
 * param handle The handle to get the distance maximum from.
 * return The distance maximum of the handle.
 */
extern AUD_API float AUD_Handle_getDistanceMaximum(AUD_Handle* handle);

/**
 * Sets the distance maximum of a handle.
 * param handle The handle to set the distance maximum from.
 * param value The new distance maximum to set.
 */
extern AUD_API int AUD_Handle_setDistanceMaximum(AUD_Handle* handle, float value);

/**
 * Retrieves the distance reference of a handle.
 * param handle The handle to get the distance reference from.
 * return The distance reference of the handle.
 */
extern AUD_API float AUD_Handle_getDistanceReference(AUD_Handle* handle);

/**
 * Sets the distance reference of a handle.
 * param handle The handle to set the distance reference from.
 * param value The new distance reference to set.
 */
extern AUD_API int AUD_Handle_setDistanceReference(AUD_Handle* handle, float value);

/**
 * Retrieves the keep of a handle.
 * param handle The handle to get the keep from.
 * return The keep of the handle.
 */
extern AUD_API int AUD_Handle_doesKeep(AUD_Handle* handle);

/**
 * Sets the keep of a handle.
 * param handle The handle to set the keep from.
 * param value The new keep to set.
 */
extern AUD_API int AUD_Handle_setKeep(AUD_Handle* handle, int value);

/**
 * Retrieves the location of a handle.
 * param handle The handle to get the location from.
 * return The location of the handle.
 */
extern AUD_API int AUD_Handle_getLocation(AUD_Handle* handle, float value[3]);

/**
 * Sets the location of a handle.
 * param handle The handle to set the location from.
 * param value The new location to set.
 */
extern AUD_API int AUD_Handle_setLocation(AUD_Handle* handle, const float value[3]);

/**
 * Retrieves the loop count of a handle.
 * param handle The handle to get the loop count from.
 * return The loop count of the handle.
 */
extern AUD_API int AUD_Handle_getLoopCount(AUD_Handle* handle);

/**
 * Sets the loop count of a handle.
 * param handle The handle to set the loop count from.
 * param value The new loop count to set.
 */
extern AUD_API int AUD_Handle_setLoopCount(AUD_Handle* handle, int value);

/**
 * Retrieves the orientation of a handle.
 * param handle The handle to get the orientation from.
 * return The orientation of the handle.
 */
extern AUD_API int AUD_Handle_getOrientation(AUD_Handle* handle, float value[4]);

/**
 * Sets the orientation of a handle.
 * param handle The handle to set the orientation from.
 * param value The new orientation to set.
 */
extern AUD_API int AUD_Handle_setOrientation(AUD_Handle* handle, const float value[4]);

/**
 * Retrieves the pitch of a handle.
 * param handle The handle to get the pitch from.
 * return The pitch of the handle.
 */
extern AUD_API float AUD_Handle_getPitch(AUD_Handle* handle);

/**
 * Sets the pitch of a handle.
 * param handle The handle to set the pitch from.
 * param value The new pitch to set.
 */
extern AUD_API int AUD_Handle_setPitch(AUD_Handle* handle, float value);

/**
 * Retrieves the position of a handle.
 * param handle The handle to get the position from.
 * return The position of the handle.
 */
extern AUD_API float AUD_Handle_getPosition(AUD_Handle* handle);

/**
 * Sets the position of a handle.
 * param handle The handle to set the position from.
 * param value The new position to set.
 */
extern AUD_API int AUD_Handle_setPosition(AUD_Handle* handle, float value);

/**
 * Retrieves the relative of a handle.
 * param handle The handle to get the relative from.
 * return The relative of the handle.
 */
extern AUD_API int AUD_Handle_isRelative(AUD_Handle* handle);

/**
 * Sets the relative of a handle.
 * param handle The handle to set the relative from.
 * param value The new relative to set.
 */
extern AUD_API int AUD_Handle_setRelative(AUD_Handle* handle, int value);

/**
 * Retrieves the status of a handle.
 * param handle The handle to get the status from.
 * return The status of the handle.
 */
extern AUD_API AUD_Status AUD_Handle_getStatus(AUD_Handle* handle);

/**
 * Retrieves the velocity of a handle.
 * param handle The handle to get the velocity from.
 * return The velocity of the handle.
 */
extern AUD_API int AUD_Handle_getVelocity(AUD_Handle* handle, float value[3]);

/**
 * Sets the velocity of a handle.
 * param handle The handle to set the velocity from.
 * param value The new velocity to set.
 */
extern AUD_API int AUD_Handle_setVelocity(AUD_Handle* handle, const float value[3]);

/**
 * Retrieves the volume of a handle.
 * param handle The handle to get the volume from.
 * return The volume of the handle.
 */
extern AUD_API float AUD_Handle_getVolume(AUD_Handle* handle);

/**
 * Sets the volume of a handle.
 * param handle The handle to set the volume from.
 * param value The new volume to set.
 */
extern AUD_API int AUD_Handle_setVolume(AUD_Handle* handle, float value);

/**
 * Retrieves the volume maximum of a handle.
 * param handle The handle to get the volume maximum from.
 * return The volume maximum of the handle.
 */
extern AUD_API float AUD_Handle_getVolumeMaximum(AUD_Handle* handle);

/**
 * Sets the volume maximum of a handle.
 * param handle The handle to set the volume maximum from.
 * param value The new volume maximum to set.
 */
extern AUD_API int AUD_Handle_setVolumeMaximum(AUD_Handle* handle, float value);

/**
 * Retrieves the volume minimum of a handle.
 * param handle The handle to get the volume minimum from.
 * return The volume minimum of the handle.
 */
extern AUD_API float AUD_Handle_getVolumeMinimum(AUD_Handle* handle);

/**
 * Sets the volume minimum of a handle.
 * param handle The handle to set the volume minimum from.
 * param value The new volume minimum to set.
 */
extern AUD_API int AUD_Handle_setVolumeMinimum(AUD_Handle* handle, float value);

/**
 * Frees a handle.
 * \param channel Handle to free.
 */
extern AUD_API void AUD_Handle_free(AUD_Handle* channel);

#ifdef __cplusplus
}
#endif