Skip to content

Remove options parameter of AudioWorkletProcessor constructor #2036

Closed

Description

@karlt

#1965 (comment) says

step 2 says that the AudioWorkletProcessor is initialized using options. At the moment this is a no-op, as the following note says. That's fine, but in that case why have this step listed at all?

This is not relevant anymore.

though nothing actually forces them to, since the argument is optional, right? And at the moment the superclass (and indeed UA code in general) does nothing with the object, as far as I can tell.

This is also changed. Now the construction relies on "processor construction data", so the user code does not need to use "super(options)" to initialize the internals correctly.

Activity

  1. hoch commented on Aug 21, 2019

    @hoch
    Member

    @karlt The quote indentation seems incorrect. Can you clarify what the issue is here?

  2. hoch commented on Aug 21, 2019

    @hoch
    Member

    User still can pass options to deliver user-defined data to the AWP subclass. The only difference here is the user code doesn't have to call super(options).

  3. hoch commented on Aug 21, 2019

    @hoch
    Member

    Also there is more work to do on "processor construction data", so I will fix the rest of the spec (text, code example) when we have a clear picture on how to use it.

  4. self-assigned this
    on Aug 21, 2019
  5. karlt commented on Aug 21, 2019

    @karlt
    ContributorAuthor

    @karlt The quote indentation seems incorrect. Can you clarify what the issue is here?

    The issue is that the AudioWorkletProcessor constructor has an unused options parameter, which is confusing, as reported in #1965.

    The quoted text seems to agree that it is unused.

    User still can pass options to deliver user-defined data to the AWP subclass. The only difference here is the user code doesn't have to call super(options).

    The subclass constructor parameters are declared at https://webaudio.github.io/web-audio-api/#callbackdef-audioworkletprocessorconstructor and unrelated to the base class constructor. This issue is about the AudioWorkletProcessor (base) class constructor described at https://webaudio.github.io/web-audio-api/#ref-for-dom-audioworkletprocessor-audioworkletprocessor%E2%91%A0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions