diff --git a/index.html b/index.html index 1e1b75a..6592a9a 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@

Data Over Audio

+ Bit Duration: ms

Sent

diff --git a/index.js b/index.js index 6207118..17f8788 100644 --- a/index.js +++ b/index.js @@ -34,6 +34,11 @@ function handleWindowLoad() { textToSend = document.getElementById('text-to-send'); sentDataTextArea = document.getElementById('sent-data'); samplesPerBitLabel = document.getElementById('samples-per-bit'); + document.getElementById('bit-duration-text').addEventListener('input', (event) => { + FREQUENCY_DURATION = parseInt(event.target.value); + bitSampleCount = 0; + samplesPerBit.length = 0; + }) // wire up events sendButton.addEventListener('click', handleSendButtonClick);