We use ArrayView in our public API, so its header should be in
webrtc/api/.
BUG=none
Review-Url: https://codereview.webrtc.org/3007763002
Cr-Commit-Position: refs/heads/master@{#19658}
Will remove default implementations as well once landed and removed
in Chrome as well.
These two AudioDeviceModule APIs are removed:
int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight)
int32_t WaveOutVolume(uint16_t* volumeLeft, uint16_t* volumeRight) const
BUG=webrtc:7306
Review-Url: https://codereview.webrtc.org/3006793002
Cr-Commit-Position: refs/heads/master@{#19581}
Cleanup CL. Start using new AudioRecord.Builder class for creating
AudioRecord Java instances. Exists from API 23.
BUG=webrtc:7962
Review-Url: https://codereview.webrtc.org/3007673002
Cr-Commit-Position: refs/heads/master@{#19571}
Example of new stop sequence:
PID TID
5155 5189 I WebRtcAudioTrack: stopPlayout
5155 5189 I WebRtcAudioTrack: underrun count: 0
5155 5189 I WebRtcAudioTrack: stopThread
5155 5189 I WebRtcAudioTrack: Stopping the AudioTrackThread...
5155 5236 I WebRtcAudioTrack: Stopping and flushing the audio track...
5155 5236 I WebRtcAudioTrack: The audio track has now been stopped.
5155 5189 I WebRtcAudioTrack: AudioTrackThread has now been stopped.
5155 5189 I WebRtcAudioTrack: releaseAudioResources
BUG=b/64692432
Review-Url: https://codereview.webrtc.org/3001703002
Cr-Commit-Position: refs/heads/master@{#19370}
We're encountering a bug where audioRecord.read() can hang for long
enough that stopRecording() fails to join the recording thread (in two
seconds) and returns. In that case, JNI methods get unregistered and
when the recording thread calls nativeDataIsRecorded, it crashes when
it can't find the native method to call.
This version still isn't 100% safe, as the threading sequence still
technically allows for an ordering where (for some reason) the thread
fails to join after the final keepAlive check and long enough for all
the JNI methods to get unregistered, but that seems very unlikely.
BUG=b/64174142
Change-Id: Ie7432a70d0e53bace0885edf35e24bd3f6585399
Reviewed-on: https://chromium-review.googlesource.com/613501
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Commit-Queue: Noah Richards <noahric@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19358}
Given the current state of OpenSLES (disabled in many places), making
this a debug line makes more sense than an error.
BUG=none
Change-Id: I16d46d3f8234ebeffe820d92e7a6d7ed3eae11cd
Reviewed-on: https://chromium-review.googlesource.com/611491
Commit-Queue: Henrik Andreasson <henrika@webrtc.org>
Reviewed-by: Henrik Andreasson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19340}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.
BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}
This change:
Reduces complexity for audio playout by removing a redundant memcopy in the output audio path.
Adds support for iOS simulator for playout since we now allow the audio layer to ask for different sizes
of audio buffers at each callback. Real iOS devices always asks for the same size, simulators does not.
This change comes without any new cost for real devices.
BUG=b/37580746
Review-Url: https://codereview.webrtc.org/2894873002
Cr-Commit-Position: refs/heads/master@{#18321}
The change is now compatible with the old JVM::Initialize API. The
context is passed to the ContextUtils class when calling its deprecated
signature.
BUG=webrtc:7665
NOTRY=True # Only comment changes since the last patchset.
Review-Url: https://codereview.webrtc.org/2903253004
Cr-Commit-Position: refs/heads/master@{#18268}
This allows it to be reused with Android AudioRecords created outside
WebRtcAudioRecord. WebRtcAudioEffects provides useful methods for enabling
hardware effects (such as echo cancellation) only on appropriate devices. It
also allows some control of these effects through WebRtcAudioUtils.
BUG=webrtc:7448
Review-Url: https://codereview.webrtc.org/2786603004
Cr-Commit-Position: refs/heads/master@{#18053}
If we are on API level 21 or higher, it is possible to use a special AudioTrack
constructor that uses AudioAttributes and AudioFormat as input. It allows us to
supersede the notion of stream types for defining the behavior of audio playback,
and to allow certain platforms or routing policies to use this information for more
refined volume or routing decisions.
BUG=b/30018586
Review-Url: https://codereview.webrtc.org/2804013002
Cr-Commit-Position: refs/heads/master@{#17737}
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}
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}
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}
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}
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}
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}
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}
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}
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}