History log of /frameworks/base/media/java/android/media/AudioRecord.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
43bcd8fa74711dddfc27d696e7b9c0a9c4beff08 19-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioRecord: filter attributes

When creating an AudioRecord instance, filter the tags in the
AudioAttributes to remove tags that are handled at the Java
layer.

Bug: 18733215
Bug: 18736417

Change-Id: I16a3497742086deced4e8677bd6231290396c5f6
/frameworks/base/media/java/android/media/AudioRecord.java
986468a8ab77ce1e89247078d4e93a3aaa5d294b 07-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> am dce7a427: Merge "Full volume on remote submix for apps that need it" into lmp-dev

* commit 'dce7a427593c6e11277d9e3075ab027512923276':
Full volume on remote submix for apps that need it
ba5270b88798c66fefc17a1b25b27894e4fb7862 02-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> Full volume on remote submix for apps that need it

If an AudioRecord is created with the "fixedVolume" tag
when recording from REMOTE_SUBMIX, treat the
device DEVICE_OUT_REMOTE_SUBMIX as a fixed full volume
device during the recording. Also register a death
handler during the recording.
Otherwise this is a no-op.

Bug 17635294

Change-Id: I8d26fe777047126f34308e1e1b7ac28ba269ad89
/frameworks/base/media/java/android/media/AudioRecord.java
ce4483cb83afb3a42a32ef2cb00cf04d6f9018fd 17-Sep-2014 Benson Huang <benson.huang@mediatek.com> [FM] Add FM_TUNER audio source to support L version FM radio app

1.MediaRecorder.java: Add FM_TUNER audio source type for FM record.
2.AudioRecord.java: For FM output to the other device,
(except the headset case), record the FM tuner signal to a track
and playback the recorded signal by a track.
3.AudioAttributes.java: Thus we use AudioRecord, need to modify
setCapturePreset to support MediaRecorder.AudioSource.FM_TUNER.

Review: https://partner-android-review.git.corp.google.com/#/c/182071

Signed-off-by: Benson Huang <benson.huang@mediatek.com>

Change-Id: If068d0bbbffb4848887004396a8a8d9bcba1334e
/frameworks/base/media/java/android/media/AudioRecord.java
701d6ff12f36bf5e9de0dafdaced06744fd411eb 16-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioAttributes and AudioRecord.

Add audio recording source in AudioAttributes.
New AudioRecord constructor with AudioAttributes and
AudioFormat.
Legacy AudioRecord constructor is calling into the new
constructor.

Bug 16009464

Change-Id: I69d81f9e71bdf946c4cfbda6d3d8552ffac6b5c2
/frameworks/base/media/java/android/media/AudioRecord.java
bc11a696f6856624de532a6830d5db9dbbe2384c 16-May-2014 Eric Laurent <elaurent@google.com> AudioSystem: native to JAVA status translation

Regroup status code translation from native to JAVA in AudioSystem.
The same codes will be used by AudioTrack, AudioRecord, AudioManager
and defined in a single place in AudioSystem.

Change-Id: I7d3f39f30e3bb8e53f33f4408bcb0672df8af42b
/frameworks/base/media/java/android/media/AudioRecord.java
34a37bdebb3d606dac7c7d1dd7a0effdb59bd3d6 09-Jan-2014 Glenn Kasten <gkasten@google.com> Add AudioFormat.getBytesPerSample and use it

Change-Id: I90a40987ea99006af4a6e31136078c04976eb54d
/frameworks/base/media/java/android/media/AudioRecord.java
6bb5cb24b458a11bd02e9bff37c03f6381e06b7c 16-Jan-2014 Narayan Kamath <narayan@google.com> Resolved conflicts for merge of 28c6ec02 to master

Change-Id: Idf1cabf2694dfa13d928df944d346f5e051b6948
075e9a19ce645752f8282bc19c91b25978a7dc52 06-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Use long for pointers in media classes

For storing pointers, long is used in media classes,
as native pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use
of jint instead of int in JNI function prototypes)

Change-Id: Idc4ca0124d03df7f9cef412488abafd020e5e774
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
/frameworks/base/media/java/android/media/AudioRecord.java
4896cb59a443370252d230793ee030021f719821 15-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Use AUDIO_SESSION_ALLOCATE instead of hard-coded 0"
a16a979315c3458499802f5cd94150822d49597a 22-Nov-2013 Glenn Kasten <gkasten@google.com> Update comments for AudioRecord IllegalArgumentException

Also explicitly list IllegalArgumentException in throws clause of the
constructor helper methods, as that is a critical side-effect of these methods.

Change-Id: I5cae5dfd807235fbdd827ef4ebc7cf05bfd11c02
/frameworks/base/media/java/android/media/AudioRecord.java
19294ca0e88018867d7d31a34bb4306a3d9502c3 22-Nov-2013 Glenn Kasten <gkasten@google.com> Document need to call AudioRecord.getState() after construction

Change-Id: Ia6ebb5b01ae60453b6fc7db79e2ec3d40d2b56f1
/frameworks/base/media/java/android/media/AudioRecord.java
a4b06fd111185f4f245d816c09074107fef960bb 22-Nov-2013 Glenn Kasten <gkasten@google.com> Fix typo nbChannels -> channelMask

Formal parameter name in native_setup was wrong.

Change-Id: Ie76c6e0aca83c6a01f2581d988e32da730b7e427
/frameworks/base/media/java/android/media/AudioRecord.java
357263da0ec2bc2be9d48c1becc3d94288c2f3ed 09-Sep-2013 Eric Laurent <elaurent@google.com> Add HOTWORD as an AudioSource

- This is a low-priority source that can be preempted by others
- This is required for scenarios where someone wants an alway-on
graceful microphone

Bug: 10640877.

Change-Id: Idb3577541103717cb713a7a93d3762ad2c2f4710
/frameworks/base/media/java/android/media/AudioRecord.java
86fad47e68e344b19fabeab1156c5e6742d8dfad 22-Jun-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: If470efd77ed886da8d83a1b427c132bad77e668b
/frameworks/base/media/java/android/media/AudioRecord.java
f239d9d7bb15fbdbe026835d5ee6b0c91d3ac5f0 05-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Don't doubly initialize fields in constructor"
0bd2667e20f795d47efe834f3a947fcbfc3886b9 05-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Clean up imports"
97d50425a48e7ac297da02b9a05612e373a672db 19-Jul-2013 Glenn Kasten <gkasten@google.com> Don't doubly initialize fields in constructor

Change-Id: Id3b4911a7954a5a908764683cc7b8d8515d4482a
/frameworks/base/media/java/android/media/AudioRecord.java
896a7f5fee46c24d31e9403abdf5813e4bb84ca5 19-Jul-2013 Glenn Kasten <gkasten@google.com> Clean up throws in AudioRecord and AudioTrack

Remove dead assignments to member fields in constructor prior to throw.
Execution doesn't continue execution, so no need to initialize fields.

throw doesn't need parentheses.

Fix indentation.

Change-Id: I2bf1b8bfa2c836e53a41eea67552cba40dc6fd43
/frameworks/base/media/java/android/media/AudioRecord.java
83db9ed19969a43d9bc179cb872129910d7039b2 02-Aug-2013 Glenn Kasten <gkasten@google.com> Clean up imports

No need to import java.lang.*;
these imports are implicit in the language.

Change-Id: Ia903fb9546f2a295605dbc80ba69c4e6778627d6
/frameworks/base/media/java/android/media/AudioRecord.java
33c437df39029b70d4ffafac2ca31bd71eafd0c6 19-Jul-2013 Glenn Kasten <gkasten@google.com> Rename mChannels to mChannelMask to avoid ambiguity

This clarifies that it's a channel mask, as opposed to a count.

Also no need to initialize the field in the declaration,
as it's initialized in the constructor.

Include channel mask in error logs.

Change-Id: Ifc02668cf922dc8826a9fb042b3ca52fad377ba6
/frameworks/base/media/java/android/media/AudioRecord.java
d5af238199b5c9f73d87fd57b7485a3a972629a7 24-Jul-2013 Glenn Kasten <gkasten@google.com> Match AudioRecord.getChannelConfiguration docs

Bug: 10001767
Change-Id: I28705ae84ee585afc37cdd2b13a039b7bfc36543
/frameworks/base/media/java/android/media/AudioRecord.java
626c0415a29a6dd23ffe292ce7f166a91f66d005 19-Jul-2013 Glenn Kasten <gkasten@google.com> Use the utility logging methods and single tag

See Change-Id: I5bfc66562a4a0630d520390ae886bd19de3327cb

