AudioEvent

abstract class in Clatter.Core

AudioEvent is an abstract base class for generating audio from physics events. See: Impact and Scrape.

Static Fields

Name Type Description Default Value
simulationAmp double The overall amplitude of the simulation. The amplitude of generated audio is scaled by this factor. Must be between 0 and 0.99 0.9

Fields

Name Type Description Default Value
samples Samples The audio samples generated from this event. Readonly.
state EventState The current state of the AudioEvent. This is not the same thing as whether any audio is playing. An Impact ends when too much time has elapsed since the most recent impact collision. A Scrape ends when the object is moving too slowly. EventState.start

Methods

GetAudio

public abstract bool GetAudio(double speed)

Generate audio. Returns true if audio was generated. This will set the samples field.

Name Type Description
speed double The collision speed in meters per second.