1 /**
2 Plays positional sound in 3D space.
3 
4 Copyright:
5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
7 Copyright (c) 2017-2018 Godot-D contributors  
8 
9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
10 
11 
12 */
13 module godot.audiostreamplayer3d;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.spatial;
25 import godot.audiostream;
26 import godot.audiostreamplayback;
27 /**
28 Plays positional sound in 3D space.
29 
30 Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting $(D attenuationFilterCutoffHz) to `20500`.
31 By default, audio is heard from the camera position. This can be changed by adding a $(D Listener) node to the scene and enabling it by calling $(D Listener.makeCurrent) on it.
32 See also $(D AudioStreamPlayer) to play a sound non-positionally.
33 $(B Note:) Hiding an $(D AudioStreamPlayer3D) node does not disable its audio output. To temporarily disable an $(D AudioStreamPlayer3D)'s audio output, set $(D unitDb) to a very low value like `-100` (which isn't audible to human hearing).
34 */
35 @GodotBaseClass struct AudioStreamPlayer3D
36 {
37 	package(godot) enum string _GODOT_internal_name = "AudioStreamPlayer3D";
38 public:
39 @nogc nothrow:
40 	union { /** */ godot_object _godot_object; /** */ Spatial _GODOT_base; }
41 	alias _GODOT_base this;
42 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
43 	package(godot) __gshared bool _classBindingInitialized = false;
44 	package(godot) static struct GDNativeClassBinding
45 	{
46 		__gshared:
47 		@GodotName("_bus_layout_changed") GodotMethod!(void) _busLayoutChanged;
48 		@GodotName("_is_active") GodotMethod!(bool) _isActive;
49 		@GodotName("_set_playing") GodotMethod!(void, bool) _setPlaying;
50 		@GodotName("get_area_mask") GodotMethod!(long) getAreaMask;
51 		@GodotName("get_attenuation_filter_cutoff_hz") GodotMethod!(double) getAttenuationFilterCutoffHz;
52 		@GodotName("get_attenuation_filter_db") GodotMethod!(double) getAttenuationFilterDb;
53 		@GodotName("get_attenuation_model") GodotMethod!(AudioStreamPlayer3D.AttenuationModel) getAttenuationModel;
54 		@GodotName("get_bus") GodotMethod!(String) getBus;
55 		@GodotName("get_doppler_tracking") GodotMethod!(AudioStreamPlayer3D.DopplerTracking) getDopplerTracking;
56 		@GodotName("get_emission_angle") GodotMethod!(double) getEmissionAngle;
57 		@GodotName("get_emission_angle_filter_attenuation_db") GodotMethod!(double) getEmissionAngleFilterAttenuationDb;
58 		@GodotName("get_max_db") GodotMethod!(double) getMaxDb;
59 		@GodotName("get_max_distance") GodotMethod!(double) getMaxDistance;
60 		@GodotName("get_out_of_range_mode") GodotMethod!(AudioStreamPlayer3D.OutOfRangeMode) getOutOfRangeMode;
61 		@GodotName("get_pitch_scale") GodotMethod!(double) getPitchScale;
62 		@GodotName("get_playback_position") GodotMethod!(double) getPlaybackPosition;
63 		@GodotName("get_stream") GodotMethod!(AudioStream) getStream;
64 		@GodotName("get_stream_paused") GodotMethod!(bool) getStreamPaused;
65 		@GodotName("get_stream_playback") GodotMethod!(AudioStreamPlayback) getStreamPlayback;
66 		@GodotName("get_unit_db") GodotMethod!(double) getUnitDb;
67 		@GodotName("get_unit_size") GodotMethod!(double) getUnitSize;
68 		@GodotName("is_autoplay_enabled") GodotMethod!(bool) isAutoplayEnabled;
69 		@GodotName("is_emission_angle_enabled") GodotMethod!(bool) isEmissionAngleEnabled;
70 		@GodotName("is_playing") GodotMethod!(bool) isPlaying;
71 		@GodotName("play") GodotMethod!(void, double) play;
72 		@GodotName("seek") GodotMethod!(void, double) seek;
73 		@GodotName("set_area_mask") GodotMethod!(void, long) setAreaMask;
74 		@GodotName("set_attenuation_filter_cutoff_hz") GodotMethod!(void, double) setAttenuationFilterCutoffHz;
75 		@GodotName("set_attenuation_filter_db") GodotMethod!(void, double) setAttenuationFilterDb;
76 		@GodotName("set_attenuation_model") GodotMethod!(void, long) setAttenuationModel;
77 		@GodotName("set_autoplay") GodotMethod!(void, bool) setAutoplay;
78 		@GodotName("set_bus") GodotMethod!(void, String) setBus;
79 		@GodotName("set_doppler_tracking") GodotMethod!(void, long) setDopplerTracking;
80 		@GodotName("set_emission_angle") GodotMethod!(void, double) setEmissionAngle;
81 		@GodotName("set_emission_angle_enabled") GodotMethod!(void, bool) setEmissionAngleEnabled;
82 		@GodotName("set_emission_angle_filter_attenuation_db") GodotMethod!(void, double) setEmissionAngleFilterAttenuationDb;
83 		@GodotName("set_max_db") GodotMethod!(void, double) setMaxDb;
84 		@GodotName("set_max_distance") GodotMethod!(void, double) setMaxDistance;
85 		@GodotName("set_out_of_range_mode") GodotMethod!(void, long) setOutOfRangeMode;
86 		@GodotName("set_pitch_scale") GodotMethod!(void, double) setPitchScale;
87 		@GodotName("set_stream") GodotMethod!(void, AudioStream) setStream;
88 		@GodotName("set_stream_paused") GodotMethod!(void, bool) setStreamPaused;
89 		@GodotName("set_unit_db") GodotMethod!(void, double) setUnitDb;
90 		@GodotName("set_unit_size") GodotMethod!(void, double) setUnitSize;
91 		@GodotName("stop") GodotMethod!(void) stop;
92 	}
93 	/// 
94 	pragma(inline, true) bool opEquals(in AudioStreamPlayer3D other) const
95 	{ return _godot_object.ptr is other._godot_object.ptr; }
96 	/// 
97 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
98 	{ _godot_object.ptr = n; return null; }
99 	/// 
100 	pragma(inline, true) bool opEquals(typeof(null) n) const
101 	{ return _godot_object.ptr is n; }
102 	/// 
103 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
104 	mixin baseCasts;
105 	/// Construct a new instance of AudioStreamPlayer3D.
106 	/// Note: use `memnew!AudioStreamPlayer3D` instead.
107 	static AudioStreamPlayer3D _new()
108 	{
109 		static godot_class_constructor constructor;
110 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioStreamPlayer3D");
111 		if(constructor is null) return typeof(this).init;
112 		return cast(AudioStreamPlayer3D)(constructor());
113 	}
114 	@disable new(size_t s);
115 	/// 
116 	enum AttenuationModel : int
117 	{
118 		/**
119 		Linear dampening of loudness according to distance.
120 		*/
121 		attenuationInverseDistance = 0,
122 		/**
123 		Squared dampening of loudness according to distance.
124 		*/
125 		attenuationInverseSquareDistance = 1,
126 		/**
127 		Logarithmic dampening of loudness according to distance.
128 		*/
129 		attenuationLogarithmic = 2,
130 		/**
131 		No dampening of loudness according to distance. The sound will still be heard positionally, unlike an $(D AudioStreamPlayer).
132 		*/
133 		attenuationDisabled = 3,
134 	}
135 	/// 
136 	enum OutOfRangeMode : int
137 	{
138 		/**
139 		Mix this audio in, even when it's out of range. This increases CPU usage, but keeps the sound playing at the correct position if the camera leaves and enters the $(D AudioStreamPlayer3D)'s $(D maxDistance) radius.
140 		*/
141 		outOfRangeMix = 0,
142 		/**
143 		Pause this audio when it gets out of range. This decreases CPU usage, but will cause the sound to restart if the camera leaves and enters the $(D AudioStreamPlayer3D)'s $(D maxDistance) radius.
144 		*/
145 		outOfRangePause = 1,
146 	}
147 	/// 
148 	enum DopplerTracking : int
149 	{
150 		/**
151 		Disables doppler tracking.
152 		*/
153 		dopplerTrackingDisabled = 0,
154 		/**
155 		Executes doppler tracking in idle step.
156 		*/
157 		dopplerTrackingIdleStep = 1,
158 		/**
159 		Executes doppler tracking in physics step.
160 		*/
161 		dopplerTrackingPhysicsStep = 2,
162 	}
163 	/// 
164 	enum Constants : int
165 	{
166 		outOfRangeMix = 0,
167 		dopplerTrackingDisabled = 0,
168 		attenuationInverseDistance = 0,
169 		dopplerTrackingIdleStep = 1,
170 		attenuationInverseSquareDistance = 1,
171 		outOfRangePause = 1,
172 		attenuationLogarithmic = 2,
173 		dopplerTrackingPhysicsStep = 2,
174 		attenuationDisabled = 3,
175 	}
176 	/**
177 	
178 	*/
179 	void _busLayoutChanged()
180 	{
181 		Array _GODOT_args = Array.make();
182 		String _GODOT_method_name = String("_bus_layout_changed");
183 		this.callv(_GODOT_method_name, _GODOT_args);
184 	}
185 	/**
186 	
187 	*/
188 	bool _isActive() const
189 	{
190 		Array _GODOT_args = Array.make();
191 		String _GODOT_method_name = String("_is_active");
192 		return this.callv(_GODOT_method_name, _GODOT_args).as!(RefOrT!bool);
193 	}
194 	/**
195 	
196 	*/
197 	void _setPlaying(in bool enable)
198 	{
199 		Array _GODOT_args = Array.make();
200 		_GODOT_args.append(enable);
201 		String _GODOT_method_name = String("_set_playing");
202 		this.callv(_GODOT_method_name, _GODOT_args);
203 	}
204 	/**
205 	
206 	*/
207 	long getAreaMask() const
208 	{
209 		checkClassBinding!(typeof(this))();
210 		return ptrcall!(long)(GDNativeClassBinding.getAreaMask, _godot_object);
211 	}
212 	/**
213 	
214 	*/
215 	double getAttenuationFilterCutoffHz() const
216 	{
217 		checkClassBinding!(typeof(this))();
218 		return ptrcall!(double)(GDNativeClassBinding.getAttenuationFilterCutoffHz, _godot_object);
219 	}
220 	/**
221 	
222 	*/
223 	double getAttenuationFilterDb() const
224 	{
225 		checkClassBinding!(typeof(this))();
226 		return ptrcall!(double)(GDNativeClassBinding.getAttenuationFilterDb, _godot_object);
227 	}
228 	/**
229 	
230 	*/
231 	AudioStreamPlayer3D.AttenuationModel getAttenuationModel() const
232 	{
233 		checkClassBinding!(typeof(this))();
234 		return ptrcall!(AudioStreamPlayer3D.AttenuationModel)(GDNativeClassBinding.getAttenuationModel, _godot_object);
235 	}
236 	/**
237 	
238 	*/
239 	String getBus() const
240 	{
241 		checkClassBinding!(typeof(this))();
242 		return ptrcall!(String)(GDNativeClassBinding.getBus, _godot_object);
243 	}
244 	/**
245 	
246 	*/
247 	AudioStreamPlayer3D.DopplerTracking getDopplerTracking() const
248 	{
249 		checkClassBinding!(typeof(this))();
250 		return ptrcall!(AudioStreamPlayer3D.DopplerTracking)(GDNativeClassBinding.getDopplerTracking, _godot_object);
251 	}
252 	/**
253 	
254 	*/
255 	double getEmissionAngle() const
256 	{
257 		checkClassBinding!(typeof(this))();
258 		return ptrcall!(double)(GDNativeClassBinding.getEmissionAngle, _godot_object);
259 	}
260 	/**
261 	
262 	*/
263 	double getEmissionAngleFilterAttenuationDb() const
264 	{
265 		checkClassBinding!(typeof(this))();
266 		return ptrcall!(double)(GDNativeClassBinding.getEmissionAngleFilterAttenuationDb, _godot_object);
267 	}
268 	/**
269 	
270 	*/
271 	double getMaxDb() const
272 	{
273 		checkClassBinding!(typeof(this))();
274 		return ptrcall!(double)(GDNativeClassBinding.getMaxDb, _godot_object);
275 	}
276 	/**
277 	
278 	*/
279 	double getMaxDistance() const
280 	{
281 		checkClassBinding!(typeof(this))();
282 		return ptrcall!(double)(GDNativeClassBinding.getMaxDistance, _godot_object);
283 	}
284 	/**
285 	
286 	*/
287 	AudioStreamPlayer3D.OutOfRangeMode getOutOfRangeMode() const
288 	{
289 		checkClassBinding!(typeof(this))();
290 		return ptrcall!(AudioStreamPlayer3D.OutOfRangeMode)(GDNativeClassBinding.getOutOfRangeMode, _godot_object);
291 	}
292 	/**
293 	
294 	*/
295 	double getPitchScale() const
296 	{
297 		checkClassBinding!(typeof(this))();
298 		return ptrcall!(double)(GDNativeClassBinding.getPitchScale, _godot_object);
299 	}
300 	/**
301 	Returns the position in the $(D AudioStream).
302 	*/
303 	double getPlaybackPosition()
304 	{
305 		checkClassBinding!(typeof(this))();
306 		return ptrcall!(double)(GDNativeClassBinding.getPlaybackPosition, _godot_object);
307 	}
308 	/**
309 	
310 	*/
311 	Ref!AudioStream getStream() const
312 	{
313 		checkClassBinding!(typeof(this))();
314 		return ptrcall!(AudioStream)(GDNativeClassBinding.getStream, _godot_object);
315 	}
316 	/**
317 	
318 	*/
319 	bool getStreamPaused() const
320 	{
321 		checkClassBinding!(typeof(this))();
322 		return ptrcall!(bool)(GDNativeClassBinding.getStreamPaused, _godot_object);
323 	}
324 	/**
325 	Returns the $(D AudioStreamPlayback) object associated with this $(D AudioStreamPlayer3D).
326 	*/
327 	Ref!AudioStreamPlayback getStreamPlayback()
328 	{
329 		checkClassBinding!(typeof(this))();
330 		return ptrcall!(AudioStreamPlayback)(GDNativeClassBinding.getStreamPlayback, _godot_object);
331 	}
332 	/**
333 	
334 	*/
335 	double getUnitDb() const
336 	{
337 		checkClassBinding!(typeof(this))();
338 		return ptrcall!(double)(GDNativeClassBinding.getUnitDb, _godot_object);
339 	}
340 	/**
341 	
342 	*/
343 	double getUnitSize() const
344 	{
345 		checkClassBinding!(typeof(this))();
346 		return ptrcall!(double)(GDNativeClassBinding.getUnitSize, _godot_object);
347 	}
348 	/**
349 	
350 	*/
351 	bool isAutoplayEnabled()
352 	{
353 		checkClassBinding!(typeof(this))();
354 		return ptrcall!(bool)(GDNativeClassBinding.isAutoplayEnabled, _godot_object);
355 	}
356 	/**
357 	
358 	*/
359 	bool isEmissionAngleEnabled() const
360 	{
361 		checkClassBinding!(typeof(this))();
362 		return ptrcall!(bool)(GDNativeClassBinding.isEmissionAngleEnabled, _godot_object);
363 	}
364 	/**
365 	
366 	*/
367 	bool isPlaying() const
368 	{
369 		checkClassBinding!(typeof(this))();
370 		return ptrcall!(bool)(GDNativeClassBinding.isPlaying, _godot_object);
371 	}
372 	/**
373 	Plays the audio from the given position `from_position`, in seconds.
374 	*/
375 	void play(in double from_position = 0)
376 	{
377 		checkClassBinding!(typeof(this))();
378 		ptrcall!(void)(GDNativeClassBinding.play, _godot_object, from_position);
379 	}
380 	/**
381 	Sets the position from which audio will be played, in seconds.
382 	*/
383 	void seek(in double to_position)
384 	{
385 		checkClassBinding!(typeof(this))();
386 		ptrcall!(void)(GDNativeClassBinding.seek, _godot_object, to_position);
387 	}
388 	/**
389 	
390 	*/
391 	void setAreaMask(in long mask)
392 	{
393 		checkClassBinding!(typeof(this))();
394 		ptrcall!(void)(GDNativeClassBinding.setAreaMask, _godot_object, mask);
395 	}
396 	/**
397 	
398 	*/
399 	void setAttenuationFilterCutoffHz(in double degrees)
400 	{
401 		checkClassBinding!(typeof(this))();
402 		ptrcall!(void)(GDNativeClassBinding.setAttenuationFilterCutoffHz, _godot_object, degrees);
403 	}
404 	/**
405 	
406 	*/
407 	void setAttenuationFilterDb(in double db)
408 	{
409 		checkClassBinding!(typeof(this))();
410 		ptrcall!(void)(GDNativeClassBinding.setAttenuationFilterDb, _godot_object, db);
411 	}
412 	/**
413 	
414 	*/
415 	void setAttenuationModel(in long model)
416 	{
417 		checkClassBinding!(typeof(this))();
418 		ptrcall!(void)(GDNativeClassBinding.setAttenuationModel, _godot_object, model);
419 	}
420 	/**
421 	
422 	*/
423 	void setAutoplay(in bool enable)
424 	{
425 		checkClassBinding!(typeof(this))();
426 		ptrcall!(void)(GDNativeClassBinding.setAutoplay, _godot_object, enable);
427 	}
428 	/**
429 	
430 	*/
431 	void setBus(in String bus)
432 	{
433 		checkClassBinding!(typeof(this))();
434 		ptrcall!(void)(GDNativeClassBinding.setBus, _godot_object, bus);
435 	}
436 	/**
437 	
438 	*/
439 	void setDopplerTracking(in long mode)
440 	{
441 		checkClassBinding!(typeof(this))();
442 		ptrcall!(void)(GDNativeClassBinding.setDopplerTracking, _godot_object, mode);
443 	}
444 	/**
445 	
446 	*/
447 	void setEmissionAngle(in double degrees)
448 	{
449 		checkClassBinding!(typeof(this))();
450 		ptrcall!(void)(GDNativeClassBinding.setEmissionAngle, _godot_object, degrees);
451 	}
452 	/**
453 	
454 	*/
455 	void setEmissionAngleEnabled(in bool enabled)
456 	{
457 		checkClassBinding!(typeof(this))();
458 		ptrcall!(void)(GDNativeClassBinding.setEmissionAngleEnabled, _godot_object, enabled);
459 	}
460 	/**
461 	
462 	*/
463 	void setEmissionAngleFilterAttenuationDb(in double db)
464 	{
465 		checkClassBinding!(typeof(this))();
466 		ptrcall!(void)(GDNativeClassBinding.setEmissionAngleFilterAttenuationDb, _godot_object, db);
467 	}
468 	/**
469 	
470 	*/
471 	void setMaxDb(in double max_db)
472 	{
473 		checkClassBinding!(typeof(this))();
474 		ptrcall!(void)(GDNativeClassBinding.setMaxDb, _godot_object, max_db);
475 	}
476 	/**
477 	
478 	*/
479 	void setMaxDistance(in double metres)
480 	{
481 		checkClassBinding!(typeof(this))();
482 		ptrcall!(void)(GDNativeClassBinding.setMaxDistance, _godot_object, metres);
483 	}
484 	/**
485 	
486 	*/
487 	void setOutOfRangeMode(in long mode)
488 	{
489 		checkClassBinding!(typeof(this))();
490 		ptrcall!(void)(GDNativeClassBinding.setOutOfRangeMode, _godot_object, mode);
491 	}
492 	/**
493 	
494 	*/
495 	void setPitchScale(in double pitch_scale)
496 	{
497 		checkClassBinding!(typeof(this))();
498 		ptrcall!(void)(GDNativeClassBinding.setPitchScale, _godot_object, pitch_scale);
499 	}
500 	/**
501 	
502 	*/
503 	void setStream(AudioStream stream)
504 	{
505 		checkClassBinding!(typeof(this))();
506 		ptrcall!(void)(GDNativeClassBinding.setStream, _godot_object, stream);
507 	}
508 	/**
509 	
510 	*/
511 	void setStreamPaused(in bool pause)
512 	{
513 		checkClassBinding!(typeof(this))();
514 		ptrcall!(void)(GDNativeClassBinding.setStreamPaused, _godot_object, pause);
515 	}
516 	/**
517 	
518 	*/
519 	void setUnitDb(in double unit_db)
520 	{
521 		checkClassBinding!(typeof(this))();
522 		ptrcall!(void)(GDNativeClassBinding.setUnitDb, _godot_object, unit_db);
523 	}
524 	/**
525 	
526 	*/
527 	void setUnitSize(in double unit_size)
528 	{
529 		checkClassBinding!(typeof(this))();
530 		ptrcall!(void)(GDNativeClassBinding.setUnitSize, _godot_object, unit_size);
531 	}
532 	/**
533 	Stops the audio.
534 	*/
535 	void stop()
536 	{
537 		checkClassBinding!(typeof(this))();
538 		ptrcall!(void)(GDNativeClassBinding.stop, _godot_object);
539 	}
540 	/**
541 	Areas in which this sound plays.
542 	*/
543 	@property long areaMask()
544 	{
545 		return getAreaMask();
546 	}
547 	/// ditto
548 	@property void areaMask(long v)
549 	{
550 		setAreaMask(v);
551 	}
552 	/**
553 	Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to `20500` as this frequency is above the human hearing limit.
554 	*/
555 	@property double attenuationFilterCutoffHz()
556 	{
557 		return getAttenuationFilterCutoffHz();
558 	}
559 	/// ditto
560 	@property void attenuationFilterCutoffHz(double v)
561 	{
562 		setAttenuationFilterCutoffHz(v);
563 	}
564 	/**
565 	Amount how much the filter affects the loudness, in decibels.
566 	*/
567 	@property double attenuationFilterDb()
568 	{
569 		return getAttenuationFilterDb();
570 	}
571 	/// ditto
572 	@property void attenuationFilterDb(double v)
573 	{
574 		setAttenuationFilterDb(v);
575 	}
576 	/**
577 	Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation.
578 	*/
579 	@property AudioStreamPlayer3D.AttenuationModel attenuationModel()
580 	{
581 		return getAttenuationModel();
582 	}
583 	/// ditto
584 	@property void attenuationModel(long v)
585 	{
586 		setAttenuationModel(v);
587 	}
588 	/**
589 	If `true`, audio plays when the AudioStreamPlayer3D node is added to scene tree.
590 	*/
591 	@property bool autoplay()
592 	{
593 		return isAutoplayEnabled();
594 	}
595 	/// ditto
596 	@property void autoplay(bool v)
597 	{
598 		setAutoplay(v);
599 	}
600 	/**
601 	The bus on which this audio is playing.
602 	*/
603 	@property String bus()
604 	{
605 		return getBus();
606 	}
607 	/// ditto
608 	@property void bus(String v)
609 	{
610 		setBus(v);
611 	}
612 	/**
613 	Decides in which step the Doppler effect should be calculated.
614 	*/
615 	@property AudioStreamPlayer3D.DopplerTracking dopplerTracking()
616 	{
617 		return getDopplerTracking();
618 	}
619 	/// ditto
620 	@property void dopplerTracking(long v)
621 	{
622 		setDopplerTracking(v);
623 	}
624 	/**
625 	The angle in which the audio reaches cameras undampened.
626 	*/
627 	@property double emissionAngleDegrees()
628 	{
629 		return getEmissionAngle();
630 	}
631 	/// ditto
632 	@property void emissionAngleDegrees(double v)
633 	{
634 		setEmissionAngle(v);
635 	}
636 	/**
637 	If `true`, the audio should be dampened according to the direction of the sound.
638 	*/
639 	@property bool emissionAngleEnabled()
640 	{
641 		return isEmissionAngleEnabled();
642 	}
643 	/// ditto
644 	@property void emissionAngleEnabled(bool v)
645 	{
646 		setEmissionAngleEnabled(v);
647 	}
648 	/**
649 	Dampens audio if camera is outside of $(D emissionAngleDegrees) and $(D emissionAngleEnabled) is set by this factor, in decibels.
650 	*/
651 	@property double emissionAngleFilterAttenuationDb()
652 	{
653 		return getEmissionAngleFilterAttenuationDb();
654 	}
655 	/// ditto
656 	@property void emissionAngleFilterAttenuationDb(double v)
657 	{
658 		setEmissionAngleFilterAttenuationDb(v);
659 	}
660 	/**
661 	Sets the absolute maximum of the soundlevel, in decibels.
662 	*/
663 	@property double maxDb()
664 	{
665 		return getMaxDb();
666 	}
667 	/// ditto
668 	@property void maxDb(double v)
669 	{
670 		setMaxDb(v);
671 	}
672 	/**
673 	Sets the distance from which the $(D outOfRangeMode) takes effect. Has no effect if set to 0.
674 	*/
675 	@property double maxDistance()
676 	{
677 		return getMaxDistance();
678 	}
679 	/// ditto
680 	@property void maxDistance(double v)
681 	{
682 		setMaxDistance(v);
683 	}
684 	/**
685 	Decides if audio should pause when source is outside of $(D maxDistance) range.
686 	*/
687 	@property AudioStreamPlayer3D.OutOfRangeMode outOfRangeMode()
688 	{
689 		return getOutOfRangeMode();
690 	}
691 	/// ditto
692 	@property void outOfRangeMode(long v)
693 	{
694 		setOutOfRangeMode(v);
695 	}
696 	/**
697 	The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
698 	*/
699 	@property double pitchScale()
700 	{
701 		return getPitchScale();
702 	}
703 	/// ditto
704 	@property void pitchScale(double v)
705 	{
706 		setPitchScale(v);
707 	}
708 	/**
709 	If `true`, audio is playing.
710 	*/
711 	@property bool playing()
712 	{
713 		return isPlaying();
714 	}
715 	/// ditto
716 	@property void playing(bool v)
717 	{
718 		_setPlaying(v);
719 	}
720 	/**
721 	The $(D AudioStream) resource to be played.
722 	*/
723 	@property AudioStream stream()
724 	{
725 		return getStream();
726 	}
727 	/// ditto
728 	@property void stream(AudioStream v)
729 	{
730 		setStream(v);
731 	}
732 	/**
733 	If `true`, the playback is paused. You can resume it by setting $(D streamPaused) to `false`.
734 	*/
735 	@property bool streamPaused()
736 	{
737 		return getStreamPaused();
738 	}
739 	/// ditto
740 	@property void streamPaused(bool v)
741 	{
742 		setStreamPaused(v);
743 	}
744 	/**
745 	The base sound level unaffected by dampening, in decibels.
746 	*/
747 	@property double unitDb()
748 	{
749 		return getUnitDb();
750 	}
751 	/// ditto
752 	@property void unitDb(double v)
753 	{
754 		setUnitDb(v);
755 	}
756 	/**
757 	The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
758 	*/
759 	@property double unitSize()
760 	{
761 		return getUnitSize();
762 	}
763 	/// ditto
764 	@property void unitSize(double v)
765 	{
766 		setUnitSize(v);
767 	}
768 }