Change-Id: I569e0a746c4430f9d0cd1cb20bbc9aa50b81bcfc
/frameworks/base/media/java/android/media/AudioRecord.java
6ab188589d9126c19bb37ba7dfa4de3e73e93e55 19-Jul-2013 Glenn Kasten <gkasten@google.com> Detect integer overflow

See Change-Id: Iec36fc0ea67095e18a2c238b148dad5545c102c1

Change-Id: I421f0d84c64310fcb6c5451993cfaf38125c4bb2
/frameworks/base/media/java/android/media/AudioRecord.java
8057f24d4aeb06da44aed2723575c983cabdda4b 19-Jul-2013 Glenn Kasten <gkasten@google.com> Verify that AudioRecord object is initialized for more APIs

Compare to AudioTrack, which already has these checks.

Change-Id: I3a239dfb4b918ceabfb723f189cc50ed6662eee6
/frameworks/base/media/java/android/media/AudioRecord.java
25a64b4badb21765426df26915d5582d5fb809af 19-Jul-2013 Glenn Kasten <gkasten@google.com> Remove redundant AudioRecord. qualifiers

Symbols of the current class don't need to be qualified.
See Change-Id: Ic89ce568771165d01d4b5bcf835c591ca0b86541

Change-Id: I75ec74a95cf68bf8eabdbac5b227a9035b945360
/frameworks/base/media/java/android/media/AudioRecord.java
79e49a0752bc2ec1431728ab793601536fac1ee5 19-Jul-2013 Glenn Kasten <gkasten@google.com> Return the record state locked

This field is always accessed with a lock held.
See Change-Id: I502b7401196c42932c9667ef73eb4cae16c3da16

Change-Id: I0900b60cd6b9076868532f951db370ccd5a0312e
/frameworks/base/media/java/android/media/AudioRecord.java
60bd67f7b1b85ed0ee19f77b056b90350a3d5343 26-Jun-2012 Glenn Kasten <gkasten@google.com> Use AUDIO_SESSION_ALLOCATE instead of hard-coded 0

Change-Id: Ic56e4a51895297516552e190d508e2257484fb53
/frameworks/base/media/java/android/media/AudioRecord.java
6809afe1c26f0044adf2be414fcaede9024289a6 18-Jan-2013 Eric Laurent <elaurent@google.com> AudioRecord: allow front + back mic capture

Change-Id: Id75c9b420198092f5f5d255bd5512ec5a7a2c502
/frameworks/base/media/java/android/media/AudioRecord.java
ee88bc8ab90696a9e479cf185ec2b8c2be0b7258 06-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Document that ByteBuffer position not updated"
f0336d11f565aebdbf182289b2b9a4c58bfd80f9 06-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Remove whitespace at end of line"
9121a032bb11256deabca709a42f7212ea19feaa 22-Jun-2012 Glenn Kasten <gkasten@google.com> Import only what's needed

Change-Id: I93e86e36569496b4bd08f58a8681e6471341ad3d
/frameworks/base/media/java/android/media/AudioRecord.java
5e958ed0cd41fd110f6d4b63cebc5cca927f5e6c 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove whitespace at end of line

Change-Id: Ie421899ddcb3c488902648ccbf628c075af05a91
/frameworks/base/media/java/android/media/AudioRecord.java
cfde15d709a3466b9d503f51819b7d28e718b482 08-Nov-2012 Glenn Kasten <gkasten@google.com> Document that ByteBuffer position not updated

This behavior is perhaps unfortunate but could cause compatibility
problems if it were changed at this point.

Bug: 7479782
Change-Id: I1ea0f1c8d5277c509cbea199f3c24a1563bcb2d0
/frameworks/base/media/java/android/media/AudioRecord.java
ff2577da370f15b8288f547575c28393477d57b1 04-Apr-2012 Eric Laurent <elaurent@google.com> unhide API for synchronous audio capture.

unhide MediaSyncEvent class and AudioRecord.startRecording() method with synchronization
event allowing to start audio capture upon occurence of a specific event.
So far the only event defined is playback presentation complete but more events and synchronized
playback/capture methods could be defined in the future.

Change-Id: If05fc6cd125dd9afad451727f792a3fd9e916bef
/frameworks/base/media/java/android/media/AudioRecord.java
8dfc10571a83389593fc11b92fbf9fc1f22c9f21 11-Apr-2012 Eric Laurent <elaurent@google.com> unhide audio pre processing API.

Unhide APIs for Noise Suppressor(NS), Acoustic Echo Canceler (AEC) and
Automatic Gain Control (AGC) audio pre processings.

