mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-03-30 17:16:48 +08:00
js, examples : fix a few minor issues caused by the recent API changes
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
// generate audio waveform
|
||||
var waveform = ggwave.encode(instance, payload, ggwave.TxProtocolId.GGWAVE_PROTOCOL_MT_FASTEST, 25)
|
||||
var waveform = ggwave.encode(instance, payload, ggwave.ProtocolId.GGWAVE_PROTOCOL_MT_FASTEST, 25)
|
||||
|
||||
// play audio
|
||||
var buf = convertTypedArray(waveform, Float32Array);
|
||||
|
||||
@@ -113,9 +113,9 @@
|
||||
// generate audio waveform
|
||||
var waveform = null;
|
||||
if (document.getElementById("checkbox-fp").checked) {
|
||||
waveform = ggwave_FluentPet.encode(instance, payload, ggwave_FluentPet.TxProtocolId.GGWAVE_PROTOCOL_DT_FAST, 25)
|
||||
waveform = ggwave_FluentPet.encode(instance, payload, ggwave_FluentPet.ProtocolId.GGWAVE_PROTOCOL_DT_FAST, 25)
|
||||
} else {
|
||||
waveform = ggwave.encode(instance, payload, ggwave.TxProtocolId.GGWAVE_PROTOCOL_DT_FAST, 25)
|
||||
waveform = ggwave.encode(instance, payload, ggwave.ProtocolId.GGWAVE_PROTOCOL_DT_FAST, 25)
|
||||
}
|
||||
|
||||
// play audio
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
captureStop.click();
|
||||
|
||||
// generate audio waveform
|
||||
var waveform = ggwave.encode(instance, txData.value, ggwave.TxProtocolId.GGWAVE_TX_PROTOCOL_AUDIBLE_FAST, 10)
|
||||
var waveform = ggwave.encode(instance, txData.value, ggwave.ProtocolId.GGWAVE_PROTOCOL_AUDIBLE_FAST, 10)
|
||||
|
||||
// play audio
|
||||
var buf = convertTypedArray(waveform, Float32Array);
|
||||
|
||||
Reference in New Issue
Block a user