Skip to content

Commit

Permalink
don't call drop_chunk function on audioopuschunkedeffect if it doesn'…
Browse files Browse the repository at this point in the history
…t exist
  • Loading branch information
goatchurchprime committed Aug 15, 2024
1 parent 4c1f92d commit 100f077
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions example/radiomqtt/radiomqtt.gd
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ func starttalking():
$MQTTnetwork.transportaudiopacket(JSON.stringify(recordedheader).to_ascii_buffer())
talkingstarttime = Time.get_ticks_msec()

var leadtimems = $HBoxBigButtons/VBoxVox/Leadtime.value*1000 - frametimems
while leadtimems > 0 and audioopuschunkedeffect.undrop_chunk():
leadtimems -= frametimems
if audioopuschunkedeffect != null:
var leadtimems = $HBoxBigButtons/VBoxVox/Leadtime.value*1000 - frametimems
while leadtimems > 0 and audioopuschunkedeffect.undrop_chunk():
leadtimems -= frametimems


func _on_mic_working_toggled(toggled_on):
Expand Down

0 comments on commit 100f077

Please sign in to comment.