175 Commits

Author SHA1 Message Date
henrika
4b4d833c31 Avoid calling AudioEffect.queryEffects to avoid potential crash.
BUG=b/36713041
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2785113002
Cr-Commit-Position: refs/heads/master@{#17461}
2017-03-30 08:01:28 +00:00
henrika
b3ebc1aa59 Simplifies FineAudioBuffer by using rtc::Buffer
BUG=NONE

Review-Url: https://codereview.webrtc.org/2715963002
Cr-Commit-Position: refs/heads/master@{#16864}
2017-02-27 13:14:17 +00:00
sakal
cb789bb510 Remove NewApi lint suppression.
BUG=webrtc:6597

Review-Url: https://codereview.webrtc.org/2662273004
Cr-Commit-Position: refs/heads/master@{#16448}
2017-02-06 13:34:26 +00:00
henrika
4cb1b7546b Extends timer from 10 to 30 seconds for output volume check on Android.
The timer is only used for logging purposes and we can save CPU by
checking the volume less often.

BUG=webrtc:7096

Review-Url: https://codereview.webrtc.org/2669323003
Cr-Commit-Position: refs/heads/master@{#16430}
2017-02-03 11:39:47 +00:00
sakal
f7826d668a Remove InlinedApi lint ignore.
Adds ignore for all lint errors in Chromium code. Changes minimum SDK for
instrumentation tests to 16 from 14. Adds TargetApi annotations.

BUG=webrtc:6597

Review-Url: https://codereview.webrtc.org/2670473004
Cr-Commit-Position: refs/heads/master@{#16412}
2017-02-02 08:53:33 +00:00
Alex Glaznev
1a9e2108e3 Initial implementation of Android audio recording error handling.
BUG=b/34128648
R=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2620453004 .
Cr-Commit-Position: refs/heads/master@{#16017}
2017-01-11 21:00:01 +00:00
henrika
e8084706c3 Removes FATAL() from MicrophoneVolumeIsAvailable() on Android.
Trivial change that allows users to call MicrophoneVolumeIsAvailable()
(and get a valid result) on Android without crashing.

TBR=henrik.lundin
BUG=NONE

Review-Url: https://codereview.webrtc.org/2620243003
Cr-Commit-Position: refs/heads/master@{#16013}
2017-01-11 16:59:26 +00:00
henrika
ac8d5164f0 Improves release of allocated audio resources on Android.
BUG=webrtc:6890
R=magjed@webrtc.org, solenberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2574053003 .
Cr-Commit-Position: refs/heads/master@{#15637}
2016-12-15 14:43:10 +00:00
henrika
63e6a38745 Removes verification of audio parameters on Android
TBR=glaznev
BUG=webrtc:6890

Review-Url: https://codereview.webrtc.org/2572963003
Cr-Commit-Position: refs/heads/master@{#15599}
2016-12-14 10:53:31 +00:00
kwiberg
352444fcac RTC_[D]CHECK_op: Remove superfluous casts
There's no longer any need to make the two arguments have the same
signedness, so we can remove a bunch of superfluous (and sometimes
dangerous) casts.

It turned out I also had to fix the safe_cmp functions to properly handle
enums that are implicitly convertible to integers.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2534683002
Cr-Commit-Position: refs/heads/master@{#15281}
2016-11-28 23:59:03 +00:00
kwiberg
af476c737f RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
2016-11-28 23:21:51 +00:00
solenberg
71b9b58a3a Revert of Move ADM specific Android files into modules/audio_device/android/ (patchset #2 id:20001 of https://codereview.webrtc.org/2533573002/ )
Reason for revert:
Breaks downstream code

Original issue's description:
> Move ADM specific Android files into modules/audio_device/android/
>
> - Move helpers_android.* and jvm_android.* from modules/utility/.
>
> BUG=none
> TBR=perkj@webrtc.org
>
> Committed: https://crrev.com/e8d8a2bb9704beffed0780c7e0f3a9ef050ae97e
> Cr-Commit-Position: refs/heads/master@{#15253}

TBR=henrika@webrtc.org,perkj@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none

Review-Url: https://codereview.webrtc.org/2531893002
Cr-Commit-Position: refs/heads/master@{#15254}
2016-11-25 19:45:12 +00:00
solenberg
e8d8a2bb97 Move ADM specific Android files into modules/audio_device/android/
- Move helpers_android.* and jvm_android.* from modules/utility/.

BUG=none
TBR=perkj@webrtc.org

Review-Url: https://codereview.webrtc.org/2533573002
Cr-Commit-Position: refs/heads/master@{#15253}
2016-11-25 19:34:25 +00:00
ehmaldonado
37a2111d7c Increase the threshold for RunPlayoutAndRecordingInFullDuplex. Again.
RunPlayoutAndRecordingInFullDuplex fails sometimes on Android swarming
bots, presumably because the timing is hardware dependent.

This test ensures that audio starts pumping. The exact performance is
not that important.

R=kjellander@webrtc.org, henrika@webrtc.org
BUG=webrtc:6464
NOTRY=True

Review-Url: https://codereview.webrtc.org/2525943003
Cr-Commit-Position: refs/heads/master@{#15223}
2016-11-24 11:13:24 +00:00
henrika
817208b50b Re-enables AudioDeviceTest.StartStopPlayout on Android
BUG=webrtc:5046

Review-Url: https://codereview.webrtc.org/2517383006
Cr-Commit-Position: refs/heads/master@{#15213}
2016-11-23 14:49:48 +00:00
henrika
779017d989 Adds stereo support for Java-based input and output audio on Android
BUG=webrtc:6718

Review-Url: https://codereview.webrtc.org/2499613002
Cr-Commit-Position: refs/heads/master@{#15104}
2016-11-16 14:30:50 +00:00
henrika
92fd8e6b17 Removes usage of system_wrappers/include/clock.h in audio_device/
BUG=webrtc:6687
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2501603002
Cr-Commit-Position: refs/heads/master@{#15084}
2016-11-15 13:38:02 +00:00
aleloi
5de52fd38e Created a mocked AudioTransport.
There are currently two nearly identical classes called
MockAudioTransport defined in two unit tests:
android/audio_transport_unittest.cc and
/ios/audio_transport_unittest_ios.cc

This change defines a common mocked AudioTransport. The two current
mocks are rewritten to use the common one. A GN target is created for
this mock and MockAudioDevice.

This change will allow to provide a mocked AudioTransport to
AudioState in a dependent CL https://codereview.webrtc.org/2454373002/

BUG=webrtc:6346
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2493483002
Cr-Commit-Position: refs/heads/master@{#15010}
2016-11-10 09:05:39 +00:00
henrika
fe90b4176c Improves audio logs of native audio layers on Android
BUG=webrtc:6592,webrtc:6580

Review-Url: https://codereview.webrtc.org/2447683002
Cr-Commit-Position: refs/heads/master@{#14798}
2016-10-27 08:42:19 +00:00
henrika
722b0dc108 Revert of Android audio playout now supports non-call media streams (patchset #3 id:10004 of https://codereview.webrtc.org/2411263003/ )
Reason for revert:
There is a risk of ending up in a bad state due to race conditions with this patch. Tests in downstream clients have shown that it can
happen that an output stream is opened up in MUSIC mode when it should not.

Reverting since the new functionality added here is not worth the
risk of breaking existing clients.

Original issue's description:
> Android audio playout now supports non-call media streams.
>
> The default (preferred) stream type for output audio is STREAM_VOICE_CALL since the WebRTC stack is mainly intended for VoIP calls. But if the user wants to run in another mode than COMM mode, we now accept it and change the stream type to STREAM_MUSIC instead. It can e.g. be suitable for applications that does not record audio or if a call shall be casted to a Chromecast device.
>
> The solution is somewhat experimental.
>
> NOTRY=TRUE
>
> BUG=webrtc:4767
>
> Committed: https://crrev.com/872f614111f436d15e29516ce19c3b63d25b8639
> Cr-Commit-Position: refs/heads/master@{#14613}

TBR=henrik.lundin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4767

Review-Url: https://codereview.webrtc.org/2420583002
Cr-Commit-Position: refs/heads/master@{#14626}
2016-10-13 08:12:37 +00:00
henrika
872f614111 Android audio playout now supports non-call media streams.
The default (preferred) stream type for output audio is STREAM_VOICE_CALL since the WebRTC stack is mainly intended for VoIP calls. But if the user wants to run in another mode than COMM mode, we now accept it and change the stream type to STREAM_MUSIC instead. It can e.g. be suitable for applications that does not record audio or if a call shall be casted to a Chromecast device.

The solution is somewhat experimental.

NOTRY=TRUE

BUG=webrtc:4767

Review-Url: https://codereview.webrtc.org/2411263003
Cr-Commit-Position: refs/heads/master@{#14613}
2016-10-12 15:11:48 +00:00
henrika
14acf658ad AudioTransport::NeedMorePlayData is no longer called from different threads using OpenSL ES on Android
BUG=webrtc:6476
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2410033002
Cr-Commit-Position: refs/heads/master@{#14599}
2016-10-11 13:15:44 +00:00
henrika
defc21e0aa Removes usage of hardware AGC and any related APIs on Android.
Compromise solution where WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl() is marked
as deprecated and where as many APIs as possible that touches the HW AGC are removed. Some basic architecture is saved to ensure that we can restore usage of
the HW AGC if ever required for future devices.

The AppRTCMobile demo does still contain an AGC check box but it is now grayed out.

BUG=b/30387905

Review-Url: https://codereview.webrtc.org/2402883003
Cr-Commit-Position: refs/heads/master@{#14596}
2016-10-11 08:29:16 +00:00
kwiberg
5377bc77cc Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

This is a re-land of https://codereview.webrtc.org/2384693002, which
broke Chromium. We re-land without changing this CL at all, because
the thing that needed fixing was in Chromium:
https://codereview.chromium.org/2384263004.

NOTRY=true
TBR=ossu@webrtc.org
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2389943003
Cr-Commit-Position: refs/heads/master@{#14508}
2016-10-04 20:47:02 +00:00
ehmaldonado
ebb0b8ec9a Increase the threshold for RunPlayoutAndRecordingInFullDuplex.
RunPlayoutAndRecordingInFullDuplex fails sometimes on Android swarming
bots, presumably because the timing is hardware dependent.

This test ensures that audio starts pumping. The exact performance is
not that important.

R=kjellander@webrtc.org, henrika@webrtc.org
BUG=webrtc:6464
NOTRY=True

Review-Url: https://codereview.webrtc.org/2391563002
Cr-Commit-Position: refs/heads/master@{#14492}
2016-10-04 08:59:05 +00:00
guidou
8f9010631c Revert of Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere (patchset #2 id:20001 of https://codereview.webrtc.org/2384693002/ )
Reason for revert:
This CL breaks FYI bots with a compile error.

Sample error:
jingle/glue/thread_wrapper.cc -o obj/jingle/jingle_glue/thread_wrapper.o
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:46:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<rtc::Thread *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(rtc::Thread::Current(), current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:102:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = rtc::Thread *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:81:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, jingle_glue::JingleThreadWrapper *>' requested here
  DCHECK_EQ(this, JingleThreadWrapper::current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:5:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = jingle_glue::JingleThreadWrapper *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
In file included from ../../jingle/glue/thread_wrapper.cc:5:
In file included from ../../jingle/glue/thread_wrapper.h:16:
In file included from ../../base/message_loop/message_loop.h:17:
In file included from ../../base/memory/ref_counted.h:19:
../../base/logging.h:598:1: error: call to 'MakeCheckOpString' is ambiguous
DEFINE_CHECK_OP_IMPL(EQ, ==)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/logging.h:592:17: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
    else return MakeCheckOpString(v1, v2, names); \
                ^~~~~~~~~~~~~~~~~
../../jingle/glue/thread_wrapper.cc:82:3: note: in instantiation of function template specialization 'logging::CheckEQImpl<jingle_glue::JingleThreadWrapper *, rtc::Thread *>' requested here
  DCHECK_EQ(this, rtc::Thread::Current());
  ^
../../base/logging.h:748:31: note: expanded from macro 'DCHECK_EQ'
#define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
                              ^
../../base/logging.h:721:18: note: expanded from macro 'DCHECK_OP'
      ::logging::Check##name##Impl((val1), (val2),                     \
                 ^
<scratch space>:12:1: note: expanded from here
CheckEQImpl
^
../../base/logging.h:555:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
../../third_party/webrtc/base/checks.h:122:14: note: candidate function [with t1 = jingle_glue::JingleThreadWrapper *, t2 = rtc::Thread *]
std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
             ^
3 errors generated.

Original issue's description:
> Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
>
> The former is always defined (by webrtc/base/checks.h) to either 0 or
> 1, whereas the latter isn't necessarily defined.
>
> NOTRY=true
> BUG=webrtc:6451
>
> Committed: https://crrev.com/ab0b929321d37669165d5795268fa10a8c97ec5b
> Cr-Commit-Position: refs/heads/master@{#14474}

TBR=ossu@webrtc.org,kwiberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2384083004
Cr-Commit-Position: refs/heads/master@{#14480}
2016-10-03 15:32:36 +00:00
kwiberg
ab0b929321 Test RTC_DCHECK_IS_ON instead of checking DCHECK_ALWAYS_ON everywhere
The former is always defined (by webrtc/base/checks.h) to either 0 or
1, whereas the latter isn't necessarily defined.

NOTRY=true
BUG=webrtc:6451

Review-Url: https://codereview.webrtc.org/2384693002
Cr-Commit-Position: refs/heads/master@{#14474}
2016-10-03 12:04:25 +00:00
kwiberg
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
sakal
b6760f9e44 Format all Java in WebRTC.
BUG=webrtc:6419
TBR=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2377003002
Cr-Commit-Position: refs/heads/master@{#14432}
2016-09-29 11:12:51 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
henrika
0a52c7003d THis CL enables possibility to select full-duplex OpenSL ES audio in AppRTCDemo, i.e., it adds support for OpenSL ES for input as well. The user must explicitly select this new mode in the debug UI hence it is not the default selection. There is no separate UI for input and output; instead both are enabled/disabled by the same switch.
BUG=webrtc:5925
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14390}
2016-09-27 07:35:37 +00:00
henrika
918b554789 Adds support for OpenSL ES based audio capture on Android.
NOTE: the new code is disabled by default in the WebRtcAudioManager to ensure that
OpenSL ES is not accidentally activated in existing clients. There are still some
unresolved issues to sort out before it can be utilized.

Enables possibility to use OpenSL ES based audio in both directions for WebRTC.
All unit tests and demo clients have been tested with the new implementation but
the new support is behind a flag (see above).

More testing is needed before it can be used in the field and additional support for
hardware effects is still missing.

BUG=webrtc:5925
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14290}
2016-09-19 13:44:22 +00:00
henrika
0f8ea0da53 Avoids crash in WebRtcAudioTrack.initPlayout (part II)
I had reversed a condition in https://codereview.webrtc.org/2315363004/ and we always failed. Fixing that here.

TBR=magjed

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

Cr-Commit-Position: refs/heads/master@{#14136}
2016-09-08 14:11:47 +00:00
henrika
2c993ce505 Avoids crash in WebRtcAudioTrack.initPlayout
BUG=NONE
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14129}
2016-09-08 11:36:41 +00:00
henrika
6bf62f7ac5 Avoids java.lang.NullPointerException in WebRtcAudioRecord
BUG=NONE

Review-Url: https://codereview.webrtc.org/2276973003
Cr-Commit-Position: refs/heads/master@{#13922}
2016-08-25 12:16:34 +00:00
magjed
235020dba6 Roll chromium_revision 915e47250f..e3860bd297 (412201:412289)
Change log: 915e47250f..e3860bd297
Full diff: 915e47250f..e3860bd297

No dependencies changed.
No update to Clang.

NOTRY=TRUE
TBR=
BUG=webrtc:6219

Review-Url: https://codereview.webrtc.org/2253973002
Cr-Commit-Position: refs/heads/master@{#13809}
2016-08-18 08:45:53 +00:00
henrika
4a42900540 Removes redundant log warning in WebRtcAudioManager.
Trivial patch which avoids logs that are of no value.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2250403002
Cr-Commit-Position: refs/heads/master@{#13799}
2016-08-17 15:43:59 +00:00
noahric
3473288296 Remove VERBOSE logs in (android) audio device code.
When playing out, for example, you'd see 3 lines for every call to
PlayoutDelay, which happens quite often (every sample?).

The ones around the Playout/Recording Warning/Error are only once a
second, but they don't seem to add anything. Same with
Process/TimeUntilNextProcess, which just log that the method is called.

BUG=

Review-Url: https://codereview.webrtc.org/2202243004
Cr-Commit-Position: refs/heads/master@{#13763}
2016-08-15 20:41:28 +00:00
maxmorin
1aee0b5bd9 Remove old methods in AudioTransport, make it pass a gn build
when building with default warnings.

This is in preparation for making a gn target for audio_device_tests.

BUG=webrtc:6170, webrtc:163
NOTRY=True

Review-Url: https://codereview.webrtc.org/2219653004
Cr-Commit-Position: refs/heads/master@{#13759}
2016-08-15 18:46:28 +00:00
Sami Kalliomaki
d3235f0cd9 Re-order and remove unused Java imports.
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13608}
2016-08-02 13:44:19 +00:00
henrika
c62ff86023 Adds periodic volume-level logging for Android.
The goal of this change is to log the volume level for the
current audio stream so we can keep track of what volume the
user selects during a call.

BUG=b/30376577
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13555}
2016-07-28 13:46:32 +00:00
Max Morin
2c332bb682 Simplify logging statements.
BUG=NONE
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13375}
2016-07-04 07:03:54 +00:00
Max Morin
84cab205f5 UMA log for audio_device Init and Start(Playout|Recording). Make Init return a more specific error code, if possible.
BUG=webrtc:5761
R=asapersson@webrtc.org, henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13361}
2016-07-01 11:35:31 +00:00
Max Morin
098e6c5d0a Logging and tracing of audio devices on Andriod.
Replaced invokations of WEBRTC_TRACE with LOG, which is
visible in the android system log.

BUG=NONE
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13308}
2016-06-28 07:36:39 +00:00
skvlad
880ffeb6c0 Optimize the repeated calls to AudioEffect.queryEffects() on Android
This CL eliminates repeated calls to AudioEffect.queryEffects() on Android when configuring the audio device. Each of these calls was taking 5-10 milliseconds on the devices I was testing (Nexus 4, Nexus 5), and setting up the audio device involved around 10 of these calls.

This change adds a method that checks the cached list of effects before calling the underlying operating system API; this eliminated about half of these calls. The other half happened inside static methods such as NoiseSuppressor.isAvailable(), which are just convenience wrappers for searching through the list of effects. These calls have been replaced with searching through the cached list of effects, reducing the time to configure audio processing effects from 60-80 ms to 5-10. This results in a similar improvement in call setup time.

BUG=

Review-Url: https://codereview.webrtc.org/2051323002
Cr-Commit-Position: refs/heads/master@{#13115}
2016-06-13 19:05:30 +00:00
Alex Glaznev
c88f558135 Fix Android audio playback mute.
TBR=henrika@webrtc.org

BUG=b/29066336

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

Cr-Commit-Position: refs/heads/master@{#13051}
2016-06-06 17:33:55 +00:00
Alex Glaznev
080be51294 Make WebRTCAudioTrack class public.
To access its public API.

TBR=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13044}
2016-06-03 22:33:39 +00:00
henrika
b50e84509f Adds WebRtcAudioTrack.setSpeakerMute() API
BUG=NONE

Review-Url: https://codereview.webrtc.org/2025423003
Cr-Commit-Position: refs/heads/master@{#13029}
2016-06-03 09:56:26 +00:00
henrika
521f7a8db7 Moves ownership of OpenSL engine object to Android audio manager with the goal of adding support for OpenSL ES based audio capture.
BUG=webrtc:5925

Review-Url: https://codereview.webrtc.org/2019223004
Cr-Commit-Position: refs/heads/master@{#12975}
2016-05-31 14:03:26 +00:00
henrika
1f0ad1085d Adds support for detection of pro-audio support on Android.
A new API is added which enables detection of support of pro-audio on
Android. This is part of a larger change and the new API is not used yet.
Most likely it will only be used for logging purposes.

BUG=webrtc:5925

Review-Url: https://codereview.webrtc.org/2015483002
Cr-Commit-Position: refs/heads/master@{#12890}
2016-05-25 12:15:19 +00:00