hcarter333 / pico-w-mem-keyer

Uses the PicoW as a ham radio memory keyer
Apache License 2.0
0 stars 1 forks source link

Audio delays in JavaScript #26

Closed hcarter333 closed 2 months ago

hcarter333 commented 2 months ago

The straight key needs smoother sidetone performance.

Try implementing portions of the example at https://alexanderell.is/posts/morse-code/morse-code.js

hcarter333 commented 2 months ago

Having the usual issues with getting audio initialized the first time. A user has to interact with the canvas first. I wonder if there's a way to turn that off?

hcarter333 commented 2 months ago

To allow auto-initialization use:

--disable-web-security --autoplay-policy=no-user-gesture-required

hcarter333 commented 2 months ago

Still big problems with delay when audio is not muted on the Chromebook.

Checking on audio playback code. Need to find it.

hcarter333 commented 2 months ago

This isn't going to get better. There's an audio delay between keydown and sound out of the speaker on the Chromebook even using the WebAudioAPI. It is working better with respect to sending the correct information to the keyer when the mute button is on, (see the next issue for more details.)

Here's a video demonstrating the issue: https://youtube.com/shorts/cHcGVioMM9I

hcarter333 commented 2 months ago

This is closed.

hcarter333 commented 2 months ago

This did in fact get better. The built-in Chrome browser does not have the sidetone delay.