History log of /external/webrtc/webrtc/modules/audio_device/android/audio_track_jni.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ff761fba8274d93bd73e76c8b8a1f2d0776dd840 04-Nov-2015 Henrik Kjellander <kjellander@webrtc.org> modules: more interface -> include renames

This changes the following module directories:
* webrtc/modules/audio_conference_mixer/interface
* webrtc/modules/interface
* webrtc/modules/media_file/interface
* webrtc/modules/rtp_rtcp/interface
* webrtc/modules/utility/interface

To avoid breaking downstream, I followed this recipe:
1. Copy the interface dir to a new sibling directory: include
2. Update the header guards in the include directory to match the style guide.
3. Update the header guards in the interface directory to match the ones in include. This is required to avoid getting redefinitions in the not-yet-updated downstream code.
4. Add a pragma warning in the header files in the interface dir. Example:
#pragma message("WARNING: webrtc/modules/interface is DEPRECATED; "
"use webrtc/modules/include")
5. Search for all source references to webrtc/modules/interface and update them to webrtc/modules/include (*.c*,*.h,*.mm,*.S)
6. Update all GYP+GN files. This required manual inspection since many subdirectories of webrtc/modules referenced the interface dir using ../interface etc(*.gyp*,*.gn*)

BUG=5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel -m tryserver.webrtc

R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10500}
/external/webrtc/webrtc/modules/audio_device/android/audio_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
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_track_jni.h
f6acf98a46ec62ee97a51a1549933c0783ea4355 20-Dec-2013 andresp@webrtc.org <andresp@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> Fix the android clang bot for compiling with thread annotations.

TBR=niklas.enbom@webrtc.org
R=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5330 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_track_jni.h
179908c81c48076b680559aa1810a593c3383acd 18-Dec-2013 fischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> JNI Audio: remove dead members.

BUG=2735
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5312 4adac7df-926f-26a2-2b94-8c16560cd09d
/external/webrtc/webrtc/modules/audio_device/android/audio_track_jni.h
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_track_jni.h