mirror of
https://github.com/ggerganov/wave-share.git
synced 2026-04-19 04:56:05 +08:00
Adding support for variable data length
The length of the data is encoded in the first 3 bytes of the transmission: - Byte 0: data length - Byte 1: ECC - Byte 2: ECC For this type of transmission it is necessary to add an "end-of-message" marker at the end of the Tx. This marker is used by the receiver to understand when the transmission is over. At this point the receiver starts analyzing the recorded data. First, the data length is decoded. After, this length is used to try to decode the remaining data. The number ECC bytes used for the payload is calculated as 2*(N/5), where N is the length of the payload.
This commit is contained in:
@@ -7,5 +7,6 @@ em++ -Wall -Wextra -O3 -std=c++11 -s USE_SDL=2 -s WASM=1 ./main.cpp -o wave.js -
|
||||
"_getFramesLeftToRecord", "_getFramesToRecord",
|
||||
"_getFramesLeftToAnalyze", "_getFramesToAnalyze",
|
||||
"_hasDeviceOutput", "_hasDeviceCapture", "_doInit",
|
||||
"_setTxMode",
|
||||
"_main"]' \
|
||||
-s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "writeArrayToMemory"]'
|
||||
|
||||
Reference in New Issue
Block a user