This is done by allowing implementations of AudioDeviceModule to
implement the GetStats() method. The default implementation returns
nullopt, in which case RTCAudioPlayoutStats will not be visible in the
stats.
Bug: webrtc:14653
Change-Id: I8e4aa6f1b8fcfa47a30f633d28a4013191752e20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290563
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39115}
This removes some code in the AudioDeviceWindowsCore::CoreAudioIsSupported function that was checking that every audio input and output device was functional. There are legitimate cases where some, or all, audio devices may not be accessible, and that was causing CoreAudioIsSupported to return false.
If CoreAudioIsSupported returns false, a subsequent RTC_CHECK call fails, which causes the entire app to exit.
After this change, the CoreAudioIsSupported() function simply checks if the Core Audio APIs are supported and no longer tries to do extra stuff unrelated to checking if the APIs are supported.
Note that Core Audio is actually supported in all versions of Windows after Windows XP. There were log messages in the code saying that if CoreAudioIsSupported() returns false, WebRTC will use the Wave Audio APIs instead. But this is no longer the case. The Wave Audio APIs would only be needed for Windows XP, and this code appears to have already been removed from WebRTC.
It is tempting to simply make CoreAudioIsSupported() do a "return true;" but for now I only removed the part of the logging messages that mentioned the Wave Audio APIs.
I understand that there is a new Audio Device Module (ADM) called WindowsCoreAudio2, which is now recommended for use by apps. Apps are supposed to instantiate WindowsCoreAudio2 and pass it in to WebRTC. When the app supplies its own ADM, CoreAudioIsSupported() does not get invoked, which avoids the bug. To help make it clearer that using WindowsCoreAudio2 is an acceptable solution, I am removing a comment that says that kWindowsCoreAudio2 is "experimental".
Bug: webrtc:11081
Change-Id: I7ed1684a276799f4c83006b45629e48814f0b18b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161463
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30025}
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.
More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.
Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
Second round of the new Windows ADM is now ready for review. Main
changes are:
Supports internal (automatic) restart of audio streams when an active
audio stream disconnects (happens when a device is removed).
Adds support for IAudioClient3 and IAudioClient2 for platforms which
supports it (>Win8 and >Win10).
Modifies the threading model to support restart "from the inside" on
the native audio thread.
Adds two new test methods for the ADM to emulate restart events or
stream-switch events.
Adds two new test methods to support rate conversion to ensure that
audio can be tested in loopback even if devices runs at different
sample rates.
Added initial components for low-latency support. Verified that it works
but disabled it with a flag for now.
Bug: webrtc:9265
Change-Id: Ia8e577daabea6b433f2c2eabab4e46ce8added6a
Reviewed-on: https://webrtc-review.googlesource.com/86020
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24578}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
Summary of what this CL does:
Existing users can keep using the old ADM for Windows as before.
A new ADM for Windows is created and a dedicated factory method is used
to create it. The old way (using AudioDeviceImpl) is not utilized.
The new ADM is based on a structure where most of the "action" takes
place in new AudioInput/AudioOutput implementations. This is inline
with our mobile platforms and also makes it easier to break out common
parts into a base class.
The AudioDevice unittest has always mainly focused on the "Start/Stop"-
parts of the ADM and not the complete ADM interface. This new ADM supports
all tests in AudioDeviceTest and is therefore tested in combination with
the old version. A value-parametrized test us added for Windows builds.
Improved readability, threading model and makes the code easier to maintain.
Uses the previously landed methods in webrtc::webrtc_win::core_audio_utility.
Bug: webrtc:9265
Change-Id: If2894b44528e74a181cf7ad1216f57386ee3a24d
Reviewed-on: https://webrtc-review.googlesource.com/78060
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23554}
Usage of these APIs are now removed in Chrome as well.
TBR=solenberg
Bug: webrtc:7306
Change-Id: Id20e67bb2ba4e0bad1dd152030e4085631939d6a
Reviewed-on: https://webrtc-review.googlesource.com/36080
Reviewed-by: Henrik Andreassson (OOO until Jan 2) <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson (OOO until Jan 2) <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21424}
Usage should now be removed and this change can be relanded.
It was reverted here: https://webrtc-review.googlesource.com/c/src/+/27200
NOTRY=TRUE
TBR=solenberg
Bug: webrtc:7306
Change-Id: I5191263e6cfd48952b59ff8f9af2e59c3e9eadef
Reviewed-on: https://webrtc-review.googlesource.com/29682
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21080}
This reverts commit 94f3930106.
Reason for revert: Broke internal builds
Original change's description:
> Removes deprecated ADM APIs (reland).
>
> Usage should now be removed and this change can be relanded.
> It was reverted here: https://webrtc-review.googlesource.com/c/src/+/25320
>
> TBR=solenberg
>
> Bug: webrtc:7306
> Change-Id: I1afea773eff51bf5ec80711f0d7753ac0b7be77b
> Reviewed-on: https://webrtc-review.googlesource.com/27000
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20936}
TBR=henrika@webrtc.org
Change-Id: If91ff815fa69f7c36b0531e295f553a8c4a95590
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7306
Reviewed-on: https://webrtc-review.googlesource.com/27221
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20944}
Usage should now be removed and this change can be relanded.
It was reverted here: https://webrtc-review.googlesource.com/c/src/+/25320
TBR=solenberg
Bug: webrtc:7306
Change-Id: I1afea773eff51bf5ec80711f0d7753ac0b7be77b
Reviewed-on: https://webrtc-review.googlesource.com/27000
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20936}
Final stage since these APIs are no longer used in Chrome.
Bug: webrtc:7306
Change-Id: Ia116671bc888daa75c4105ad1ebeb21833f5d090
Reviewed-on: https://webrtc-review.googlesource.com/25220
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20836}
int32_t SetLoudspeakerStatus(bool enable)
int32_t GetLoudspeakerStatus(bool* enabled) const
These APIs are only implemented on iOS and they do not belong in the
native audio layer since the client can achieve the same functionality
by using the shared audio session in sdk/objc/Framework/Headers/WebRTC/RTCAudioSession.h.
It also gives the client a better flexibility in how the audio routing is done.
Bug: webrtc:7306
Change-Id: I853e2f57e0f5ae0a0f9fc4729ce961d81f92588b
Reviewed-on: https://webrtc-review.googlesource.com/23740
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20721}
This is a reland of 34cdd2d402
Original change's description:
> Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
>
> (Re-upload of https://codereview.webrtc.org/3020493002/)
>
> Bug: webrtc:4690, webrtc:7306
> Change-Id: I67fb9ebca1296aabc08eae8a292a5c69832dc35e
> Reviewed-on: https://webrtc-review.googlesource.com/5360
> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20083}
Bug: webrtc:4690, webrtc:7306
Change-Id: Ib019439fe6ab0e6b759819e1e9bd320ba1d983bd
Reviewed-on: https://webrtc-review.googlesource.com/6300
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20137}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_device/include/audio_device.h (Browse further)