From 0f0da49fce053eec4f95ce6a8e553d77f9df62a4 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 21 Jun 2016 12:56:41 -0700 Subject: Fix JAVA doc for AudioRecord and AudioTrack Builder The default sampling rate chosen for an AudioTrack or AudioRecord constructed with a Builder not specifying a sampling rate is not the primary output sampling rate but depends on the device actually selected. Bug: 29541155 Change-Id: Ifcab65418b816b7321b6e9542b9e4bb95f748f95 --- media/java/android/media/AudioRecord.java | 6 +++--- media/java/android/media/AudioTrack.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java index 8efd5991a401..39184f1af878 100644 --- a/media/java/android/media/AudioRecord.java +++ b/media/java/android/media/AudioRecord.java @@ -467,11 +467,11 @@ public class AudioRecord implements AudioRouting *

* If the audio source is not set with {@link #setAudioSource(int)}, * {@link MediaRecorder.AudioSource#DEFAULT} is used. - *
If the audio format is not specified or is incomplete, its sample rate will be the - * default output sample rate of the device (see - * {@link AudioManager#PROPERTY_OUTPUT_SAMPLE_RATE}), its channel configuration will be + *
If the audio format is not specified or is incomplete, its channel configuration will be * {@link AudioFormat#CHANNEL_IN_MONO}, and the encoding will be * {@link AudioFormat#ENCODING_PCM_16BIT}. + * The sample rate will depend on the device actually selected for capture and can be queried + * with {@link #getSampleRate()} method. *
If the buffer size is not specified with {@link #setBufferSizeInBytes(int)}, * the minimum buffer size for the source is used. */ diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index 9a816683f30a..12d5eade36d2 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -619,11 +619,11 @@ public class AudioTrack extends PlayerBase *

* If the audio attributes are not set with {@link #setAudioAttributes(AudioAttributes)}, * attributes comprising {@link AudioAttributes#USAGE_MEDIA} will be used. - *
If the audio format is not specified or is incomplete, its sample rate will be the - * default output sample rate of the device (see - * {@link AudioManager#PROPERTY_OUTPUT_SAMPLE_RATE}), its channel configuration will be + *
If the audio format is not specified or is incomplete, its channel configuration will be * {@link AudioFormat#CHANNEL_OUT_STEREO} and the encoding will be * {@link AudioFormat#ENCODING_PCM_16BIT}. + * The sample rate will depend on the device actually selected for playback and can be queried + * with {@link #getSampleRate()} method. *
If the buffer size is not specified with {@link #setBufferSizeInBytes(int)}, * and the mode is {@link AudioTrack#MODE_STREAM}, the minimum buffer size is used. *
If the transfer mode is not specified with {@link #setTransferMode(int)}, -- cgit v1.2.3-59-g8ed1b