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

Fix #250 (Desugaring) by using constructors instead of context factory methods #662

Closed
wants to merge 3 commits into from

Conversation

joeberkovitz
Copy link
Contributor

No description provided.

@@ -1154,7 +1155,8 @@ <h2 id="BaseAudioContext">
BiquadFilterNode createBiquadFilter()
</dt>
<dd>
Creates a <a><code>BiquadFilterNode</code></a> representing a
This method is DEPRECATED in favor of using the constructor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent this.

@rtoy
Copy link
Member

rtoy commented Nov 16, 2015

If we're adding constructors, can we actually make the constructors take more arguments than just the context? Like

new BiquadFilter(context, "lowpass", <possibly more parameters like cutoff, etc.>)
new AudioBufferSource(context, buffer, <other parameters like looping, loop points, etc.>)

This requires more design work, but since we're adding something completely new, I think it makes sense to do it now (if we decide to do this) rather than later.

@hoch
Copy link
Member

hoch commented Nov 19, 2015

@rtoy I agree with the idea, so we should start a discussion thread of it. I would rather want to throw a property bag. context should be mandatory, but you can opt-in parameters that you want in the property bag.

var hpf = new BiquadFilter(context, { 
  type: 'highpass',
  frequency: 2500
});

@joeberkovitz
Copy link
Contributor Author

I actually began to do this but felt it would begin to open up a large
number of new debates. We can discuss today on the call.

@joeberkovitz joeberkovitz changed the title Fir #250 (Desugaring) by using constructors instead of context factory methods Fix #250 (Desugaring) by using constructors instead of context factory methods Nov 19, 2015
@joeberkovitz
Copy link
Contributor Author

Note this PR fixes issue #250

@domenic
Copy link
Contributor

domenic commented Nov 19, 2015

I agree with the property bag idea, with mandatory first parameter of audio context and second parameter being a dictionary allowing customization.

@joeberkovitz
Copy link
Contributor Author

Be sure to account for change to playbackCategory re #651

@joeberkovitz
Copy link
Contributor Author

This PR needs a bunch of work to incorporate the property bag concept.

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

Successfully merging this pull request may close these issues.

4 participants