|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.system.Audio
Provides access to the device's audio system and speaker.
AudioListener| Field Summary | ||
|
static int |
AUDIO_CODEC_VOICENOTE
Deprecated. No longer supported |
|
static int |
AUDIO_ERROR_BAD_DATA
Invalid data was provided |
|
static int |
AUDIO_ERROR_BAD_STATE
Playback is already in progress |
|
static int |
AUDIO_ERROR_FILESYSTEM_FULL
Filesystem is full |
|
static int |
AUDIO_ERROR_UNKNOWN
Unknown error |
|
static int |
AUDIO_OK
No error |
|
static int |
AUDIO_REQUEST_PENDING
Request pending |
| Method Summary | ||
|
static void |
addListener(Application app,
AudioListener listener)
Adds an audio listener to the specified application. |
|
static int |
getVolume()
Retrives the current master audio volume. |
|
static boolean |
hasBuiltInHeadset()
Determines if the device has a built-in headset. |
|
static boolean |
isCodecSupported(int codec)
Determines if this device provides support for the specified codec. |
|
static boolean |
isHeadsetConnected()
Determines if the headset is currently connected. |
|
static boolean |
isRecordingCodecSupported(int codec)
Determines if this device provides recording support for the specified codec. |
|
static boolean |
isSupported()
Determines if the device has audio support. |
|
static int |
playFile(int audioCodec,
int fs,
String fileName)
Deprecated. No longer supported |
|
static int |
recordFile(int audioCodec,
int fs,
String fileName)
Deprecated. No longer supported |
|
static void |
removeListener(Application app,
AudioListener listener)
Removes an audio listener from the specified application. |
|
static boolean |
setVolume(int volume)
Sets the desired master audio volume. |
|
static int |
stopFile(int audioCodec,
int fs,
String fileName)
Deprecated. No longer supported |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int AUDIO_CODEC_VOICENOTE
public static final int AUDIO_ERROR_BAD_DATA
public static final int AUDIO_ERROR_BAD_STATE
public static final int AUDIO_ERROR_FILESYSTEM_FULL
public static final int AUDIO_ERROR_UNKNOWN
public static final int AUDIO_OK
public static final int AUDIO_REQUEST_PENDING
| Method Detail |
public static void addListener(Application app, AudioListener listener)
app - The application.listener - Audio listener to register.public static int getVolume()
public static boolean hasBuiltInHeadset()
public static boolean isCodecSupported(int codec)
codec - The codec to query.public static boolean isHeadsetConnected()
public static boolean isRecordingCodecSupported(int codec)
codec - The codec to querypublic static boolean isSupported()
public static int playFile(int audioCodec,
int fs,
String fileName)
When the operation is complete, the
AudioFileListener.audioFileOperationComplete(int) method is invoked on the event thread.
If the operation fails, the
AudioFileListener.audioFileOperationFailed(int, int) method is invoked on the event thread.
audioCodec - One of the AUDIO_CODEC_ values.fs - One of the File.FILESYSTEM_ values.fileName - The name of the file to play from.UnsupportedOperationException - If an unsupported file system is provided.AudioFileListener.audioFileOperationComplete(int),
AudioFileListener.audioFileOperationFailed(int, int)
public static int recordFile(int audioCodec,
int fs,
String fileName)
If the operation fails, the
AudioFileListener.audioFileOperationFailed(int, int) method is invoked on the event thread.
audioCodec - One of the AUDIO_CODEC_ values.fs - One of the File.FILESYSTEM_ values.fileName - The name of the file to record to.UnsupportedOperationException - If an unsupported file system is provided.AudioFileListener.audioFileOperationFailed(int, int)public static void removeListener(Application app, AudioListener listener)
app - The applicationlistener - Audio listener to de-register.public static boolean setVolume(int volume)
volume - Percentage of maximum volume.
public static int stopFile(int audioCodec,
int fs,
String fileName)
When the operation is complete, the
AudioFileListener.audioFileOperationComplete(int) method is invoked on the event thread.
If the operation fails, the
AudioFileListener.audioFileOperationFailed(int, int) method is invoked on the event thread.
audioCodec - One of the AUDIO_CODEC_ values.fs - One of the File.FILESYSTEM_ values.fileName - The name of the file.UnsupportedOperationException - If an unsupported file system is provided.AudioFileListener.audioFileOperationComplete(int),
AudioFileListener.audioFileOperationFailed(int, int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.