1 /**
2 Adds a Amplify audio effect to an Audio bus.
3 Increases or decreases the volume of the selected audio bus.
4 
5 Copyright:
6 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
7 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
8 Copyright (c) 2017-2018 Godot-D contributors  
9 
10 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
11 
12 
13 */
14 module godot.audioeffectamplify;
15 import std.meta : AliasSeq, staticIndexOf;
16 import std.traits : Unqual;
17 import godot.d.meta;
18 import godot.core;
19 import godot.c;
20 import godot.d.bind;
21 import godot.d.reference;
22 import godot.object;
23 import godot.classdb;
24 import godot.audioeffect;
25 import godot.resource;
26 import godot.reference;
27 /**
28 Adds a Amplify audio effect to an Audio bus.
29 Increases or decreases the volume of the selected audio bus.
30 
31 Increases or decreases the volume being routed through the audio bus.
32 */
33 @GodotBaseClass struct AudioEffectAmplify
34 {
35 	enum string _GODOT_internal_name = "AudioEffectAmplify";
36 public:
37 @nogc nothrow:
38 	union { godot_object _godot_object; AudioEffect _GODOT_base; }
39 	alias _GODOT_base this;
40 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
41 	package(godot) __gshared bool _classBindingInitialized = false;
42 	package(godot) static struct _classBinding
43 	{
44 		__gshared:
45 		@GodotName("set_volume_db") GodotMethod!(void, double) setVolumeDb;
46 		@GodotName("get_volume_db") GodotMethod!(double) getVolumeDb;
47 	}
48 	bool opEquals(in AudioEffectAmplify other) const { return _godot_object.ptr is other._godot_object.ptr; }
49 	AudioEffectAmplify opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; }
50 	bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; }
51 	mixin baseCasts;
52 	static AudioEffectAmplify _new()
53 	{
54 		static godot_class_constructor constructor;
55 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectAmplify");
56 		if(constructor is null) return typeof(this).init;
57 		return cast(AudioEffectAmplify)(constructor());
58 	}
59 	@disable new(size_t s);
60 	/**
61 	
62 	*/
63 	void setVolumeDb(in double volume)
64 	{
65 		checkClassBinding!(typeof(this))();
66 		ptrcall!(void)(_classBinding.setVolumeDb, _godot_object, volume);
67 	}
68 	/**
69 	
70 	*/
71 	double getVolumeDb() const
72 	{
73 		checkClassBinding!(typeof(this))();
74 		return ptrcall!(double)(_classBinding.getVolumeDb, _godot_object);
75 	}
76 	/**
77 	Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: `0`.
78 	*/
79 	@property double volumeDb()
80 	{
81 		return getVolumeDb();
82 	}
83 	/// ditto
84 	@property void volumeDb(double v)
85 	{
86 		setVolumeDb(v);
87 	}
88 }