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.audiostreamgeneratorplayback;
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.audiostreamplaybackresampled;
24 /**
25 
26 */
27 @GodotBaseClass struct AudioStreamGeneratorPlayback
28 {
29 	package(godot) enum string _GODOT_internal_name = "AudioStreamGeneratorPlayback";
30 public:
31 @nogc nothrow:
32 	union { /** */ godot_object _godot_object; /** */ AudioStreamPlaybackResampled _GODOT_base; }
33 	alias _GODOT_base this;
34 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
35 	package(godot) __gshared bool _classBindingInitialized = false;
36 	package(godot) static struct GDNativeClassBinding
37 	{
38 		__gshared:
39 		@GodotName("can_push_buffer") GodotMethod!(bool, long) canPushBuffer;
40 		@GodotName("clear_buffer") GodotMethod!(void) clearBuffer;
41 		@GodotName("get_frames_available") GodotMethod!(long) getFramesAvailable;
42 		@GodotName("get_skips") GodotMethod!(long) getSkips;
43 		@GodotName("push_buffer") GodotMethod!(bool, PoolVector2Array) pushBuffer;
44 		@GodotName("push_frame") GodotMethod!(bool, Vector2) pushFrame;
45 	}
46 	/// 
47 	pragma(inline, true) bool opEquals(in AudioStreamGeneratorPlayback other) const
48 	{ return _godot_object.ptr is other._godot_object.ptr; }
49 	/// 
50 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
51 	{ _godot_object.ptr = n; return null; }
52 	/// 
53 	pragma(inline, true) bool opEquals(typeof(null) n) const
54 	{ return _godot_object.ptr is n; }
55 	/// 
56 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
57 	mixin baseCasts;
58 	/// Construct a new instance of AudioStreamGeneratorPlayback.
59 	/// Note: use `memnew!AudioStreamGeneratorPlayback` instead.
60 	static AudioStreamGeneratorPlayback _new()
61 	{
62 		static godot_class_constructor constructor;
63 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AudioStreamGeneratorPlayback");
64 		if(constructor is null) return typeof(this).init;
65 		return cast(AudioStreamGeneratorPlayback)(constructor());
66 	}
67 	@disable new(size_t s);
68 	/**
69 	
70 	*/
71 	bool canPushBuffer(in long amount) const
72 	{
73 		checkClassBinding!(typeof(this))();
74 		return ptrcall!(bool)(GDNativeClassBinding.canPushBuffer, _godot_object, amount);
75 	}
76 	/**
77 	
78 	*/
79 	void clearBuffer()
80 	{
81 		checkClassBinding!(typeof(this))();
82 		ptrcall!(void)(GDNativeClassBinding.clearBuffer, _godot_object);
83 	}
84 	/**
85 	
86 	*/
87 	long getFramesAvailable() const
88 	{
89 		checkClassBinding!(typeof(this))();
90 		return ptrcall!(long)(GDNativeClassBinding.getFramesAvailable, _godot_object);
91 	}
92 	/**
93 	
94 	*/
95 	long getSkips() const
96 	{
97 		checkClassBinding!(typeof(this))();
98 		return ptrcall!(long)(GDNativeClassBinding.getSkips, _godot_object);
99 	}
100 	/**
101 	
102 	*/
103 	bool pushBuffer(in PoolVector2Array frames)
104 	{
105 		checkClassBinding!(typeof(this))();
106 		return ptrcall!(bool)(GDNativeClassBinding.pushBuffer, _godot_object, frames);
107 	}
108 	/**
109 	
110 	*/
111 	bool pushFrame(in Vector2 frame)
112 	{
113 		checkClassBinding!(typeof(this))();
114 		return ptrcall!(bool)(GDNativeClassBinding.pushFrame, _godot_object, frame);
115 	}
116 }