New issue
Advanced search Search tips

Issue 822709 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 485728
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

AudioWorklet with no outputs never runs callback.

Reported by mossblaser@gmail.com, Mar 16 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.26 Safari/537.36

Steps to reproduce the problem:
0. Start chrome with --enable-blink-features=Worklet,AudioWorklet

1. Create some kind of audio source

2. Create an AudioWorkletNode with numberOfOutputs set to 0

3. Connect some source (e.g. oscillator) to the worklet node's input.

What is the expected behavior?
The 'process' callback in the AudioWorkletProcessor should be called.

What went wrong?
The 'process' callback is never called.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 66.0.3359.26  Channel: dev
OS Version: Ubuntu 16.04
Flash Version: 

Adding an unused output to the worklet does not solve the problem.

Connecting the audio source to context.destination (as well as the worklet's input) verifies that the source is producing audio but the worklet continues not to receive callbacks.

Adding an output to the worklet and connecting this to context.destination makes the worklet work, i.e. the 'process' callback is called with audio data as expected.

This behaviour appears to be contrary of the Web Audio spec which in Section 1.33.4.3 (Defining A Valid AudioWorkletProcessor) states:

> The process() method is called synchronously by the
> audio rendering thread at every render quantum, if 
> ANY of the following active processing conditions 
> are true:
>
>   1. The associated AudioWorkletProcessor's active
>      source flag is equal to true.
>   2. There are one or more connected inputs to the
>      AudioWorkletNode.

https://webaudio.github.io/web-audio-api/#defining-a-valid-audioworkletprocessor
 
audioworklet.zip
1.6 KB Download

Comment 1 by rtoy@chromium.org, Mar 16 2018

Status: Available (was: Unconfirmed)
This isn't unique to AudioWorklets.  In chrome's implementation, if a node isn't connected directly or indirectly to the destination, the node isn't run. (See issue 485728)
Labels: -Pri-2 OS-Mac OS-Windows Pri-3
Mergedinto: 485728
Status: Duplicate (was: Available)

Sign in to add a comment