The extracted children can refer to their parent typed array views and
buffer to keep from needing to make memory copies that take a lot of
time to create and memory to use. As well some time can be saved by
using the same Uint8Array for reading Uint8 values and strings.
Firefox at this time cannot smoothly schedule audio parameter changes
to happen immediately. Immediately scheduled changes clip when firefox
tries to catch up. Smoothly fading out a sound immediately instead of
clipping the end of the sound, in firefox at this time clips the sound
between where the fade out starts and where firefox catches up and
finishes the scheduled fade.
- EffectChain knows of audioEngine so it can create Effects
- EffectChain connects to the target specified by .connect(target)
- EffectChain can connect to other Effects or EffectChains
- EffectChain can clone itself and connect to the original's target
- Add EffectChain.update to mirror Effects API
- Use deepest setting first in setEffectsFromTarget
Debounce when the sound starts to keep from playing many copies of the
same sound layered on itself. Use AudioEngine's currentTime in seconds
plus some value in milliseconds to make sure the sound has a chance to
start before starting a second playback.
Self-resolving promise removes itself once it resolves. While it is on
a player the player may consider itself to not yet have the time to
actually start sound playback. While playback has not started, the
player can shortcut out of starting playback.
Be explicit and build on the release step. This way it doesn't matter which version of npm we use (since prepublish is deprecated in npm 5). Also because we don't actually need to build to use scratch-audio in scratch-gui, so it doesn't help to run build on npm install anyway.
- Add GreenPlayer as SoundPlayer replacement
- Standalone playback separate from an AudioPlayer
- Each GreenPlayer has their own VolumeEffect for fading out
- play() while already isPlaying fades out the last copy
- stop() fades the sound out
- stopImmediate() hard stops the sound