|
@@ -59,29 +59,31 @@ func _on_SaveButton_pressed():
|
|
|
|
|
|
|
|
|
|
func _on_MixRateOptionButton_item_selected(index: int) -> void:
|
|
func _on_MixRateOptionButton_item_selected(index: int) -> void:
|
|
- if index == 0:
|
|
|
|
- mix_rate = 11025
|
|
|
|
- elif index == 1:
|
|
|
|
- mix_rate = 16000
|
|
|
|
- elif index == 2:
|
|
|
|
- mix_rate = 22050
|
|
|
|
- elif index == 3:
|
|
|
|
- mix_rate = 32000
|
|
|
|
- elif index == 4:
|
|
|
|
- mix_rate = 44100
|
|
|
|
- elif index == 5:
|
|
|
|
- mix_rate = 48000
|
|
|
|
|
|
+ match index:
|
|
|
|
+ 0:
|
|
|
|
+ mix_rate = 11025
|
|
|
|
+ 1:
|
|
|
|
+ mix_rate = 16000
|
|
|
|
+ 2:
|
|
|
|
+ mix_rate = 22050
|
|
|
|
+ 3:
|
|
|
|
+ mix_rate = 32000
|
|
|
|
+ 4:
|
|
|
|
+ mix_rate = 44100
|
|
|
|
+ 5:
|
|
|
|
+ mix_rate = 48000
|
|
if recording != null:
|
|
if recording != null:
|
|
recording.set_mix_rate(mix_rate)
|
|
recording.set_mix_rate(mix_rate)
|
|
|
|
|
|
|
|
|
|
func _on_FormatOptionButton_item_selected(index: int) -> void:
|
|
func _on_FormatOptionButton_item_selected(index: int) -> void:
|
|
- if index == 0:
|
|
|
|
- format = AudioStreamWAV.FORMAT_8_BITS
|
|
|
|
- elif index == 1:
|
|
|
|
- format = AudioStreamWAV.FORMAT_16_BITS
|
|
|
|
- elif index == 2:
|
|
|
|
- format = AudioStreamWAV.FORMAT_IMA_ADPCM
|
|
|
|
|
|
+ match index:
|
|
|
|
+ 0:
|
|
|
|
+ format = AudioStreamWAV.FORMAT_8_BITS
|
|
|
|
+ 1:
|
|
|
|
+ format = AudioStreamWAV.FORMAT_16_BITS
|
|
|
|
+ 2:
|
|
|
|
+ format = AudioStreamWAV.FORMAT_IMA_ADPCM
|
|
if recording != null:
|
|
if recording != null:
|
|
recording.set_format(format)
|
|
recording.set_format(format)
|
|
|
|
|