field public static final int PLAYER_TYPE_JAM_AUDIOTRACK = 1; // 0x1
field public static final int PLAYER_TYPE_JAM_MEDIAPLAYER = 2; // 0x2
field public static final int PLAYER_TYPE_JAM_SOUNDPOOL = 3; // 0x3
- field public static final int PLAYER_TYPE_SLES_AUDIOPLAYER = 11; // 0xb
+ field public static final int PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE = 11; // 0xb
+ field public static final int PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD = 12; // 0xc
field public static final int PLAYER_TYPE_UNKNOWN = -1; // 0xffffffff
}
public final class AudioPlaybackConfiguration implements Parcelable {
private final static String TAG = new String("AudioPlaybackConfiguration");
+ /** @hide */
+ public final static int PLAYER_PIID_INVALID = -1;
+
// information about the implementation
/**
* @hide
public final static int PLAYER_TYPE_JAM_SOUNDPOOL = 3;
/**
* @hide
- * Player backed by a C OpenSL ES AudioPlayer player
+ * Player backed by a C OpenSL ES AudioPlayer player with a BufferQueue source
+ */
+ @SystemApi
+ public final static int PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE = 11;
+ /**
+ * @hide
+ * Player backed by a C OpenSL ES AudioPlayer player with a URI or FD source
*/
@SystemApi
- public final static int PLAYER_TYPE_SLES_AUDIOPLAYER = 11;
+ public final static int PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD = 12;
/** @hide */
@IntDef({
PLAYER_TYPE_JAM_AUDIOTRACK,
PLAYER_TYPE_JAM_MEDIAPLAYER,
PLAYER_TYPE_JAM_SOUNDPOOL,
- PLAYER_TYPE_SLES_AUDIOPLAYER
+ PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE,
+ PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD,
})
@Retention(RetentionPolicy.SOURCE)
public @interface PlayerType {}
* @hide
* Return the type of player linked to this configuration. The return value is one of
* {@link #PLAYER_TYPE_JAM_AUDIOTRACK}, {@link #PLAYER_TYPE_JAM_MEDIAPLAYER},
- * {@link #PLAYER_TYPE_JAM_SOUNDPOOL}, {@link #PLAYER_TYPE_SLES_AUDIOPLAYER},
- * or {@link #PLAYER_TYPE_UNKNOWN}.
+ * {@link #PLAYER_TYPE_JAM_SOUNDPOOL}, {@link #PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE},
+ * {@link #PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD}, or {@link #PLAYER_TYPE_UNKNOWN}.
* @return the type of the player.
*/
@SystemApi
case PLAYER_TYPE_JAM_AUDIOTRACK: return "android.media.AudioTrack";
case PLAYER_TYPE_JAM_MEDIAPLAYER: return "android.media.MediaPlayer";
case PLAYER_TYPE_JAM_SOUNDPOOL: return "android.media.SoundPool";
- case PLAYER_TYPE_SLES_AUDIOPLAYER: return "OpenSL ES AudioPlayer";
+ case PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE:
+ return "OpenSL ES AudioPlayer (Buffer Queue)";
+ case PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD:
+ return "OpenSL ES AudioPlayer (URI/FD)";
default:
return "unknown player type - FIXME";
}
*/
interface IAudioService {
+ // WARNING: When methods are inserted or deleted, the transaction IDs in
+ // frameworks/native/include/audiomanager/IAudioManager.h must be updated to match the order
+ // in this file.
+ //
+ // When a method's argument list is changed, BnAudioManager's corresponding serialization code
+ // (if any) in frameworks/native/services/audiomanager/IAudioManager.cpp must be updated.
+
oneway void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags,
String callingPackage, String caller);
oneway void playerEvent(in int piid, in int event);
oneway void releasePlayer(in int piid);
+
+ // WARNING: read warning at top of file, it is recommended to add new methods at the end
}