Skip to content

Commit 2e2a01e

Browse files
committed
Updated test audio script to support odd MTU size
1 parent a97dfb1 commit 2e2a01e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

production/test_microphone_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async def test_microphone(b: Bluetooth):
2323
await b.send_lua("frame.microphone.start { bit_depth=16 }")
2424

2525
await b.send_lua(
26-
"while true do s=frame.microphone.read(frame.bluetooth.max_length()); if s==nil then break end if s~='' then while true do if (pcall(frame.bluetooth.send,s)) then break end end end end"
26+
"while true do s=frame.microphone.read((frame.bluetooth.max_length()//2)*2); if s==nil then break end if s~='' then while true do if (pcall(frame.bluetooth.send,s)) then break end end end end"
2727
)
2828

2929
await asyncio.sleep(5)

0 commit comments

Comments
 (0)