Commit Graph

19 Commits

Author SHA1 Message Date
ba35d05a49 Cleanup of iOS AudioDevice implementation
TBR=tkchin
BUG=webrtc:4789
TEST=modules_unittests --gtest_filter=AudioDeviceTest* and AppRTCDemo

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

Cr-Commit-Position: refs/heads/master@{#9578}
2015-07-14 15:04:19 +00:00
68898a2652 Remove AudioDeviceUtility.
The class doesn't do anything in almost all cases except for grabbing and releasing locks + allocate memory.  There are a couple of methods there such as WaitForKey and GetTimeInMs that are used, but those methods aren't specific to audio and we have implementations of these elsewhere.  The third method, StringCompare isn't used anywhere (and also isn't specific to audio).

BUG=
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9220}
2015-05-19 15:27:50 +00:00
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
474d1eb223 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
2015-03-09 12:40:43 +00:00
4161715e3f 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
2015-01-29 12:14:13 +00:00
0b1534c52e Use int64_t for milliseconds more often, primarily for TimeUntilNextProcess.
This fixes a variety of MSVC warnings about value truncations when implicitly
storing the 64-bit values we get back from e.g. TimeTicks in 32-bit objects, and
removes the need for a number of explicit casts.

This also moves a number of constants so they're declared right where they're used, which is easier to read and maintain, and makes some of them of integral type rather than using the "enum hack".

BUG=chromium:81439
TEST=none
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7905 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-15 22:09:40 +00:00
a954c07ee1 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
2014-12-09 16:22:09 +00:00
8a2c84f59d Log the Android Audio API choice correctly.
BUG=3699
TEST=Manual Test
R=henrike@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6915 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-18 03:02:42 +00:00
122caa51b1 After an audio interruption the audio unit no longer invokes its render callback, which results in a loss of audio. Restarting the audio unit post interruption fixes the issue.
CL also replaces deprecated AudioSession calls with equivalent AVAudioSession ones.

BUG=3487
R=glaznev@webrtc.org, noahric@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6697 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-15 20:20:47 +00:00
8454ad1b3e Reland: Making WebRTC able to play and record audio to files for tests.
By specifying the define WEBRTC_DUMMY_FILE_DEVICES (which is similar to
WEBRTC_DUMMY_AUDIO_BUILD) an application will be able to tell WebRTC to
play out audio to a file and feed audio in from a file. We want to do
so we can better test WebRTC-using applications by recording what the
audio stack outputs and feeding known audio in for quality tests.

R=henrika@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6403 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-11 14:12:04 +00:00
e08a11c4a1 Revert 6395 "Making WebRTC able to play and record audio to file..."
> Making WebRTC able to play and record audio to files for tests.
> 
> By specifying the define WEBRTC_DUMMY_FILE_DEVICES (which is similar to
> WEBRTC_DUMMY_AUDIO_BUILD) an application will be able to tell WebRTC to
> play out audio to a file and feed audio in from a file. We want to do
> so we can better test WebRTC-using applications by recording what the
> audio stack outputs and feeding known audio in for quality tests.
> 
> R=henrika@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/20609004

TBR=phoglund@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6396 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-11 10:40:30 +00:00
fa042ca15d Making WebRTC able to play and record audio to files for tests.
By specifying the define WEBRTC_DUMMY_FILE_DEVICES (which is similar to
WEBRTC_DUMMY_AUDIO_BUILD) an application will be able to tell WebRTC to
play out audio to a file and feed audio in from a file. We want to do
so we can better test WebRTC-using applications by recording what the
audio stack outputs and feeding known audio in for quality tests.

R=henrika@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6395 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-11 09:57:23 +00:00
c7c432aa9b 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
2014-04-02 16:49:26 +00:00
0e65fdaa3b Fix "unreachable code" warnings (MSVC warning 4702) in webrtc.
BUG=chromium:346399
TEST=none
R=tommi@webrtc.org

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

Patch from Peter Kasting <pkasting@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5747 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-21 10:26:42 +00:00
9ee75e9c77 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
2013-12-11 21:42:44 +00:00
7ae8495779 Removed unnecessary Pulse init from VoE startup.
Saves 10% (~260ms) of the total PeerConnectionTest wallclock time.

R=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5254 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-10 21:01:34 +00:00
811269df40 Include files from webrtc/.. paths in audio_device/.
BUG=1662
R=xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4330 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-11 13:24:38 +00:00
2550988baa WebRtc_Word32 -> int32_t in audio_device/
BUG=314

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3793 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 10:30:35 +00:00
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00