Skip to content

Commit 3071d9f

Browse files
committed
Add AudioStreamGenerator, adjust UI and add icon
Add an AudioStreamGenerator subresource and wire it to AudioStreamPlayerWav24B (buffer_length=0.1). Tweak OptionButton nodes by setting custom_minimum_size and text_overrun_behavior to improve layout/label clipping. Remove stray blank lines in demo_scene.gd. Add a new assets/icon.png with an accompanying .import file configured to skip importing.
1 parent 28b3b6b commit 3071d9f

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

addons/direct_audio_and_wav_24bits/demo/demo_scene.gd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ func _generate_uuid() -> String:
176176
hex.substr(20, 12)
177177
]
178178

179-
180179
func _on_input_devices_option_item_selected(index: int) -> void:
181180
var s = input_devices_option.get_item_text(index)
182181
AudioServer.input_device = s
@@ -185,4 +184,3 @@ func _on_input_devices_option_item_selected(index: int) -> void:
185184
func _on_output_devices_option_item_selected(index: int) -> void:
186185
var e = output_devices_option.get_item_text(index)
187186
AudioServer.output_device = e
188-

addons/direct_audio_and_wav_24bits/demo/demo_scene.tscn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
[ext_resource type="Script" uid="uid://dkex2g6fut6kl" path="res://addons/direct_audio_and_wav_24bits/scripts/direct_audio_input_recorder.gd" id="2_nhffr"]
55
[ext_resource type="Script" uid="uid://bqo5emomonmoe" path="res://addons/direct_audio_and_wav_24bits/scripts/audio_stream_player_wav_24b.gd" id="2_y6by5"]
66

7+
[sub_resource type="AudioStreamGenerator" id="AudioStreamGenerator_nhffr"]
8+
buffer_length = 0.1
9+
710
[node name="DirectAudioInputRecorderTest" type="Control" unique_id=2008739099]
811
layout_mode = 3
912
anchors_preset = 15
@@ -14,6 +17,7 @@ grow_vertical = 2
1417
script = ExtResource("1_tir0v")
1518

1619
[node name="AudioStreamPlayerWav24B" type="AudioStreamPlayer" parent="." unique_id=1857188637]
20+
stream = SubResource("AudioStreamGenerator_nhffr")
1721
script = ExtResource("2_y6by5")
1822
metadata/_custom_type_script = "uid://bqo5emomonmoe"
1923

@@ -179,8 +183,10 @@ text = "Input:"
179183

180184
[node name="InputDevicesOption" type="OptionButton" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer3/HBoxContainer" unique_id=385757452]
181185
unique_name_in_owner = true
186+
custom_minimum_size = Vector2(100, 0)
182187
layout_mode = 2
183188
size_flags_horizontal = 3
189+
text_overrun_behavior = 4
184190

185191
[node name="HBoxContainer2" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer3" unique_id=1647116863]
186192
layout_mode = 2
@@ -192,8 +198,10 @@ text = "Output:"
192198

193199
[node name="OutputDevicesOption" type="OptionButton" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer3/HBoxContainer2" unique_id=1256804944]
194200
unique_name_in_owner = true
201+
custom_minimum_size = Vector2(100, 0)
195202
layout_mode = 2
196203
size_flags_horizontal = 3
204+
text_overrun_behavior = 4
197205

198206
[connection signal="finished" from="AudioStreamPlayerWav24B" to="." method="_on_player_24bit_finished"]
199207
[connection signal="on_recording_end" from="DirectAudioInputRecorder" to="." method="_on_recorder_on_recording_end"]

assets/icon.png

2.4 KB
Loading

assets/icon.png.import

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[remap]
2+
3+
importer="skip"

0 commit comments

Comments
 (0)