|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mot.iden.voicenote.VoiceNote
Provides access to voicenote functions
Field Summary | |
static int |
AMBE_VOCODER
Integer used to select the AMBE (12:1) vocoder. |
static int |
VSELP_VOCODER
Integer used to select the VSELP (6:1) vocoder. |
Method Summary | |
static int |
availableTime()
Deprecated. Replaced by availableTime(int vocoder) |
static int |
availableTime(int vocoder)
Returns the available time in seconds using a selected vocoder availableTime is not supported on Gemini product. |
static void |
delete(String filename)
Deletes a voicenote |
static String[] |
directory()
Returns a list of available voicenotes |
static int |
getSize(String filename)
Gets the file size in bytes |
static void |
play(String filename)
Plays a voicenote |
static byte[] |
readFile(String filename)
Reads voicenote data from a file and writes it to a byte array |
static void |
record(String filename)
Deprecated. Replaced by record(String filename int vocoder) |
static void |
record(String filename,
int vocoder)
Records a voicenote using a selected vocoder AMBE_VOCODER is not supported on Gemini product. |
static void |
rename(String oldname,
String newname)
Renames a voicenote |
static void |
stop()
Stops playing or recording a voicenote |
static void |
writeFile(String filename,
byte[] buffer)
Reads voicenote data from a byte array and writes it to a file |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VSELP_VOCODER
public static final int AMBE_VOCODER
Method Detail |
public static final void play(String filename) throws IllegalArgumentException, IOException, VoiceNoteException
filename
- String
containing the desired filename
IllegalArgumentException
- if the filename is invalid
IOException
- if the filename does not exist
VoiceNoteException
- if the player can't be created, or
if the operations on the player fail.public static final void record(String filename) throws IllegalArgumentException, IOException, VoiceNoteException
record(String filename int vocoder)
filename
- String
containing the desired filename
IllegalArgumentException
- if the filename is invalid or not unique
IOException
- if an error occurs during record
VoiceNoteException
- if the player can't be created, or
if the operations on the player fail.public static final void record(String filename, int vocoder) throws IllegalArgumentException, IOException, VoiceNoteException
filename
- String
containing the desired filenamevocoder
- int
vocoder type
IllegalArgumentException
- if the vocoder is invalid, or if
the filename is invalid or not unique.
IOException
- if an error occurs during record
VoiceNoteException
- if the player can't be created, or if
the operations on the player failed.public static final void stop() throws VoiceNoteException
VoiceNoteException
- if an I/O error occurs during
recordControl.commit().public static final void delete(String filename) throws IllegalArgumentException, IOException, VoiceNoteException
filename
- String
containing the filename to delete
IllegalArgumentException
- if filename is invalid
IOException
- if file does not exist
VoiceNoteException
- if the player is not stopped.public static final int availableTime() throws IOException
availableTime(int vocoder)
IOException
- if the value is not availablepublic static final int availableTime(int vocoder) throws IllegalArgumentException, IOException
vocoder
- int
vocoder type
IllegalArgumentException
- if the vocoder is invalid
IOException
- if the value is not availablepublic static final void rename(String oldname, String newname) throws IllegalArgumentException, IOException, VoiceNoteException
oldname
- String
containing the old filenamenewname
- String
containing the new filename
IllegalArgumentException
- if either filename is invalid
IOException
- if the old file does not exist, or if there is
an error during rename.
VoiceNoteException
- if the player is not stopped.public static final String[] directory() throws IOException
String Array
containing the names of available files
IOException
- if no files existpublic static final byte[] readFile(String filename) throws IOException, VoiceNoteException
filename
- String Array
containing the name
of the file to read
Byte Array
containing the voicenote data
IOException
- if the file does not exist
VoiceNoteException
- if the player is not stopped.public static final int getSize(String filename) throws IOException
filename
- String Array
containing the name of the file
IOException
- If the file does not existpublic static final void writeFile(String filename, byte[] buffer) throws IOException, VoiceNoteException
filename
- String Array
containing the name of the file to writebuffer
- Byte Array
containing the voicenote data
IOException
- if the file could not be written
VoiceNoteException
- if the player is not stopped.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |