1 /** 2 Adds an amplifying 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.traits; 18 import godot.core; 19 import godot.c; 20 import godot.d.bind; 21 import godot.d.reference; 22 import godot.globalenums; 23 import godot.object; 24 import godot.classdb; 25 import godot.audioeffect; 26 import godot.resource; 27 /** 28 Adds an amplifying 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 package(godot) 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 GDNativeClassBinding 43 { 44 __gshared: 45 @GodotName("get_volume_db") GodotMethod!(double) getVolumeDb; 46 @GodotName("set_volume_db") GodotMethod!(void, double) setVolumeDb; 47 } 48 /// 49 pragma(inline, true) bool opEquals(in AudioEffectAmplify other) const 50 { return _godot_object.ptr is other._godot_object.ptr; } 51 /// 52 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 53 { _godot_object.ptr = n; return null; } 54 /// 55 pragma(inline, true) bool opEquals(typeof(null) n) const 56 { return _godot_object.ptr is n; } 57 /// 58 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 59 mixin baseCasts; 60 /// Construct a new instance of AudioEffectAmplify. 61 /// Note: use `memnew!AudioEffectAmplify` instead. 62 static AudioEffectAmplify _new() 63 { 64 static godot_class_constructor constructor; 65 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectAmplify"); 66 if(constructor is null) return typeof(this).init; 67 return cast(AudioEffectAmplify)(constructor()); 68 } 69 @disable new(size_t s); 70 /** 71 72 */ 73 double getVolumeDb() const 74 { 75 checkClassBinding!(typeof(this))(); 76 return ptrcall!(double)(GDNativeClassBinding.getVolumeDb, _godot_object); 77 } 78 /** 79 80 */ 81 void setVolumeDb(in double volume) 82 { 83 checkClassBinding!(typeof(this))(); 84 ptrcall!(void)(GDNativeClassBinding.setVolumeDb, _godot_object, volume); 85 } 86 /** 87 Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. 88 */ 89 @property double volumeDb() 90 { 91 return getVolumeDb(); 92 } 93 /// ditto 94 @property void volumeDb(double v) 95 { 96 setVolumeDb(v); 97 } 98 }