Dynamicaudio.js
An interface for the Web Audio API with a Flash shim for older browsers
Install / Use
/learn @bfirsh/Dynamicaudio.jsREADME
dynamicaudio.js
An interface for the Web Audio API with a Flash shim for older browsers.
Download it from the releases page.
For a basic example, see demo.html.
Usage
First, instantiate a DynamicAudio object with a dictionary of options:
var dynamicaudio = new DynamicAudio({'swf': '/static/dynamicaudio.swf'})
The swf option specifies the path of the dynamicaudio.swf file relative
to the page being displayed.
The DynamicAudio object has two methods available on it:
write(samples)
Plays an array of floating point audio samples in the range -1.0 to 1.0.
They are output as 2 channels at 44.1 KHz. This means it takes 88,200 samples to
play 1 second of audio. You do not need to supply this many samples in a single
call, but if you don't call write() often enough with enough samples, you
will get buffer underruns.
writeInt(samples)
This method is the same as write(), but is instead supplied with integer
samples in the range -32,768 to 32,767. If your samples are already integers,
this method is more efficient.
Build from source
To build, you will need jake:
$ sudo gem install jake
You will also need Adobe's
Flex SDK. This should be
placed in a flexsdk directory in the same directory as jake.yml.
Now run:
$ jake
Related Skills
docs-writer
99.3k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
339.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
project-overview
FlightPHP Skeleton Project Instructions This document provides guidelines and best practices for structuring and developing a project using the FlightPHP framework. Instructions for AI Coding A
Design
Campus Second-Hand Trading Platform \- General Design Document (v5.0 \- React Architecture \- Complete Final Version)1\. System Overall Design 1.1. Project Overview This project aims t
