Elektrine lite

← Feed

@adelfaure@mastodon.art

Post #1797965

2026-04-27 15:20 UTC

I found out a weird thing about Web Audio API AudioWorklet. It runs a `process` function over time in order to handle chunks of audio buffer data. This function have to end with `return true` or `return false`, if you want the process to go on or not. In my experiments it was working perfectly fine on Firefox but not on Chromium, running only once before stopping with no errors or anything. (1/2)

Replies (1)

  • @adelfaure@mastodon.art 2026-04-27 15:21

    I spend an evening trying to understand what was going on without finding a clue on internet. What was very strange is that the examples I found worked very well. So the issue was from my side 100%. The issue was of course very silly. I got the habit to write `return 1` instead of `return true` at the end of my process function, which works fine on Firefox but not on Chrome. But why ? `true == 1` is valid on both browsers. (2/2)

    Open ##3579498