-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DartVM - checked mode throws strange error with 'AudioGainNode' #6292
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
Comments
This might be a Dartium issue. Added Area-Dartium, Triaged labels. |
This comment was originally written by [email protected] AudioGainNode has been recently renamed to GainNode in WebKit. Alas, our IDLs haven't caught up. cc @vsmenon. |
This comment was originally written by @bp74 But is there a workaround to use the "Web Audio API" on current builds of Chrome and Safari? We saw a similar problem with method renames like "noteOn" to "start" and "noteOff" to "stop". Which made "Web Audio API" in combination with DART unusable on current browsers. |
This comment was originally written by [email protected] That's tough. Dartium as of now is best regarded as Chromium's dev channel siblings. So any changes which made into dev channel, got into Dartium very quickly. Overall, we'd rather not provide additional buffering for APIs in flux like, apparently, Web Audio, but if you really suffer, we can to some extent mitigate by, e.g., renaming new names to old and alike. Another option for you, in this particular case, would be to switch to typeless variant. How much do you need it? Please. consider that we're very small team and if we spend additional time on maintaing backward compatibility, we have less cycles to work on new features. Anyway, we'll definitely discuss that. |
This comment was originally written by @bp74 Sure i understand, especially in this case where the API is changing all the time. Maybe it will work anyway because the AudioGainNode (GainNode) is not instantiated but returned by the method "audioContext.createGainNode". I keep my fingers crossed! If we can't use the Web Audio API until Chrome get's to version 24 or 25, that would be unfortunate. |
Could we make GainNode subclass AudioGainNode for a release or two? And then mark AudioGainNode as deprecated and remove it in the next milestone? |
This comment was originally written by @bp74 I did a quick test: * With Dart Editor Build r14167 (current official version, before IDL update AudioGainNode->GainNode) var gainNode = context.createGainNode(); * With Dart Editor Build r14212 (has the updated IDL and now it's GainNode) GainNode gainNode = context.createGainNode(); This works in Dartium (checked mode) because GainNode is the correct type, but as soon as you compile it with dart2js you get an error. Therefore you can't use Web Audio API in Chrome and Safari. "Uncaught TypeError: connect$3 is not a function" -> It's the connect method of the gainNode. |
This comment was originally written by @bp74 To make it short: After the IDL update it's not a problem with Dartium anymore, it's a problem with dart2js. There are many renames for cross browser compatibility in dart2js already, maybe it's easy for the compiler guys to fix it!? |
Each time a class name changes, the type tag we use for the first-time dynamic dispatch changes. We need to update the mapping from the old type tag to the new type tag as a backwards compatibility issue. Seth: Lars: @deprecated('Please update your program to use GainNode') Added Triaged label. |
cc @larsbak. |
Emily, can you add the mappings AudioGainNode -> GainNode and others from the recent IDL roll to the mapping in dart2js. It affects webkit browsers, i.e. Chrome and Safari. Set owner to @efortuna. |
On it. Added Accepted label. |
Fix committed in 14310. Added Fixed label. |
This issue was originally filed by @bp74
What steps will reproduce the problem?
import 'dart:html';
void main() {
AudioContext audioContext = new AudioContext();
AudioGainNode audioGainNode = audioContext.createGainNode();
audioGainNode.connect(audioContext.destination, 0, 0);
}
What is the expected output? What do you see instead?
Exception: 'http://127.0.0.1:3030/C:/Users/Bernhard/dart/Test/web/Test.dart': Error: line 5 pos 3: type 'AudioGainNode' is not loaded
AudioGainNode audioGainNode = audioContext.createGainNode();
^
type '_GainNodeImpl' is not a subtype of type 'malformed' of 'audioGainNode'.
Stack Trace: #0 main (http://127.0.0.1:3030/C:/Users/Bernhard/dart/Test/web/Test.dart:5:60)
What version of the product are you using? On what operating system?
Dart Editor Build 14127, Windows 7 64 bit
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: