19 Commits

Author SHA1 Message Date
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
kwiberg
1c7fdd86eb Remove calls to ScopedToUnique and UniqueToScoped
They're just no-ops now, and will soon go away.

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12510}
2016-04-26 15:18:13 +00:00
kwiberg
f01633e667 Replace scoped_ptr with unique_ptr in webrtc/modules/audio_device/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11740}
2016-02-24 13:00:45 +00:00
Peter Kasting
6955870806 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}
2016-01-13 00:26:55 +00:00
kwiberg
0eb15ed7b8 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}
2015-12-17 11:04:24 +00:00
Henrik Kjellander
ff761fba82 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}
2015-11-04 07:32:04 +00:00
henrika
1ba936a807 Revert of Fix for "Android audio playout doesn't support non-call media stream" (patchset #3 id:40001 of https://codereview.webrtc.org/1419693004/ )
Reason for revert:
Causes issues on some phones, e.g. Sony mobiles.
See b/25385046 for details.

Original issue's description:
> Fix for "Android audio playout doesn't support non-call media stream"
>
> BUG=webrtc:4767
> R=magjed@webrtc.org
>
> Committed: https://crrev.com/6408174cdc4040528dd87ff7e5c76be91cdbafbe
> Cr-Commit-Position: refs/heads/master@{#10435}

TBR=magjed@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4767

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

Cr-Commit-Position: refs/heads/master@{#10492}
2015-11-03 12:28:03 +00:00
henrika
6408174cdc Fix for "Android audio playout doesn't support non-call media stream"
BUG=webrtc:4767
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10435}
2015-10-28 12:06:24 +00:00
henrika
c14f5ff60f 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}
2015-09-23 12:09:40 +00:00
henrikg
91d6edef35 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}
2015-09-17 07:24:51 +00:00
Peter Kasting
1380e266ff Convert some more things to size_t.
These changes stem from requests by Andrew on https://codereview.webrtc.org/1228823002/ to eliminate some "return -1"s and change to using asserts plus returning size_ts.  I then also converted the relevant connected bits.

This also cleans up a bunch of style issues, e.g. no spaces around operators.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, henrik.lundin@webrtc.org, niklas.enbom@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9813}
2015-08-29 00:31:15 +00:00
henrika
8a8971820b Exclude Nexus 6 from OpenSL ES usage
BUG=b/21485703
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9397}
2015-06-09 08:45:19 +00:00
henrika
fe55c38eff Removes automatic setting of COMM mode in WebRTC.
It is now up to the application to ensure that it is in COMM mode before any audio streaming is started.

BUG=b/21571563
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9383}
2015-06-05 09:46:02 +00:00
henrika
bf738d7130 Temporarily disabling OpenSL ES for playout.
TBR=tommi
BUG=b/21485703

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

Cr-Commit-Position: refs/heads/master@{#9329}
2015-05-29 09:42:52 +00:00
henrika
796e17237b 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}
2015-05-28 12:18:42 +00:00
henrika
b26198972c 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}
2015-05-18 14:49:04 +00:00
henrika
09bf1a169b Delays changing to COMMUNICATION mode until streaming starts.
Restores stored audio mode when all streaming stops.

TBR=glaznev
BUG=NONE
TEST=AppRTCDemo

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

Cr-Commit-Position: refs/heads/master@{#8970}
2015-04-10 09:46:54 +00:00
henrika
8324b525dc 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}
2015-03-27 09:56:35 +00:00