Skip to content

Prevent click when stopping sounds #42

@ericrosenbaum

Description

@ericrosenbaum

Expected behavior

It should be possible to stop a sound while it's playing without causing a click.

Actual behavior

We're getting click sounds in several situations when sounds are stopped. This includes stopping sounds using the stop button, using the "stop all sounds" block, stopping and restarting a sound by playing it in a loop, and while navigating the sound library by hovering over sounds.

Steps to reproduce

Click the sounds tab
Click "Add Sound"
Add the sound "C Bass"
Run the following stack:
screen shot 2017-05-24 at 11 39 49 am

Things to try

Fortunately, in all these clicky situations, the same stop() function is called, here. We should be able to add a gain node to each bufferSourceNode and schedule a very short ramp down before stopping it.

Operating system and browser

Mac OS 10.11.6 Chrome 58.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions