Loading media/java/android/media/AudioRecord.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class AudioRecord /** * Audio session ID */ private int mSessionId = 0; private int mSessionId = AudioSystem.AUDIO_SESSION_ALLOCATE; //--------------------------------------------------------- // Constructor, Finalize Loading Loading @@ -224,7 +224,7 @@ public class AudioRecord // native initialization int[] session = new int[1]; session[0] = 0; session[0] = AudioSystem.AUDIO_SESSION_ALLOCATE; //TODO: update native initialization when information about hardware init failure // due to capture device already open is available. int initResult = native_setup( new WeakReference<AudioRecord>(this), Loading media/java/android/media/AudioSystem.java +3 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,9 @@ public class AudioSystem /** @deprecated */ @Deprecated public static final int ROUTE_ALL = 0xFFFFFFFF; // Keep in sync with system/core/include/system/audio.h public static final int AUDIO_SESSION_ALLOCATE = 0; /* * Checks whether the specified stream type is active. * Loading media/java/android/media/AudioTrack.java +2 −2 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class AudioTrack /** * Audio session ID */ private int mSessionId = 0; private int mSessionId = AudioSystem.AUDIO_SESSION_ALLOCATE; //-------------------------------- Loading Loading @@ -263,7 +263,7 @@ public class AudioTrack int bufferSizeInBytes, int mode) throws IllegalArgumentException { this(streamType, sampleRateInHz, channelConfig, audioFormat, bufferSizeInBytes, mode, 0 /*session*/); bufferSizeInBytes, mode, AudioSystem.AUDIO_SESSION_ALLOCATE); } /** Loading Loading
media/java/android/media/AudioRecord.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class AudioRecord /** * Audio session ID */ private int mSessionId = 0; private int mSessionId = AudioSystem.AUDIO_SESSION_ALLOCATE; //--------------------------------------------------------- // Constructor, Finalize Loading Loading @@ -224,7 +224,7 @@ public class AudioRecord // native initialization int[] session = new int[1]; session[0] = 0; session[0] = AudioSystem.AUDIO_SESSION_ALLOCATE; //TODO: update native initialization when information about hardware init failure // due to capture device already open is available. int initResult = native_setup( new WeakReference<AudioRecord>(this), Loading
media/java/android/media/AudioSystem.java +3 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,9 @@ public class AudioSystem /** @deprecated */ @Deprecated public static final int ROUTE_ALL = 0xFFFFFFFF; // Keep in sync with system/core/include/system/audio.h public static final int AUDIO_SESSION_ALLOCATE = 0; /* * Checks whether the specified stream type is active. * Loading
media/java/android/media/AudioTrack.java +2 −2 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class AudioTrack /** * Audio session ID */ private int mSessionId = 0; private int mSessionId = AudioSystem.AUDIO_SESSION_ALLOCATE; //-------------------------------- Loading Loading @@ -263,7 +263,7 @@ public class AudioTrack int bufferSizeInBytes, int mode) throws IllegalArgumentException { this(streamType, sampleRateInHz, channelConfig, audioFormat, bufferSizeInBytes, mode, 0 /*session*/); bufferSizeInBytes, mode, AudioSystem.AUDIO_SESSION_ALLOCATE); } /** Loading