Skip to content

Commit b671074

Browse files
fix missing underscores
1 parent 5405b64 commit b671074

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

audio/mic_feed/MicRecord.gd

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func _ready() -> void:
3232
print("Project mix rate: ", ProjectSettings.get(&"audio/driver/mix_rate"))
3333

3434
if Engine.has_singleton("MicrophoneServer"):
35-
microphonefeed = Engine.get_singleton("MicrophoneServer").get_feed(0)
36-
if not microphonefeed:
35+
microphone_feed = Engine.get_singleton("MicrophoneServer").get_feed(0)
36+
if not microphone_feed:
3737
$Status.text = "**** Error: requires PR#108773 to work"
3838
print($Status.text)
3939
set_process(false)
@@ -51,14 +51,14 @@ func _ready() -> void:
5151

5252
func _on_option_input_item_selected(index: int) -> void:
5353
var input_device: String = $OptionInput.get_item_text(index)
54-
print("Set input device: ", inputdevice)
55-
AudioServer.set_input_device(inputdevice)
54+
print("Set input device: ", input_device)
55+
AudioServer.set_input_device(input_device)
5656

5757

5858
func _on_option_output_item_selected(index: int) -> void:
5959
var output_device: String = $OptionOutput.get_item_text(index)
60-
print("Set output device: ", outputdevice)
61-
AudioServer.set_output_device(outputdevice)
60+
print("Set output device: ", output_device)
61+
AudioServer.set_output_device(output_device)
6262

6363

6464
func _on_microphone_on_toggled(toggled_on: bool) -> void:
@@ -73,14 +73,14 @@ func _on_microphone_on_toggled(toggled_on: bool) -> void:
7373
assert(permission == "android.permission.RECORD_AUDIO")
7474
print("Audio permission granted ", granted)
7575

76-
if not microphonefeed.is_active():
77-
microphonefeed.set_active(true)
76+
if not microphone_feed.is_active():
77+
microphone_feed.set_active(true)
7878
total_samples = 0
7979
sample_duration = 0.0
80-
print("Input buffer length frames: ", microphonefeed.get_buffer_length_frames())
80+
print("Input buffer length frames: ", microphone_feed.get_buffer_length_frames())
8181
print("Input buffer length seconds: ", microphone_feed.get_buffer_length_frames() * 1.0 / input_mix_rate)
8282
else:
83-
microphonefeed.set_active(false)
83+
microphone_feed.set_active(false)
8484

8585

8686
func _on_mic_to_generator_toggled(toggled_on: bool) -> void:
@@ -91,8 +91,8 @@ func _on_mic_to_generator_toggled(toggled_on: bool) -> void:
9191

9292
func _process(delta: float) -> void:
9393
sample_duration += delta
94-
while microphonefeed.get_frames_available() >= audio_sample_size:
95-
var audio_samples: PackedVector2Array = microphonefeed.get_frames(audio_sample_size)
94+
while microphone_feed.get_frames_available() >= audio_sample_size:
95+
var audio_samples: PackedVector2Array = microphone_feed.get_frames(audio_sample_size)
9696
if audio_samples:
9797
audio_sample_image.set_data(audio_sample_size, 1, false, Image.FORMAT_RGF, audio_samples.to_byte_array())
9898
audio_sample_texture.update(audio_sample_image)

0 commit comments

Comments
 (0)