1 /**
2 Adds a Panner audio effect to an Audio bus. Pans sound left or right.
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.audioeffectpanner;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.meta;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.object;
22 import godot.classdb;
23 import godot.audioeffect;
24 import godot.resource;
25 import godot.reference;
26 /**
27 Adds a Panner audio effect to an Audio bus. Pans sound left or right.
28 
29 Determines how much of an audio signal is sent to the left and right buses.
30 */
31 @GodotBaseClass struct AudioEffectPanner
32 {
33 	enum string _GODOT_internal_name = "AudioEffectPanner";
34 public:
35 @nogc nothrow:
36 	union { godot_object _godot_object; AudioEffect _GODOT_base; }
37 	alias _GODOT_base this;
38 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
39 	package(godot) __gshared bool _classBindingInitialized = false;
40 	package(godot) static struct _classBinding
41 	{
42 		__gshared:
43 		@GodotName("set_pan") GodotMethod!(void, double) setPan;
44 		@GodotName("get_pan") GodotMethod!(double) getPan;
45 	}
46 	bool opEquals(in AudioEffectPanner other) const { return _godot_object.ptr is other._godot_object.ptr; }
47 	AudioEffectPanner opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
48 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
49 	mixin baseCasts;
50 	static AudioEffectPanner _new()
51 	{
52 		static godot_class_constructor constructor;
53 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectPanner");
54 		if(constructor is null) return typeof(this).init;
55 		return cast(AudioEffectPanner)(constructor());
56 	}
57 	@disable new(size_t s);
58 	/**
59 	
60 	*/
61 	void setPan(in double cpanume)
62 	{
63 		checkClassBinding!(typeof(this))();
64 		ptrcall!(void)(_classBinding.setPan, _godot_object, cpanume);
65 	}
66 	/**
67 	
68 	*/
69 	double getPan() const
70 	{
71 		checkClassBinding!(typeof(this))();
72 		return ptrcall!(double)(_classBinding.getPan, _godot_object);
73 	}
74 	/**
75 	Pan position. Value can range from -1 (fully left) to 1 (fully right).
76 	*/
77 	@property double pan()
78 	{
79 		return getPan();
80 	}
81 	/// ditto
82 	@property void pan(double v)
83 	{
84 		setPan(v);
85 	}
86 }