Also unhide getAudioSessionId() method on AudioRecord.

Change-Id: I788f7a0724b152cc98c8167d9434e64c12bada95
/frameworks/base/media/java/android/media/AudioRecord.java
505e5c8859f596ed58489be565d6e029314b2ac8 30-Mar-2012 Eric Laurent <elaurent@google.com> implemented synchronous audio capture

Added the infrastructure to support the synchronization of playback and
capture actions on specific events.
The first requirement for this feature is to synchronize the audio capture
start with the full rendering of a given audio content.
The applications can further be extended to other use cases
(synchronized playback start...) by adding new synchronization events and
new synchronous control methods on player or recorders.

Also added a method to query the audio session from a ToneGenerator.

Change-Id: I4e47f5108c7cbbd3bd334a7fad9b3b6c5ba55d88
/frameworks/base/media/java/android/media/AudioRecord.java
30c918ce7fbe171944b28fc91b3f22b3d631872d 11-Nov-2011 Glenn Kasten <gkasten@google.com> Use final on new member variables

Use final for member fields initialized to a new and that are never modified.

Change-Id: I042352c7bc21879613e7a50b1205b6923f8083cf
/frameworks/base/media/java/android/media/AudioRecord.java
44ff4cd8be50768d5bd471bc6c034acefa0b59ca 18-Jun-2011 Eric Laurent <elaurent@google.com> AudioRecord JAVA: expose audio session Id

Added getAudioSessionId() method to AudioRecord class so that applications can
retrieve the AudioRecord's session ID and attach audio pre processes.

Change-Id: I1914770f0e54d97c9aef6a9eb36fff69b6d31552
/frameworks/base/media/java/android/media/AudioRecord.java
635fefec06458224750170e7ce127bc2c8e4215b 14-Jul-2010 Dan Tasse <dantasse@google.com> Add some javadoc to AudioRecord, plus updates based on code review comments.

Change-Id: I0087e7df7541b336f87c7af512c3e8f3897be72c
/frameworks/base/media/java/android/media/AudioRecord.java
9cc489a2196e449dbe090ad9bdbc5cedd0b8334f 05-Dec-2009 Eric Laurent <elaurent@google.com> Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.

Fixed AudioFlinger::openInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e
so that an invalid IO handle (0) is returned in case of failure.
Applied the same correction to openOutput().
Modified RecordThread start procedure so that a failure occuring during the first read from audio input stream is detected and causes
the record start to fail.
Modified RecordThread stop procedure to make sure that audio input stream fd is closed before we exit the stop function.

Fixed AudioRecord JAVA and JNI implementation to take status of native AudioRecord::start() into account
and not change mRecordingState to RECORDSTATE_RECORDING if start fails.
/frameworks/base/media/java/android/media/AudioRecord.java
3026a023b8979b7ddcb3fe97bbc45531c89fda92 27-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2001517: AudioTrack compatibility issue.

Modified enum values in AudioFormat.java and AudioSystem.h.
Added code for backward compatibility in AudioTrack.java and AudioRecord.java.
/frameworks/base/media/java/android/media/AudioRecord.java
a553c25b33c99b345cf1c8688f8df0ed8df14e5a 17-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1795088 Improve audio routing code

Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
/frameworks/base/media/java/android/media/AudioRecord.java
4bc035a65cac177be9294e69f110497e3b6e34e6 22-May-2009 Eric Laurent <elaurent@google.com> Fix issue 1846343 - part 1

This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
/frameworks/base/media/java/android/media/AudioRecord.java
ea63a41d269abd25d070c9fc9c5a249763cb549d 20-Apr-2009 Jean-Michel Trivi <> AI 146938: am: CL 146937 Finalize AudioRecord javadoc.
Original author: jmtrivi
Merged from: //branches/cupcake/...

Automated import of CL 146938
/frameworks/base/media/java/android/media/AudioRecord.java
470f71f4a4d6d3a504b62473bd435bf80493414f 25-Mar-2009 Jean-Michel Trivi <> Automated import from //branches/donutburger/...@140566,140566
/frameworks/base/media/java/android/media/AudioRecord.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/java/android/media/AudioRecord.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/java/android/media/AudioRecord.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
/frameworks/base/media/java/android/media/AudioRecord.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
/frameworks/base/media/java/android/media/AudioRecord.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/media/java/android/media/AudioRecord.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/media/java/android/media/AudioRecord.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/media/java/android/media/AudioRecord.java