diff options
author | Grant Shangreaux <grant@unabridgedsoftware.com> | 2021-10-31 00:06:25 -0500 |
---|---|---|
committer | Grant Shangreaux <grant@unabridgedsoftware.com> | 2021-10-31 00:06:25 -0500 |
commit | e598f10e17b317386ae8681e664a0c250c7f2dbe (patch) | |
tree | 87f4a51f09c7f44bc437f1d1849d7bfbf49bf06a /klangfarb | |
parent | 4565611763cbb041384230580f9c7de4fea7da6f (diff) |
Clean: remove clear buffer calls,factor out check_waveform() [godot]
Diffstat (limited to 'klangfarb')
-rw-r--r-- | klangfarb/main.gd | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/klangfarb/main.gd b/klangfarb/main.gd index 8abf461..6552490 100644 --- a/klangfarb/main.gd +++ b/klangfarb/main.gd @@ -23,13 +23,14 @@ func _fill_buffer() -> void: # playback stream buffer playback.push_buffer(wave.frames(freq, to_fill)) -func _process(delta): +func _check_waveform(): if waveform == "square": wave.square() - playback.clear_buffer() else: wave.sine() - playback.clear_buffer() + +func _process(_delta): + _check_waveform() _fill_buffer() func _ready() -> void: |