bfirsh / dynamicaudio.js Goto Github PK
View Code? Open in Web Editor NEWAn interface for the Web Audio API with a Flash shim for older browsers
License: Other
An interface for the Web Audio API with a Flash shim for older browsers
License: Other
I've tried simple demos based on dynamicaudio.js on Firefox 4 beta 7, using Windows 7 64-bit and Ubuntu 10.04 32-bit. There's no sound output, only silence.
The demo below plays fine in Chrome, but not in Firefox:
http://jsspeccy.zxdemo.org/jsmodplayer
This one runs in Firefox 4 beta 7, but it's not based on dynamicaudio.js:
http://audioscene.org/?cat=9
The Audio Data API (https://wiki.mozilla.org/Audio_Data_API) is changed: some parameters were removed in the mozSetup and mozWriteAudio methods. The http://gist.github.com/566392 fixes the changes in the API. Thanks
... needs writing.
I don't think you meant to round floating point values.
When using the Web Audio API, a new buffer is created on every write. This sucks, and means it's practically impossible to play sound than is longer than the length of the write.
Ideally, we should have a callback for filling the buffer, like the Web Audio API. As an interim solution, dynamicaudio.js should maintain its own buffer somehow.
Hello,
I have identified 2 problems with the dynamicaudio.js that stem from a common problem, which is that the SWF file maybe "loaded" according to SWFObject2, however, it may not have initialized its ExternalInterface just yet... see: http://stackoverflow.com/questions/1436722/problem-accessing-externalinterface-exposed-method-in-google-chrome/5294147#5294147
It seems like dynamicaudio.swf should be built in such a way that it can be passed a function callback that it will trigger after it has exported its ExternalInterface callbacks.
The second smaller error is that flashElement is re-used, and during the execution of dynamicaudio.js could mean either the
Another thought I had is that it would be awesome if dynamicaudio.js had interfaces for controlling the "buffer" sizes, either with exposed parameters, or some sort of option flag (I am looking for the lowest latency possible, at it appears that things can get buffereed in both the JS and the SWF)... Also it would be cool if there was some sort of "isReadyForAudio" function that I could use in my loop to detect when everything is ready to go, and its safe to feed audio into it...
Other than that, this framework really kicks ass, I am looking forward to seeing even more features from it in the future!
mozWriteAudio
has been phased out in favor of the much more complicated Web Audio API. It'd be nice if dynamicaudio.js tried to use Web Audio API as one of its fallbacks. The code would look something like this Gist: https://gist.github.com/bhollis/05fa5870d41d96e07aff
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.