one.radio
Class AudioSender

java.lang.Object
  |
  +--one.world.core.Component
        |
        +--one.radio.AudioSender
All Implemented Interfaces:
Serializable

public final class AudioSender
extends Component

Multicasts an audio stream generated by an AudioSource to a one.radio channel. The AudioSource may either capture audio or play audio tuples from a sub-environment specified by <path>.

Usage: AudioSender [username] [channel] <path>

Imported and Exported Event Handlers

Exported event handlers:

main
The main environment event handler.
source
Accepts Messages.

Imported event handlers:

request
The environment request handler.
sourceControl
Accepts AudioSource.ControlEvents.

Version:
$Revision: 1.9 $
See Also:
Serialized Form

Inner classes inherited from class one.world.core.Component
Component.HandlerReference, Component.Importer
 
Constructor Summary
AudioSender(Environment env, String channel)
          Create a new instance of AudioSender.
 
Method Summary
 ComponentDescriptor getDescriptor()
          Get the component descriptor.
static void init(Environment env, Object closure)
          Initialize an environment with this component.
protected  void writeObject(ObjectOutputStream out)
          Serialize this audio source.
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioSender

public AudioSender(Environment env,
                   String channel)
Create a new instance of AudioSender.
Parameters:
env - The environment for the new instance.
channel - The channel name.
Method Detail

writeObject

protected void writeObject(ObjectOutputStream out)
                    throws IOException
Serialize this audio source.

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.

init

public static void init(Environment env,
                        Object closure)
                 throws Throwable
Initialize an environment with this component.
Parameters:
env - The environment to initialize.
closure - A string array containing the username, the name of the channel to send to, and, optionally, the path of a sub-environment from which to play audio tuples. If no path is specified, audio will be captured from the microphone instead.


(C) Copyright 2001 UW CSE