Skip to content

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

Closed
joeberkovitz wants to merge 3 commits into
gh-pagesfrom
250-desugaring
Closed

joeberkovitz wants to merge 3 commits into
gh-pagesfrom
250-desugaring

Conversation

@joeberkovitz

Copy link
Copy Markdown

No description provided.

Comment thread index.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indent this.

@rtoy

rtoy commented Nov 16, 2015

Copy link
Copy Markdown
Member

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

hoch commented Nov 19, 2015

Copy link
Copy Markdown
Member

@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
Copy Markdown
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
Copy Markdown
Author

Note this PR fixes issue #250

@domenic

domenic commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Author

Be sure to account for change to playbackCategory re #651

@joeberkovitz

Copy link
Copy Markdown
Author

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

@mjwilson-google
mjwilson-google deleted the 250-desugaring branch October 29, 2026 23:21
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