FileDocCategorySizeDatePackage
AudioSystem.javaAPI DocAndroid 1.5 API7932Wed May 06 22:42:00 BST 2009android.media

AudioSystem

public class AudioSystem extends Object
hide

Fields Summary
public static final int
STREAM_VOICE_CALL
public static final int
STREAM_SYSTEM
public static final int
STREAM_RING
public static final int
STREAM_MUSIC
public static final int
STREAM_ALARM
public static final int
STREAM_NOTIFICATION
public static final int
STREAM_BLUETOOTH_SCO
public static final int
NUM_STREAMS
private static final int
NUM_STREAM_TYPES
public static final int
MAX_VOLUME
public static final int
MIN_VOLUME
public static final int
MODE_INVALID
public static final int
MODE_CURRENT
public static final int
MODE_NORMAL
public static final int
MODE_RINGTONE
public static final int
MODE_IN_CALL
public static final int
NUM_MODES
public static final int
ROUTE_EARPIECE
public static final int
ROUTE_SPEAKER
public static final int
ROUTE_BLUETOOTH
public static final int
ROUTE_BLUETOOTH_SCO
public static final int
ROUTE_HEADSET
public static final int
ROUTE_BLUETOOTH_A2DP
public static final int
ROUTE_ALL
public static final int
AUDIO_STATUS_OK
public static final int
AUDIO_STATUS_ERROR
public static final int
AUDIO_STATUS_SERVER_DIED
private static ErrorCallback
mErrorCallback
Constructors Summary
Methods Summary
private static voiderrorCallbackFromNative(int error)

        if (mErrorCallback != null) {
            mErrorCallback.onError(error);
        }
    
public static native intgetMode()

public static final intgetNumStreamTypes()

          return NUM_STREAM_TYPES; 
public static native intgetRouting(int mode)

public static native intgetVolume(int type)

public static native booleanisMicrophoneMuted()

public static native booleanisMusicActive()

public static native intmuteMicrophone(boolean on)

public static voidsetErrorCallback(android.media.AudioSystem$ErrorCallback cb)


    /*
     * Handles the audio error callback.
     */
      
    
        /*
         * Callback for audio server errors.
         * param error   error code:
         * - AUDIO_STATUS_OK
         * - AUDIO_STATUS_SERVER_DIED
         * - UDIO_STATUS_ERROR
         */
          
    

    /*
     * Registers a callback to be invoked when an error occurs.
     * param cb the callback to run
     */
        
    
        mErrorCallback = cb;
    
public static native intsetMode(int mode)

public static native voidsetParameter(java.lang.String key, java.lang.String value)

public static native intsetRouting(int mode, int routes, int mask)

public static native intsetVolume(int type, int volume)