History log of /external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6955870806624479723addfae6dcf5d13968796c 13-Jan-2016 Peter Kasting <pkasting@google.com> Convert channel counts to size_t.

IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1316523002 .

Cr-Commit-Position: refs/heads/master@{#11229}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
0eb15ed7b806125774bd13fb214aeb403e2c6857 17-Dec-2015 kwiberg <kwiberg@webrtc.org> Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector

We can now use std::move instead!

This CL leaves the Pass methods in place; a follow-up CL will add deprecation annotations to them.

Review URL: https://codereview.webrtc.org/1460043002

Cr-Commit-Position: refs/heads/master@{#11064}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
82e20554cbf8152d67915e3ef764bad8064b6541 25-Sep-2015 henrika <henrika@webrtc.org> Modifies invalid DCHECK in AudioRecordJni::OnCacheDirectBufferAddress()

Ensures that we can restart audio recording on Android without hitting
a DCHECK. Also adds a symmetric design for the playout side.

BUG=webrtc:5000
TEST=modules_unittests --gtest_filter=AudioDevice*

Review URL: https://codereview.webrtc.org/1373443003

Cr-Commit-Position: refs/heads/master@{#10072}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
c14f5ff60fb0c42c97702de112a9e8f1eccba574 23-Sep-2015 henrika <henrika@webrtc.org> Improving support for Android Audio Effects in WebRTC.
Now also supports AGC and NS effects and adds the possibility
to override default settings.

R=magjed@webrtc.org, pbos@webrtc.org, sophiechang@chromium.org
TBR=perkj
BUG=NONE

Review URL: https://codereview.webrtc.org/1344563002 .

Cr-Commit-Position: refs/heads/master@{#10030}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
91d6edef35e7275879c30ce16ecb8b6dc73c6e4a 17-Sep-2015 henrikg <henrikg@webrtc.org> Add RTC_ prefix to (D)CHECKs and related macros.

We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.

BUG=chromium:468375
NOTRY=true

Review URL: https://codereview.webrtc.org/1335923002

Cr-Commit-Position: refs/heads/master@{#9964}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
dce40cf804019a9898b6ab8d8262466b697c56e0 24-Aug-2015 Peter Kasting <pkasting@google.com> Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

Review URL: https://codereview.webrtc.org/1230503003 .

Cr-Commit-Position: refs/heads/master@{#9768}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
796e17237b25d0e46ad89263eb09ab971b4d2074 28-May-2015 henrika <henrika@chromium.org> Fixes crash in WebRtcAudioManager.setCommunicationMode

BUG=b/21360598
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53579004

Cr-Commit-Position: refs/heads/master@{#9311}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
ee369e4277e48624bb557f0264644ed19a40dd67 25-May-2015 henrika <henrika@chromium.org> Refactoring of AudioTrackJni and AudioRecordJni using new JVM/JNI classes

BUG=NONE
TEST=./webrtc/build/android/test_runner.py gtest -s modules_unittests --gtest_filter=AudioDevice*
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51079004

Cr-Commit-Position: refs/heads/master@{#9271}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
b26198972c1fcb4aa7abaf3895b007e301e7d5dc 18-May-2015 henrika <henrika@chromium.org> Adding support for OpenSL ES output in native WebRTC

BUG=4573,2982,2175,3590
TEST=modules_unittests --gtest_filter=AudioDevice*, AppRTCDemo and WebRTCDemo

Summary:

- Removes dependency of the 'enable_android_opensl' compiler flag.
Instead, OpenSL ES is always supported, and will enabled for devices that
supports low-latency output.
- WebRTC no longer supports OpenSL ES for the input/recording side.
- Removes old code and demos using OpenSL ES for audio input.
- Improves accuracy of total delay estimates (better AEC performance).
- Reduces roundtrip audio latency; especially when OpenSL can be used.

Performance verified on: Nexus 5, 6, 7 and 9. Samsung Galaxy S4 and S6.
Android One device.

R=magjed@webrtc.org, phoglund@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51759004

Cr-Commit-Position: refs/heads/master@{#9208}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
8324b525dce2c502bbd24b3946bbae207645cde9 27-Mar-2015 henrika <henrika@chromium.org> Adding playout volume control to WebRtcAudioTrack.java.

Also adds a framework for an AudioManager to be used by both sides (playout and recording).
This initial implementation only does very simple tasks like setting up the correct audio
mode (needed for correct volume behavior). Note that this CL is mainly about modifying
the volume. The added AudioManager is only a place holder for future work. I could have
done the same parts in the WebRtcAudioTrack class but feel that it is better to move these
parts to an AudioManager already at this stage.

The AudioManager supports Init() where actual audio changes are done (set audio mode etc.)
but it can also be used a simple "construct-and-store-audio-parameters" unit, which is the
case here. Hence, the AM now serves as the center for getting audio parameters and then inject
these into playout and recording sides. Previously, both sides acquired their own parameters
and that is more error prone.

BUG=NONE
TEST=AudioDeviceTest
R=perkj@webrtc.org, phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45829004

Cr-Commit-Position: refs/heads/master@{#8875}
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
474d1eb22376898b36bcd04b0ce3860fa12fd984 09-Mar-2015 henrika@webrtc.org <henrika@webrtc.org> Adds C++/JNI/Java unit test for audio device module on Android.

This CL adds support for unittests of the AudioDeviceModule on Android using both Java and C++. The new framework uses ::testing::TesWithParam to support both Java-based audio and OpenSL ES based audio. However, given existing issues in our OpenSL ES implementation, the list of test parameters only contains Java in this first version. Open SL ES will be enabled as soon as the backend has been refactored.

It also:

- Removes the redundant JNIEnv* argument in webrtc::VoiceEngine::SetAndroidObjects().
- Modifies usage of enable_android_opensl and the WEBRTC_ANDROID_OPENSLES define.
- Adds kAndroidJavaAudio and kAndroidOpenSLESAudio to AudioLayer enumerator.
- Fixes some bugs which were discovered when running the tests.

BUG=NONE
R=phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40069004

Cr-Commit-Position: refs/heads/master@{#8651}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8651 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
962c62475e31ccb5b1315bf646138652e273d0f5 23-Feb-2015 henrika@webrtc.org <henrika@webrtc.org> Refactoring WebRTC Java/JNI audio track in C++ and Java.

This CL is part II in a major refactoring effort. See https://webrtc-codereview.appspot.com/33969004 for part I.

- Removes unused code and old WEBRTC logging macros
- Now uses optimal sample rate and buffer size in Java AudioTrack (used hard-coded sample rate before)
- Makes code more inline with the implementation in Chrome
- Adds helper methods for JNI handling to improve readability
- Changes the threading model (high-prio audio thread now lives in Java-land and C++ only works as proxy)
- Simplified the delay estimate
- Adds basic thread checks
- Removes all locks in C++ land
- Removes all locks in Java
- Improves construction/destruction
- Additional cleanup

Tested using AppRTCDemo and WebRTCDemo APKs on N6, N5, N7, Samsung Galaxy S4 and
Samsung Galaxy S4 mini (which uses 44.1kHz as native sample rate).

BUG=NONE
R=magjed@webrtc.org, perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39169004

Cr-Commit-Position: refs/heads/master@{#8460}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8460 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
a9eaeebc6ab17dca6655cdd83d8318507ffad407 12-Feb-2015 perkj@webrtc.org <perkj@webrtc.org> Fix problem where Android VoE can not record on multiple channels.

The issue was introduced in https://webrtc-codereview.appspot.com/33969004/
R8325

TEST= Build libjingle_peerconnection_android_unittest and then run "CHECKOUT_SOURCE_ROOT=`pwd` build/android/test_runner.py instrumentation --test-apk=libjingle_peerconnection_android_unittest"
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38089004

Cr-Commit-Position: refs/heads/master@{#8349}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8349 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
62f6e756730325ee7b20cf5f81e82b0a70283a05 11-Feb-2015 henrika@webrtc.org <henrika@webrtc.org> Refactoring WebRTC Java/JNI audio recording in C++ and Java.

This is a big refactoring of the existing C++/JNI/Java support for audio recording in native WebRTC:

- Removes unused code and old WEBRTC logging macros
- Now uses optimal sample rate and buffer size in Java AudioRecord (used hard-coded sample rate before)
- Makes code more inline with the implementation in Chrome
- Adds helper methods for JNI handling to improve readability
- Changes the threading model (high-prio audio thread now lives in Java-land and C++ only works as proxy)
- Adds basic thread checks
- Removes all locks in C++ land
- Removes all locks in Java
- Improves construction/destruction
- Additional cleanup

Tested using AppRTCDemo and WebRTCDemo APKs on N6, N5, N7, Samsung Galaxy S4 and
Samsung Galaxy S4 mini (which uses 44.1kHz as native sample rate).

BUG=NONE
R=magjed@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33969004

Cr-Commit-Position: refs/heads/master@{#8325}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8325 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
875c97ed9dc25a8eac8075a42742863aa1b45d3e 04-Feb-2015 tommi@webrtc.org <tommi@webrtc.org> Remove SetNotAlive method from the thread class.
Also cleaning up methods with the same name in other classes that are derived from the above method.

R=perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41759004

Cr-Commit-Position: refs/heads/master@{#8242}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8242 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
4161715e3f7e744bc9ef3d3ae437da1e8e4de38d 29-Jan-2015 tommi@webrtc.org <tommi@webrtc.org> Remove ChangeUniqueID.

This fixes a two year old TODO of deleting dead code :)
In cases where the _id or id_ member variable is being used for tracing,
I changed the member to at least be const.

It doesn't look like id's are that useful anymore so maybe the next step is to get rid of them.

BUG=
R=henrika@webrtc.org, perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/37849004

Cr-Commit-Position: refs/heads/master@{#8201}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8201 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
a954c07ee1c93175e6ebbeb20517b347474362ae 09-Dec-2014 henrika@webrtc.org <henrika@webrtc.org> AppRTCDemo (Android): built-in AEC should be enabled if device supports it and in combination with Java-based audio layer

BUG=4034
R=andrew@webrtc.org, perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/32179004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7849 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
c7c432aa9b8c9f9ba6d41554917784a27b21426a 02-Apr-2014 andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Remove AudioDevice::{Microphone,Speaker}IsAvailable.

This was only used for logging, except on Mac, where the methods are
now private.

BUG=3132
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/10959004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5831 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
573a1b45b5b7638605d9727be57c73e838d6ee45 10-Jan-2014 henrike@webrtc.org <henrike@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Android: Fixes crash when exiting WebRTCDemo.

BUG=2738
R=fischman@webrtc.org, niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6179004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5365 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc
9ee75e9c77b467e74e470905822d0279b0e8a639 11-Dec-2013 henrike@webrtc.org <henrike@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Enables mixing and matching Java and native audio. It is used for getting best of both worlds capabilities (AEC and low latency).

BUG=N/A
R=fischman@webrtc.org, niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4189004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5270 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_record_jni.cc