Commit Graph

85 Commits

Author SHA1 Message Date
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
de6adbe0ba Remove non-ARC code from the codebase.
BUG=webrtc:7198

Review-Url: https://codereview.webrtc.org/2702153004
Cr-Commit-Position: refs/heads/master@{#16765}
2017-02-22 08:42:11 +00:00
1634e16042 Remove use of selectors matching Apple private API names.
This was causing some apps that include WebRTC to be rejected from the
app store.

BUG=webrtc:6382

Review-Url: https://codereview.webrtc.org/2679913002
Cr-Commit-Position: refs/heads/master@{#16462}
2017-02-07 10:48:55 +00:00
f3d622d4ad Revert of Disabled two iOS tests due to bot breakage. Affected tests are (patchset #1 id:1 of https://codereview.webrtc.org/2652423002/ )
Reason for revert:
This was false alarm. The next Chromium roll fixed the problem and the bot has been green for 3 builds.

Original issue's description:
> Disabled two iOS tests due to bot breakage. Affected tests are
> AudioDeviceTest.RunPlayoutWithFileAsSource and
> AudioDeviceTest.StartStopRecording
>
> NOTRY=True
> TBR=henrika@webrtc.org
> BUG=7056
>
> Review-Url: https://codereview.webrtc.org/2652423002
> Cr-Commit-Position: refs/heads/master@{#16286}
> Committed: 8e775e16eb

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

Review-Url: https://codereview.webrtc.org/2656533005
Cr-Commit-Position: refs/heads/master@{#16289}
2017-01-26 09:50:46 +00:00
8e775e16eb Disabled two iOS tests due to bot breakage. Affected tests are
AudioDeviceTest.RunPlayoutWithFileAsSource and
AudioDeviceTest.StartStopRecording

NOTRY=True
TBR=henrika@webrtc.org
BUG=7056

Review-Url: https://codereview.webrtc.org/2652423002
Cr-Commit-Position: refs/heads/master@{#16286}
2017-01-26 09:06:05 +00:00
526248779a Disables AudioDeviceTest.StartStopPlayout on iOS
BUG=webrtc:6889
NOTRY=True

Review-Url: https://codereview.webrtc.org/2595303002
Cr-Commit-Position: refs/heads/master@{#15753}
2016-12-22 09:36:49 +00:00
beafee3009 Move ios_helpers to sdk folder
BUG=webrtc:5582

Review-Url: https://codereview.webrtc.org/2572743004
Cr-Commit-Position: refs/heads/master@{#15649}
2016-12-16 10:12:42 +00:00
a5073c0c97 Disable AudioDeviceTest.StartPlayoutOnTwoInstances on iOS
This test fails when running on real iOS devices.

BUG=webrtc:6889
TBR=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2576653002 .
Cr-Commit-Position: refs/heads/master@{#15586}
2016-12-14 06:25:24 +00:00
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
5de9b6a3ec Move helpers_ios.cc/.h
- Out from modules/utility/ and into modules/audio_device/ios/ - there they are used.

BUG=none

Review-Url: https://codereview.webrtc.org/2526273002
Cr-Commit-Position: refs/heads/master@{#15236}
2016-11-25 08:47:12 +00:00
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
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
a84aa57799 Use std::abs instead of C-style abs.
BUG=webrtc:6486

Review-Url: https://codereview.webrtc.org/2396823002
Cr-Commit-Position: refs/heads/master@{#14536}
2016-10-06 02:19:30 +00:00
5fa51e2947 Add iOS static library GN build script.
NOTRY=True

BUG=webrtc:6372

Review-Url: https://codereview.webrtc.org/2391123002
Cr-Commit-Position: refs/heads/master@{#14532}
2016-10-05 20:16:07 +00:00
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
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
f1363fdf57 Adds support for AVAudioSessionSilenceSecondaryAudioHintNotification on iOS
BUG=b/30944297
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2366753005
Cr-Commit-Position: refs/heads/master@{#14398}
2016-09-27 13:06:48 +00:00
dda366611e Fixes minor issue in AudioDeviceTest.RunPlayoutAndRecordingInFullDuplex for iOS.
Followup on https://codereview.webrtc.org/2349263004/

BUG=NONE
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2362263002
Cr-Commit-Position: refs/heads/master@{#14374}
2016-09-23 15:42:49 +00:00
051d151569 Adds audio session status to logs for each valid audio route change on iOS
BUG=b/30944297
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2355393005
Cr-Commit-Position: refs/heads/master@{#14355}
2016-09-22 15:48:10 +00:00
c5aea65b76 Adds output audio volume to iOS logs
BUG=b/30944297
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2360583002
Cr-Commit-Position: refs/heads/master@{#14334}
2016-09-21 14:46:01 +00:00
17802ae258 Ensures that ADM for Android and iOS uses identical states when stopping audio
BUG=b/25975010
TBR=tkchin
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2349263004
Cr-Commit-Position: refs/heads/master@{#14328}
2016-09-21 11:55:10 +00:00
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
cd2553937e Increase audio buffer duration for iPhone 4s.
NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/2193573002
Cr-Commit-Position: refs/heads/master@{#13579}
2016-07-29 17:53:45 +00:00
93dd634561 Treat foreground event as interruption end.
NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/2181163005
Cr-Commit-Position: refs/heads/master@{#13543}
2016-07-27 17:17:19 +00:00
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
41ed7e1715 Avoid race when stopping audio unit on iOS
BUG=webrtc:5993
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13234}
2016-06-21 09:41:15 +00:00
86eff72eec Adds logging in combination with restart of audio unit
BUG=
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13233}
2016-06-21 09:26:57 +00:00
2d014be554 Resolves issue with bad audio using BT headsets on iOS.
BUG=webrtc:6004
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13165}
2016-06-16 12:27:06 +00:00
5d97a9a05b Adding more detail to MessageQueue::Dispatch logging.
Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

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

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

Cr-Commit-Position: refs/heads/master@{#13104}
2016-06-10 21:17:33 +00:00
080a1e3fa6 Fix iOS GN build and cleanup system_wrappers
Compile fixes for GN on iOS that finally gets our bots green.

Changes to system_wrappers:
* Updated to only use inclusive sources for maintainability
* Add a few missing GN headers.
* Cleanup GYP hack for atomic32_mac.cc
* Renamed changes sources to avoid problems with GYP/GN file
   suffix rules:
  - atomic32_mac.cc -> atomic32_darwin.cc
  - atomic32_posix.cc -> atomic32_non_darwin_unix.cc
See https://code.google.com/p/chromium/codesearch#chromium/src/build/config/BUILDCONFIG.gn&l=325
for details on which extensions can/cannot be used.

BUG=webrtc:5586
NOTRY=True

Review-Url: https://codereview.webrtc.org/1999723002
Cr-Commit-Position: refs/heads/master@{#12897}
2016-05-25 18:37:17 +00:00
d251196d37 Provide isAudioEnabled flag to control audio unit.
- Also removes async invoker usage in favor of thread posting

BUG=

Review-Url: https://codereview.webrtc.org/1945563003
Cr-Commit-Position: refs/heads/master@{#12651}
2016-05-07 01:54:21 +00:00
4adbbcfe7a Move ADM Create() method to public interface.
ADMs were previously created by CreateAudioDeviceModule which was
removed in previous refactoring without a replacement added.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12613}
2016-05-03 19:51:31 +00:00
9eeb6240c9 Build dynamic iOS SDK.
- Places most ObjC code into webrtc/sdk/objc instead.
- New gyp targets to build, strip and export symbols for dylib.
- Removes old script used to generate dylib.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12524}
2016-04-27 08:54:27 +00:00
efdd930dc9 Fix RTCAudioSession crash in removeDelegate.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12320}
2016-04-11 19:01:06 +00:00
307a0922c5 Support delayed AudioUnit initialization.
Applications can choose to decide when to give up control of the
AVAudioSession to WebRTC. Otherwise, behavior should be
unchanged.

Adds a toggle to AppRTCDemo so developers can see the different
paths.

BUG=
R=haysc@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12080}
2016-03-21 20:58:01 +00:00
1300caa3fe Refactor AudioUnit code into its own class.
BUG=
R=haysc@webrtc.org, henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12056}
2016-03-18 21:39:22 +00:00
e54467f73e Use RTCAudioSessionDelegateAdapter in AudioDeviceIOS.
Part 3 of refactor. Also:
- better weak pointer delegate storage + tests
- we now ignore route changes when we're interrupted
- fixed bug where preferred sample rate wasn't set if audio session
   wasn't active

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12007}
2016-03-15 23:54:11 +00:00
9f987d3200 Refactor AVAudioSession intialization code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11972}
2016-03-13 04:06:34 +00:00
0ce3bf9cc4 Fix lock behavior on RTCAudioSession.
In addition:
- Introduces RTCAudioSessionTest
- iOS/Mac gtests now have an autoreleasepool
- Moves ScopedAutoreleasePool to rtc_base_approved
- Introduces route change button in AppRTCDemo

BUG=webrtc:5649

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

Cr-Commit-Position: refs/heads/master@{#11971}
2016-03-13 00:52:13 +00:00
ab12c47160 Modifies SDK and iOS detection for helper method that needs iOS 9+
BUG=NONE
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11861}
2016-03-03 16:00:00 +00:00
3e60bf0ff3 Adds low complexity audio mode for single core CPUs
BUG=webrtc:5538
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11743}
2016-02-24 13:27:22 +00:00
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
b3fb71c101 Add RTCAudioSession proxy class.
BUG=
R=haysc@webrtc.org, henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11676}
2016-02-18 23:44:17 +00:00
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
30166cb1a8 iOS stability improvement for device switching, including BT devices
BUG=webrtc:5058

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

Cr-Commit-Position: refs/heads/master@{#11168}
2016-01-07 15:23:08 +00:00
46ea3ce580 AudioDeviceTest.StartPlayoutOnTwoInstances now verifies two active playing streams
TBR=tkchin_webrtc
BUG=b/25343768

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

Cr-Commit-Position: refs/heads/master@{#11165}
2016-01-07 14:03:07 +00:00
46ad5426b0 Revert of "Create rtc::AtomicInt POD struct." (patchset #3 id:40001 of https://codereview.webrtc.org/1498953002/ )
Reason for revert:
Broke downstream compile step, possibly relandable when using a MSVC version that has constexpr, other than that I'm out of ideas.

.../webrtc/base/atomicops.h:71:8: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const rtc::AtomicInt&'

Original issue's description:
> Reland of "Create rtc::AtomicInt POD struct."
>
> Relands https://codereview.webrtc.org/1420043008/ with brace initializers
> instead of constructors hoping that they won't introduce static
> initializers.
>
> BUG=
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/84f0970d100e67a1dc4fe9a1b16b7d293302044e
> Cr-Commit-Position: refs/heads/master@{#10920}

TBR=tommi@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10922}
2015-12-07 22:29:21 +00:00
84f0970d10 Reland of "Create rtc::AtomicInt POD struct."
Relands https://codereview.webrtc.org/1420043008/ with brace initializers
instead of constructors hoping that they won't introduce static
initializers.

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10920}
2015-12-07 22:07:11 +00:00
c729032b1b Resolves issue with multiple calls to audio unit initialization
BUG=webrtc:5166
R=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10865}
2015-12-02 09:46:57 +00:00
34911ad55c Improved error handling in iOS ADM to avoid race during init
BUG=webrtc:5166
R=pbos@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10728}
2015-11-20 14:47:18 +00:00