Merge "Set correct audio source when creating mic audio record" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-15 06:53:32 +00:00
committed by Android (Google) Code Review

View File

@@ -434,7 +434,8 @@ final class HotwordDetectionConnection {
} }
try { try {
AudioRecord audioRecord = new AudioRecord( AudioRecord audioRecord = new AudioRecord(
new AudioAttributes.Builder().setHotwordModeEnabled(true).build(), new AudioAttributes.Builder()
.setInternalCapturePreset(MediaRecorder.AudioSource.HOTWORD).build(),
audioFormat, audioFormat,
getBufferSizeInBytes( getBufferSizeInBytes(
audioFormat.getSampleRate(), audioFormat.getSampleRate(),