AudioReader

Parent Previous Next

VisualSim.actor.lib.javasound
Class AudioReader

The fileOrURL parameter should be set to the name of the file or a URL, in any form accepted by FileAttribute. The default initial value is $CLASSPATH/VisualSim/actor/lib/javasound/voice.wav, which refers to a file that is found relative to the classpath.

Supported file formats are WAV, AU, and AIFF. The sound file format is determined from the file extension.

When the end of the file is reached, postfire() return false, which in some simulators will cause the model to stop executing (e.g. SDF), and in some will prevent further firings of this actor (e.g. DE).

There are security issues involved with accessing files and audio resources in applets. Applets are only allowed access to files specified by a URL and located on the machine from which the applet is loaded. The .java.policy file may be modified to grant applets more privileges.

Note: Requires Java 2 v1.3.0 or later.

See Also:

Field Detail

fileOrURL

public FileAttribute fileOrURL


_audioIn

private double[][] _audioIn


_audioSendArray

private DoubleToken[][] _audioSendArray


_channels

private int _channels


_firedSinceWrapup

private boolean _firedSinceWrapup


_previousFileOrURL

private String _previousFileOrURL


_reachedEOF

private boolean _reachedEOF


_sampleIndex

private int _sampleIndex


_soundReader

private SoundReader _soundReader



Created with the Personal Edition of HelpNDoc: Easily create EBooks