speech.sound
Class SoundManagerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--speech.sound.SoundManagerAgent
- All Implemented Interfaces:
- Agent, MetagluePrimitives, Remote, Serializable, SoundManager
- public class SoundManagerAgent
- extends AgentAgent
- implements SoundManager
Agent to play sound files, such as AIFF, AU, WAV (PCM only), and MIDI.
This agent makes use of AudioPlayer
.
To play a sound, just call play(URL).
If you are going to play a sound repeatedly, calling play will first
load(URL) it into a cache. You can manually call load as well.
- See Also:
- Serialized Form
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, buildEHAFor, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getOldLogs, getProperties, getProxyHandlerClass, getSociety, installAPH, log, log, log, lookupClass, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeAPHFromCatalog, removeFrozen, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, toString, whereAreYou |
SoundManagerAgent
public SoundManagerAgent()
throws RemoteException
- Creates a new
SoundManagerAgent
instance.
This agent is tied to the value of the host attribute.
- Throws:
RemoteException
- if an error occurs
load
public void load(URL mediaURL)
throws RemoteException
- Manually loads a sound file into the cache.
- Specified by:
load
in interface SoundManager
- Parameters:
mediaURL
- an URL
value- Throws:
RemoteException
- if an error occurs
loadFile
public void loadFile(URL mediaURL)
throws RemoteException
- Deprecated. Replaced by
load(URL)
- Specified by:
loadFile
in interface SoundManager
- Parameters:
mediaURL
- an URL
value- Throws:
RemoteException
- if an error occurs
play
public void play(URL mediaURL)
throws RemoteException
- Plays a sound file. This plays a cached sound if one exists.
- Specified by:
play
in interface SoundManager
- Parameters:
mediaURL
- an URL
value- Throws:
RemoteException
- if an error occurs
playSync
public void playSync(URL mediaURL)
throws RemoteException
- Synchronously plays a sound file. This plays a cached sound if one
exists.
- Specified by:
playSync
in interface SoundManager
- Parameters:
mediaURL
- an URL
value- Throws:
RemoteException
- if an error occurs
unload
public void unload(URL mediaURL)
throws RemoteException
- Manually unloads a sound file from the cache.
- Specified by:
unload
in interface SoundManager
- Parameters:
mediaURL
- an URL
value- Throws:
RemoteException
- if an error occurs
unloadFile
public void unloadFile(URL mediaURL)
throws RemoteException
- Deprecated. Replaced by
unload(URL)
- Specified by:
unloadFile
in interface SoundManager
- Parameters:
mediaURL
- an URL
value- Throws:
RemoteException
- if an error occurs