Revert "Add an optional override for AudioRecord device"
This reverts commit 1b8ef63876ebfa55a51c8ca9b1d8206bf8233e01. Reason for revert: Breaks downstream projects. b/155256727 Original change's description: > Add an optional override for AudioRecord device > > This is important when we have multiple named devices connected over > USB (eg. "Webcam", "Microphone", "Headset") and there is some way to > choose a specific input device to route from. > > Bug: b/154440591 > Change-Id: I8dc1801a5e4db7f7bb439e855d43897c1f7d8bc4 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173748 > Commit-Queue: Robin Lee <rgl@google.com> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#31130} TBR=henrika@webrtc.org,sakal@webrtc.org,rgl@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: b/154440591, b/155256727 Change-Id: I6836676096d47d9da5702a40b9d127569ad50dda Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175008 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31238}
This commit is contained in:
committed by
Commit Bot
parent
d2490aef20
commit
3476e12446
@ -10,11 +10,8 @@
|
||||
|
||||
package org.webrtc.audio;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.AudioDeviceInfo;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Build;
|
||||
import android.support.annotation.RequiresApi;
|
||||
import android.content.Context;
|
||||
import org.webrtc.JniCommon;
|
||||
import org.webrtc.Logging;
|
||||
|
||||
@ -372,18 +369,6 @@ public class JavaAudioDeviceModule implements AudioDeviceModule {
|
||||
audioInput.setMicrophoneMute(mute);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start to prefer a specific {@link AudioDeviceInfo} device for recording. Typically this should
|
||||
* only be used if a client gives an explicit option for choosing a physical device to record
|
||||
* from. Otherwise the best-matching device for other parameters will be used. Calling after
|
||||
* recording is started may cause a temporary interruption if the audio routing changes.
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
public void setPreferredInputDevice(AudioDeviceInfo preferredInputDevice) {
|
||||
Logging.d(TAG, "setPreferredInputDevice: " + preferredInputDevice);
|
||||
audioInput.setPreferredDevice(preferredInputDevice);
|
||||
}
|
||||
|
||||
private static native long nativeCreateAudioDeviceModule(Context context,
|
||||
AudioManager audioManager, WebRtcAudioRecord audioInput, WebRtcAudioTrack audioOutput,
|
||||
int inputSampleRate, int outputSampleRate, boolean useStereoInput, boolean useStereoOutput);
|
||||
|
||||
Reference in New Issue
Block a user