Files
godot-demo-projects/audio/mic_record/MicRecord.tscn
2022-03-26 20:48:33 -05:00

82 lines
2.1 KiB
Plaintext

[gd_scene load_steps=4 format=3 uid="uid://dvjlkpjvjxn0h"]
[ext_resource type="Script" path="res://MicRecord.gd" id="1"]
[ext_resource type="AudioStream" uid="uid://c2re52petqrvx" path="res://Intro.ogg" id="2"]
[sub_resource type="AudioStreamMicrophone" id="1"]
[node name="MicRecord" type="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -320.0
offset_top = -240.0
offset_right = 320.0
offset_bottom = 240.0
script = ExtResource( "1" )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AudioStreamRecord" type="AudioStreamPlayer" parent="."]
stream = SubResource( "1" )
autoplay = true
bus = &"Record"
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
autoplay = true
[node name="AudioStreamPlayer2" type="AudioStreamPlayer" parent="."]
stream = ExtResource( "2" )
volume_db = -6.0
[node name="RecordButton" type="Button" parent="."]
offset_left = 120.0
offset_top = 100.0
offset_right = 240.0
offset_bottom = 140.0
text = "Record"
[node name="SaveButton" type="Button" parent="."]
offset_left = 120.0
offset_top = 180.0
offset_right = 240.0
offset_bottom = 220.0
disabled = true
text = "Save WAV To:"
[node name="Filename" type="LineEdit" parent="SaveButton"]
offset_left = 180.0
offset_right = 340.0
offset_bottom = 40.0
text = "user://record.wav"
caret_blink = true
caret_blink_speed = 0.5
[node name="PlayButton" type="Button" parent="."]
offset_left = 300.0
offset_top = 100.0
offset_right = 420.0
offset_bottom = 140.0
disabled = true
text = "Play"
[node name="PlayMusic" type="Button" parent="."]
offset_left = 120.0
offset_top = 260.0
offset_right = 240.0
offset_bottom = 300.0
text = "Play Music"
[node name="Status" type="Label" parent="."]
offset_left = 120.0
offset_top = 340.0
offset_right = 520.0
offset_bottom = 340.0
[connection signal="pressed" from="RecordButton" to="." method="_on_RecordButton_pressed"]
[connection signal="pressed" from="SaveButton" to="." method="_on_SaveButton_pressed"]
[connection signal="pressed" from="PlayButton" to="." method="_on_PlayButton_pressed"]
[connection signal="pressed" from="PlayMusic" to="." method="_on_Play_Music_pressed"]