public class ALAudioPlayer extends ALProxy
| Constructor and Description |
|---|
ALAudioPlayer(Session session) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearStats() |
void |
exit()
Exits and unregisters the module.
|
java.lang.String |
getBrokerName()
Gets the name of the parent broker.
|
java.lang.Float |
getCurrentPosition(java.lang.Integer playId)
Returns the position in the file which is currently played
|
java.lang.Float |
getFileLength(java.lang.Integer playId)
Returns the length of the file played
|
java.util.List<java.lang.String> |
getInstalledSoundSetsList() |
java.util.List<java.lang.String> |
getLoadedFilesIds()
returns an array containing the Ids of the currently loaded files
|
java.util.List<java.lang.String> |
getLoadedFilesNames()
returns an array containing the names of the currently loaded files
|
java.util.List<java.lang.String> |
getLoadedSoundSetsList() |
java.lang.Float |
getMasterVolume()
Returns the master volume of the player
|
java.lang.Object |
getMethodHelp(java.lang.String methodName)
Retrieves a method's description.
|
java.util.List<java.lang.String> |
getMethodList()
Retrieves the module's method list.
|
java.lang.Object |
getModuleHelp()
Retrieves the module's description.
|
java.util.List<java.lang.String> |
getSoundSetFileNames(java.lang.String setName)
Return the list of files contained in a sound set
|
java.lang.String |
getUsage(java.lang.String name)
Gets the method usage string.
|
java.lang.Float |
getVolume(java.lang.Integer playId)
Returns the volume of the player
|
void |
goTo(java.lang.Integer playId,
java.lang.Float position)
Goes to a given position in a file which is playing.
|
java.lang.Boolean |
isRunning(java.lang.Integer id)
Returns true if the method is currently running.
|
java.lang.Boolean |
isSoundSetFileInstalled(java.lang.String setName,
java.lang.String soundName) |
java.lang.Boolean |
isSoundSetInstalled(java.lang.String setName) |
java.lang.Boolean |
isStatsEnabled() |
java.lang.Boolean |
isTraceEnabled() |
java.lang.Integer |
loadFile(java.lang.String fileName)
Loads a file for ulterior playback
|
void |
loadSoundSet(java.lang.String setName)
Load a sound set
|
void |
pause(java.lang.Integer id)
Pause a play back
|
java.lang.Boolean |
ping()
Just a ping.
|
void |
play(java.lang.Integer id)
Starts the playback of a file preloaded with the loadFile function.
|
void |
play(java.lang.Integer id,
java.lang.Float volume,
java.lang.Float pan)
Starts the playback of a file preloaded with the loadFile function, with specific volume and audio balance
|
void |
playFile(java.lang.String fileName)
Plays a wav or mp3 file
|
void |
playFile(java.lang.String fileName,
java.lang.Float volume,
java.lang.Float pan)
Plays a wav or mp3 file, with specific volume and audio balance
|
void |
playFileFromPosition(java.lang.String fileName,
java.lang.Float position)
Plays a wav or mp3 file from a given position in the file.
|
void |
playFileFromPosition(java.lang.String fileName,
java.lang.Float position,
java.lang.Float volume,
java.lang.Float pan)
Plays a wav or mp3 file from a given position in the file, with specific volume and audio balance
|
void |
playFileInLoop(java.lang.String fileName)
Plays a wav or mp3 file in loop
|
void |
playFileInLoop(java.lang.String fileName,
java.lang.Float volume,
java.lang.Float pan)
Plays a wav or mp3 file in loop, with specific volume and audio balance
|
void |
playInLoop(java.lang.Integer id)
Starts the playback in loop of a file preloaded with the loadFile function
|
void |
playInLoop(java.lang.Integer id,
java.lang.Float volume,
java.lang.Float pan)
Plays a wav or mp3 file in loop, with specific volume and audio balance
|
void |
playSine(java.lang.Integer frequence,
java.lang.Integer gain,
java.lang.Integer pan,
java.lang.Float duration)
Play a sine wave which specified caracteristics.
|
void |
playSoundSetFile(java.lang.String fileName)
Plays a file contained in one of the sound sets loaded
|
void |
playSoundSetFile(java.lang.String fileName,
java.lang.Float position,
java.lang.Float volume,
java.lang.Float pan,
java.lang.Boolean loop)
Plays a file contained in a given sound set
|
void |
playSoundSetFile(java.lang.String soundSetName,
java.lang.String fileName)
Plays a file contained in a given sound set
|
void |
playSoundSetFile(java.lang.String soundSetName,
java.lang.String fileName,
java.lang.Float position,
java.lang.Float volume,
java.lang.Float pan,
java.lang.Boolean loop)
Plays a file contained in a given sound set
|
void |
playWebStream(java.lang.String streamName,
java.lang.Float param1,
java.lang.Float param2)
Starts the playback of a wab audio stream
|
void |
setMasterVolume(java.lang.Float volume)
Sets the master volume of the player
|
void |
setPanorama(java.lang.Float param1)
sets the audio panorama : -1 for left speaker / 1 for right speaker
|
void |
setVolume(java.lang.Integer id,
java.lang.Float volume)
Sets the volume of the player
|
void |
stop(java.lang.Integer id)
returns true if the method is currently running
|
void |
stopAll()
Stops all the files that are currently playing.
|
void |
unloadAllFiles()
unloads all the files already loaded.
|
void |
unloadFile(java.lang.Integer id)
unloads a file previously loaded with the loadFile function
|
void |
unloadSoundSet(java.lang.String setName)
Unload a sound set
|
java.lang.String |
version()
Returns the version of the module.
|
java.lang.Boolean |
wait(java.lang.Integer id,
java.lang.Integer timeoutPeriod)
Wait for the end of a long running method that was called using 'post'
|
call, connect, connect, disconnect, getNaoqiType, getService, isProxyReady, setServicepublic ALAudioPlayer(Session session) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Boolean isStatsEnabled()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void clearStats()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isTraceEnabled()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void exit()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.String version()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean ping()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getMethodList()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Object getMethodHelp(java.lang.String methodName)
throws CallError,
java.lang.InterruptedException
methodName - The name of the method.CallErrorjava.lang.InterruptedExceptionpublic java.lang.Object getModuleHelp()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean wait(java.lang.Integer id,
java.lang.Integer timeoutPeriod)
throws CallError,
java.lang.InterruptedException
id - The ID of the method that was returned when calling the method using 'post'timeoutPeriod - The timeout period in ms. To wait indefinately, use a timeoutPeriod of zero.CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isRunning(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - The ID of the method that was returned when calling the method using 'post'CallErrorjava.lang.InterruptedExceptionpublic void stop(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - the ID of the method to wait forCallErrorjava.lang.InterruptedExceptionpublic java.lang.String getBrokerName()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.String getUsage(java.lang.String name)
throws CallError,
java.lang.InterruptedException
name - The name of the method.CallErrorjava.lang.InterruptedExceptionpublic void playFile(java.lang.String fileName)
throws CallError,
java.lang.InterruptedException
fileName - Path of the sound fileCallErrorjava.lang.InterruptedExceptionpublic void playFile(java.lang.String fileName,
java.lang.Float volume,
java.lang.Float pan)
throws CallError,
java.lang.InterruptedException
fileName - Path of the sound filevolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right / 0.0 : centered)CallErrorjava.lang.InterruptedExceptionpublic void playSoundSetFile(java.lang.String fileName)
throws CallError,
java.lang.InterruptedException
fileName - Name of the file without extensionCallErrorjava.lang.InterruptedExceptionpublic void playSoundSetFile(java.lang.String soundSetName,
java.lang.String fileName)
throws CallError,
java.lang.InterruptedException
soundSetName - Name of the soundsetfileName - Name of the file without extensionCallErrorjava.lang.InterruptedExceptionpublic void playSoundSetFile(java.lang.String soundSetName,
java.lang.String fileName,
java.lang.Float position,
java.lang.Float volume,
java.lang.Float pan,
java.lang.Boolean loop)
throws CallError,
java.lang.InterruptedException
soundSetName - Name of the soundsetfileName - Name of the file without extensionposition - Position in second where the playing has to beginvolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right)loop - specify if the file must be played in loopCallErrorjava.lang.InterruptedExceptionpublic void playSoundSetFile(java.lang.String fileName,
java.lang.Float position,
java.lang.Float volume,
java.lang.Float pan,
java.lang.Boolean loop)
throws CallError,
java.lang.InterruptedException
fileName - Name of the file without extensionposition - Position in second where the playing has to beginvolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right)loop - specify if the file must be played in loopCallErrorjava.lang.InterruptedExceptionpublic void loadSoundSet(java.lang.String setName)
throws CallError,
java.lang.InterruptedException
setName - name of the setCallErrorjava.lang.InterruptedExceptionpublic void unloadSoundSet(java.lang.String setName)
throws CallError,
java.lang.InterruptedException
setName - name of the setCallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getSoundSetFileNames(java.lang.String setName)
throws CallError,
java.lang.InterruptedException
setName - name of the setCallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getLoadedSoundSetsList()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getInstalledSoundSetsList()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isSoundSetInstalled(java.lang.String setName)
throws CallError,
java.lang.InterruptedException
setName - name of the setCallErrorjava.lang.InterruptedExceptionpublic java.lang.Boolean isSoundSetFileInstalled(java.lang.String setName,
java.lang.String soundName)
throws CallError,
java.lang.InterruptedException
setName - name of the setsoundName - name of the soundCallErrorjava.lang.InterruptedExceptionpublic void playFileInLoop(java.lang.String fileName)
throws CallError,
java.lang.InterruptedException
fileName - Path of the sound fileCallErrorjava.lang.InterruptedExceptionpublic void playFileInLoop(java.lang.String fileName,
java.lang.Float volume,
java.lang.Float pan)
throws CallError,
java.lang.InterruptedException
fileName - Path of the sound filevolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right)CallErrorjava.lang.InterruptedExceptionpublic void playFileFromPosition(java.lang.String fileName,
java.lang.Float position)
throws CallError,
java.lang.InterruptedException
fileName - Name of the sound fileposition - Position in second where the playing has to beginCallErrorjava.lang.InterruptedExceptionpublic void playFileFromPosition(java.lang.String fileName,
java.lang.Float position,
java.lang.Float volume,
java.lang.Float pan)
throws CallError,
java.lang.InterruptedException
fileName - Name of the sound fileposition - Position in second where the playing has to beginvolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right)CallErrorjava.lang.InterruptedExceptionpublic void goTo(java.lang.Integer playId,
java.lang.Float position)
throws CallError,
java.lang.InterruptedException
playId - Id of the process which is playing the fileposition - Position in the file (in second)CallErrorjava.lang.InterruptedExceptionpublic void stopAll()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void pause(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - Id of the process that is playing the file you want to put in pauseCallErrorjava.lang.InterruptedExceptionpublic void setVolume(java.lang.Integer id,
java.lang.Float volume)
throws CallError,
java.lang.InterruptedException
id - Id of the process that is playing the file you want to put louder or less loudvolume - Volume - range 0.0 to 1.0CallErrorjava.lang.InterruptedExceptionpublic void setMasterVolume(java.lang.Float volume)
throws CallError,
java.lang.InterruptedException
volume - Volume - range 0.0 to 1.0CallErrorjava.lang.InterruptedExceptionpublic java.lang.Float getVolume(java.lang.Integer playId)
throws CallError,
java.lang.InterruptedException
playId - Id of the process which is playing the fileCallErrorjava.lang.InterruptedExceptionpublic java.lang.Float getMasterVolume()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void setPanorama(java.lang.Float param1)
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.lang.Integer loadFile(java.lang.String fileName)
throws CallError,
java.lang.InterruptedException
fileName - Path of the sound file (either mp3 or wav)CallErrorjava.lang.InterruptedExceptionpublic void unloadFile(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - Id returned by the loadFile functionCallErrorjava.lang.InterruptedExceptionpublic void unloadAllFiles()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getLoadedFilesNames()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic java.util.List<java.lang.String> getLoadedFilesIds()
throws CallError,
java.lang.InterruptedException
CallErrorjava.lang.InterruptedExceptionpublic void play(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - Id returned by the loadFile functionCallErrorjava.lang.InterruptedExceptionpublic void play(java.lang.Integer id,
java.lang.Float volume,
java.lang.Float pan)
throws CallError,
java.lang.InterruptedException
id - Id returned by the loadFile functionvolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right)CallErrorjava.lang.InterruptedExceptionpublic void playInLoop(java.lang.Integer id)
throws CallError,
java.lang.InterruptedException
id - Id returned by the loadFile functionCallErrorjava.lang.InterruptedExceptionpublic void playInLoop(java.lang.Integer id,
java.lang.Float volume,
java.lang.Float pan)
throws CallError,
java.lang.InterruptedException
id - Id returned by the loadFile functionvolume - volume of the sound file (must be between 0.0 and 1.0)pan - audio balance of the sound file (-1.0 : left / 1.0 : right)CallErrorjava.lang.InterruptedExceptionpublic void playWebStream(java.lang.String streamName,
java.lang.Float param1,
java.lang.Float param2)
throws CallError,
java.lang.InterruptedException
streamName - Path of the web audio streamCallErrorjava.lang.InterruptedExceptionpublic java.lang.Float getFileLength(java.lang.Integer playId)
throws CallError,
java.lang.InterruptedException
playId - Id of the process which is playing the fileCallErrorjava.lang.InterruptedExceptionpublic java.lang.Float getCurrentPosition(java.lang.Integer playId)
throws CallError,
java.lang.InterruptedException
playId - Id of the process which is playing the fileCallErrorjava.lang.InterruptedExceptionpublic void playSine(java.lang.Integer frequence,
java.lang.Integer gain,
java.lang.Integer pan,
java.lang.Float duration)
throws CallError,
java.lang.InterruptedException
frequence - Frequence in Hertzgain - Volume Gain between 0 and 100pan - Stereo Pan set to either {-1,0,+1}duration - Duration of the sine wave in secondsCallErrorjava.lang.InterruptedExceptionAldebaran SDK for Java
Copyright 2006-2015 Aldebaran Robotics. All Rights Reserved.