one.radio
Class AudioSink
java.lang.Object
|
+--one.world.core.Component
|
+--one.radio.AudioSink
- All Implemented Interfaces:
- Serializable
- public final class AudioSink
- extends Component
Plays audio in the form of AudioMessages to the system speakers.
Audio streams are demultiplexed based on AudioMessage.streamId.
Imported and Exported Event Handlers
Exported event handlers:
- audio
- Handles
AudioMessages by playing the audio data to the
system speakers.
- control
- Handles
AudioSink.ControlEvents.
Implementation note: AudioSink does not perform general message
reordering, but it will correct inversions (a pair of messages received
out of order) and drop late messages.
- Version:
- $Revision: 1.17 $
- See Also:
AudioSource, Serialized Form
|
Field Summary |
static double |
BUFFER_DURATION
The default buffer duration, in fractions of a second. |
static int |
DEFAULT_VOLUME
The default volume is 50, on a scale of 0-100. |
| Methods inherited from class one.world.core.Component |
declareExported, declareImported, equals, eventHandlers, getDescriptor, getEnvironment, getLinkedHandlers, getLinkedNumber, getTimer, hasEventHandler, hashCode, isFullyLinked, isLinked, isSealed, link, link, run, seal, unbox, undeclare, unlink, wrap |
DEFAULT_VOLUME
public static final int DEFAULT_VOLUME
- The default volume is 50, on a scale of 0-100.
BUFFER_DURATION
public static final double BUFFER_DURATION
- The default buffer duration, in fractions of a second.
This constant controls how much data is buffered before playback
starts. The smaller it is, the less delay; the larger it is, the
smoother the playback.
AudioSink
public AudioSink(Environment env)
- Create a new instance of
AudioSink.
- Parameters:
env - The environment for the new instance.
finalize
protected void finalize()
- Finalize this audio sink.
- Overrides:
finalize in class Object
getDescriptor
public ComponentDescriptor getDescriptor()
- Get the component descriptor.
- Overrides:
getDescriptor in class Component
- Following copied from class:
one.world.core.Component
- Returns:
- The component descriptor for this component.
writeObject
protected void writeObject(ObjectOutputStream out)
throws IOException
- Serialize this audio sink.
(C) Copyright 2001 UW CSE