1 /** 2 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.audioeffectspectrumanalyzer; 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.audioeffect; 25 import godot.resource; 26 /** 27 28 */ 29 @GodotBaseClass struct AudioEffectSpectrumAnalyzer 30 { 31 package(godot) enum string _GODOT_internal_name = "AudioEffectSpectrumAnalyzer"; 32 public: 33 @nogc nothrow: 34 union { /** */ godot_object _godot_object; /** */ AudioEffect _GODOT_base; } 35 alias _GODOT_base this; 36 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 37 package(godot) __gshared bool _classBindingInitialized = false; 38 package(godot) static struct GDNativeClassBinding 39 { 40 __gshared: 41 @GodotName("get_buffer_length") GodotMethod!(double) getBufferLength; 42 @GodotName("get_fft_size") GodotMethod!(AudioEffectSpectrumAnalyzer.FFT_Size) getFftSize; 43 @GodotName("get_tap_back_pos") GodotMethod!(double) getTapBackPos; 44 @GodotName("set_buffer_length") GodotMethod!(void, double) setBufferLength; 45 @GodotName("set_fft_size") GodotMethod!(void, long) setFftSize; 46 @GodotName("set_tap_back_pos") GodotMethod!(void, double) setTapBackPos; 47 } 48 /// 49 pragma(inline, true) bool opEquals(in AudioEffectSpectrumAnalyzer 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 AudioEffectSpectrumAnalyzer. 61 /// Note: use `memnew!AudioEffectSpectrumAnalyzer` instead. 62 static AudioEffectSpectrumAnalyzer _new() 63 { 64 static godot_class_constructor constructor; 65 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioEffectSpectrumAnalyzer"); 66 if(constructor is null) return typeof(this).init; 67 return cast(AudioEffectSpectrumAnalyzer)(constructor()); 68 } 69 @disable new(size_t s); 70 /// 71 enum FFT_Size : int 72 { 73 /** 74 75 */ 76 fftSize256 = 0, 77 /** 78 79 */ 80 fftSize512 = 1, 81 /** 82 83 */ 84 fftSize1024 = 2, 85 /** 86 87 */ 88 fftSize2048 = 3, 89 /** 90 91 */ 92 fftSize4096 = 4, 93 /** 94 Represents the size of the $(D fftSize) enum. 95 */ 96 fftSizeMax = 5, 97 } 98 /// 99 enum Constants : int 100 { 101 fftSize256 = 0, 102 fftSize512 = 1, 103 fftSize1024 = 2, 104 fftSize2048 = 3, 105 fftSize4096 = 4, 106 fftSizeMax = 5, 107 } 108 /** 109 110 */ 111 double getBufferLength() const 112 { 113 checkClassBinding!(typeof(this))(); 114 return ptrcall!(double)(GDNativeClassBinding.getBufferLength, _godot_object); 115 } 116 /** 117 118 */ 119 AudioEffectSpectrumAnalyzer.FFT_Size getFftSize() const 120 { 121 checkClassBinding!(typeof(this))(); 122 return ptrcall!(AudioEffectSpectrumAnalyzer.FFT_Size)(GDNativeClassBinding.getFftSize, _godot_object); 123 } 124 /** 125 126 */ 127 double getTapBackPos() const 128 { 129 checkClassBinding!(typeof(this))(); 130 return ptrcall!(double)(GDNativeClassBinding.getTapBackPos, _godot_object); 131 } 132 /** 133 134 */ 135 void setBufferLength(in double seconds) 136 { 137 checkClassBinding!(typeof(this))(); 138 ptrcall!(void)(GDNativeClassBinding.setBufferLength, _godot_object, seconds); 139 } 140 /** 141 142 */ 143 void setFftSize(in long size) 144 { 145 checkClassBinding!(typeof(this))(); 146 ptrcall!(void)(GDNativeClassBinding.setFftSize, _godot_object, size); 147 } 148 /** 149 150 */ 151 void setTapBackPos(in double seconds) 152 { 153 checkClassBinding!(typeof(this))(); 154 ptrcall!(void)(GDNativeClassBinding.setTapBackPos, _godot_object, seconds); 155 } 156 /** 157 158 */ 159 @property double bufferLength() 160 { 161 return getBufferLength(); 162 } 163 /// ditto 164 @property void bufferLength(double v) 165 { 166 setBufferLength(v); 167 } 168 /** 169 170 */ 171 @property AudioEffectSpectrumAnalyzer.FFT_Size fftSize() 172 { 173 return getFftSize(); 174 } 175 /// ditto 176 @property void fftSize(long v) 177 { 178 setFftSize(v); 179 } 180 /** 181 182 */ 183 @property double tapBackPos() 184 { 185 return getTapBackPos(); 186 } 187 /// ditto 188 @property void tapBackPos(double v) 189 { 190 setTapBackPos(v); 191 } 192 }