ref #77 : add MT protocols to ggwave.js + new API for setting freqStart

This commit is contained in:
Georgi Gerganov
2022-09-10 17:57:37 +03:00
parent d2f79fc845
commit d02960259b
7 changed files with 46 additions and 3 deletions

View File

@@ -96,6 +96,9 @@
if (!context) {
context = new AudioContext({sampleRate: 48000});
// If you applied a shift on the transmitter side, you need to apply the same shift on the receiver side:
//ggwave.rxProtocolSetFreqStart(ggwave.ProtocolId.GGWAVE_PROTOCOL_MT_FASTEST, 24 + 48);
parameters = ggwave.getDefaultParameters();
parameters.payloadLength = kPayloadLength;
parameters.samplesPerFrame = 1024;

View File

@@ -1,4 +1,4 @@
set(TARGET ggwave-js)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/index-tmpl.html ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/index.html @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/bindings/javascript/ggwave.js ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/ggwave.js COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/index-tmpl.html ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/index.html @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/bindings/javascript/ggwave.js ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET}/ggwave.js COPYONLY)