Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioBuffer buffer can be null for AudioBufferSourceOptions and ConvolverOptions #980

Closed
rtoy opened this issue Sep 19, 2016 · 6 comments
Closed

Comments

@rtoy
Copy link
Member

rtoy commented Sep 19, 2016

For both AudioBufferSourceOptions and ConvolverOptions, the dictionary contains the member

  AudioBuffer buffer

It is valid for the buffer to be null, so we should write

  AudioBuffer? buffer
@padenot
Copy link
Member

padenot commented Sep 19, 2016

Yes, I thought we had another issue about if we want it to be nullable, and what happens when you null it. I don't remember whether we decided.

@foolip
Copy link
Contributor

foolip commented Sep 19, 2016

Even though the spec as it is can be implemented, it does seem unhelpful to throw TypeError for new AudioBufferSourceNode(context, { buffer: null }).

@rtoy
Copy link
Member Author

rtoy commented Sep 19, 2016

@padenot I believe it was for .buffer setter.

@padenot
Copy link
Member

padenot commented Sep 19, 2016

Right, I remembered right after clicking the "Comment" button.

@rtoy
Copy link
Member Author

rtoy commented Sep 19, 2016

OscillatorOptions.periodicWave has the same issue; it can be null.

@rtoy
Copy link
Member Author

rtoy commented Sep 19, 2016

WaveShaperOptions.curve can be null.

One of PeriodicWaveOptions.real or PeriodicWaveOptions.imag can be null.

padenot added a commit that referenced this issue Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants