• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

g200kg/WAAPISim: Web Audio API Simulator for Firefox/MSIE/Opera

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

g200kg/WAAPISim

开源软件地址:

https://github.com/g200kg/WAAPISim

开源编程语言:

JavaScript 100.0%

开源软件介绍:

WAAPISim : Web Audio API Simulator

WAAPISim is a 'WebAudioAPI' polyfill fallbacking to the 'Audio Data API', or Flash.
In addition, even in WebAudio API ready browsers, add some latest method name for node-creation and start/stop if the browser does not support these method name.

WAAPISim automatically check the availability of APIs:
WebAudioAPI => AudioDataAPI => Flash

  • Chrome : WebAudioAPI is supported. WAAPISim do nothing.
  • Safari (include iOS) : WebAudioAPI is supported but old method name is used. WAAPISim add new method name for node-creation, start/stop and setTargetAtTime.
  • Firefox : Simulate using AudioDataAPI
  • Opera : Simulate using Flash
  • MSIE : Simulate using Flash. Float32Array is assigned to normal Array(IE9).

For more detail: http://www.g200kg.com/docs/waapisim/

WebAudioSynth running on MSIE

Some Links of Test-pages

Try these pages with Firefox/Opera or MSIE.

Node test (Oscillator/ScriptProcessor/BiquadFilter/WaveShaper/Panner/Analyser)
Compressor test
AudioParam Automation test
ChannelSplitter/ChannelMerger test
Oscillator custom waveform test

Shiny Happy MIDI Drum Machine (MIDIDrums) (by Chris Wilson + (Chris Rogers and Ken Moore)) with WAAPISim
http://g200kg.github.com/MIDIDrums/ forked from https://github.com/cwilso/MIDIDrums

WebAudioSynth (by aike) with WAAPISim
http://g200kg.github.com/webaudiosynth/ forked from https://github.com/aike/webaudiosynth

Current Status

  • Support : OscillatorNode / ChannelSplitterNode / ChannelMergerNode / AudioBufferSourceNode / WaveShaperNode / AnalyserNode / GainNode / BiquadFilterNode / DelayNode / DynamicsCompressorNode / PannerNode / ScriptProcessorNode / ConvolverNode

  • Not Support : MediaElementAudioSourceNode / MediaStreamAudioSourceNode / MediaStreamAudioDestinationNode / OfflineAudioCOntext

  • ConvolverNode : By performance reason, convolution is executed for only IR's first 1000 samples. Sebsequent part will be replaced as simple delays.

  • PannerNode : Simplified. Listener position should stay default. Source positions are interpreted as x-z 2d coordinate.

  • ScriptProcessorNode : Input buffer size should be 1024 and under (No limitation if use output only)

  • DynamicsCompressorNode : A little different characteristics from Chrome's implements.

  • Number of channels in each nodes should be 1 (mono) or 2(stereo)

  • createBuffer from ArrayBuffer and decodeAudioData supports only wav format.

  • k-rate AudioParam controls are executed only per 1024 samples frequency. a-rate AudioParams are controlled by sample.

Usage

Load the 'waapisim.js' before using the Web Audio API functions in your script.

<script type="text/javascript" src="waapisim.js"></script> or <script type="text/javascript" src="waapisim.min.js"></script>

To enable fallbacking to Flash, place the 'waapisim.swf' file to same folder as 'waapisim.js'.

Options

These lines should be specified before loading the 'waapisim.js'

<script type="text/javascript">waapisimLogEnable=1;</script>
Enable internal log info to console.

<script type="text/javascript">waapisimForceSim=1;</script>
Enable WAAPISim even if native WebAudioAPI is available.

<script type="text/javascript">waapisimForceSimWhenNotWebkit=1;</script>
Force enable WAAPISim when non-webkit browser.

  • some versions of Firefox have WebAudioAPI interfaces but not implemented completely (e.g. custom waveforms). Some apps may work better on Firefox with this flag.

<script type="text/javascript">waapisimForceSimWhenLackOsc=0;</script>
Disable WAAPISim if native WebAudioAPI is available even lacking oscillator function (means Firefox 23). This flag is default on (=1).

  • FIrefox 23 or ealier 's WebAudioAPI (need about:config flag setting) is very tentative. In default, WAAPISim ignore this version of WebAudoAPI.

License

Copyright (c) 2013 g200kg
http://www.g200kg.com/

Modified by Loguehttp://logue.be

Released under the MIT License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap