
AudioReader |
ptolemy.actor.lib.javasound.AudioReader |
This actor outputs samples from a sound file as doubles in
the range [-1.0, 1.0]. If the file has multiple channels of
output data, then the separate channels are sent on successive
output channels. If the output has more channels than there
are channels in the audio file, then nothing will be send
on the output channels where there is no corresponding
output data.
<p>
The <i>fileOrURL</i> parameter should be set to the name of the file
or a URL, in any form accepted by FileParameter. The default initial value is
<code>$CLASSPATH/ptolemy/actor/lib/javasound/voice.wav</code>,
which refers to a file that is found relative to the classpath.
<p>
Supported file formats are WAV, AU, and AIFF. The sound
file format is determined from the file extension.
<p>
When the end of the file is reached, postfire() return false, which
in some domains will cause the model to stop executing (e.g. SDF),
and in some will prevent further firings of this actor (e.g. DE).
<p>
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.
<p>
Note: Requires Java 2 v1.3.0 or later.
Author(s): Brian K. Vogel, Christopher Hylands, Edward A. Lee, Steve Neuendorffer
Version:$Id: AudioReader.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Green (eal)
Pt.Accepted Rating:Yellow (chf)
fileOrURL
The file name or URL from which to read. This is a string with
any form accepted by FileParameter.