Fixed
Status Update
Comments
ad...@google.com <ad...@google.com>
tn...@google.com <tn...@google.com>
ji...@google.com <ji...@google.com> #2
Here is what I see.
In AudioRecord.h and in the MediaRecorder.AudioSource, the enum values differ.
In native code (AudioRecord.h), the values are ..
44 enum input_source {
45 DEFAULT_INPUT =-1,
46 MIC_INPUT = 0,
47 VOICE_UPLINK_INPUT = 1,
48 VOICE_DOWNLINK_INPUT = 2,
49 VOICE_CALL_INPUT = 3,
50 NUM_INPUT_SOURCES
51 };
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=include/media/AudioRecord.h;h=13e51eea1eb478517f677df0642b4d2221571192;hb=donut#l38
In Java MediaRecorder AudioSource, the values are ..
120 public final class AudioSource {
121 /* Do not change these values without updating their counterparts
122 * in include/media/mediarecorder.h!
123 */
124 private AudioSource() {}
125 public static final int DEFAULT = 0;
126 /** Microphone audio source */
127 public static final int MIC = 1;
128
129 /** Voice call uplink (Tx) audio source */
130 public static final int VOICE_UPLINK = 2;
131
132 /** Voice call downlink (Rx) audio source */
133 public static final int VOICE_DOWNLINK = 3;
134
135 /** Voice call uplink + downlink audio source */
136 public static final int VOICE_CALL = 4;
137 }
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=media/java/android/media/MediaRecorder.java;h=be4b489eb08683750fc2149184ab073e8528e6d4;hb=donut#l120
Now, if you look at AudioFlinger, any input source, whose value of stream type is >=
NUM_INPUT_SOURCES (i.e., 4), we will get an "invalid stream type". Because of the
mismatch of the enums, the Java API sets the value of VOICE_CALL stream type as 4.
So, the check fails and we get the failure.
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=libs/audioflinger/AudioFlinger.cpp;h=da7cc8a6aa62a9d66097a6d9c7c184d132df7c3d;hb=donut#l2245
Fix:
Set the values of the stream types to be the same in the Java and c++ code.
Hope this helps.
In AudioRecord.h and in the MediaRecorder.AudioSource, the enum values differ.
In native code (AudioRecord.h), the values are ..
44 enum input_source {
45 DEFAULT_INPUT =-1,
46 MIC_INPUT = 0,
47 VOICE_UPLINK_INPUT = 1,
48 VOICE_DOWNLINK_INPUT = 2,
49 VOICE_CALL_INPUT = 3,
50 NUM_INPUT_SOURCES
51 };
In Java MediaRecorder AudioSource, the values are ..
120 public final class AudioSource {
121 /* Do not change these values without updating their counterparts
122 * in include/media/mediarecorder.h!
123 */
124 private AudioSource() {}
125 public static final int DEFAULT = 0;
126 /** Microphone audio source */
127 public static final int MIC = 1;
128
129 /** Voice call uplink (Tx) audio source */
130 public static final int VOICE_UPLINK = 2;
131
132 /** Voice call downlink (Rx) audio source */
133 public static final int VOICE_DOWNLINK = 3;
134
135 /** Voice call uplink + downlink audio source */
136 public static final int VOICE_CALL = 4;
137 }
Now, if you look at AudioFlinger, any input source, whose value of stream type is >=
NUM_INPUT_SOURCES (i.e., 4), we will get an "invalid stream type". Because of the
mismatch of the enums, the Java API sets the value of VOICE_CALL stream type as 4.
So, the check fails and we get the failure.
Fix:
Set the values of the stream types to be the same in the Java and c++ code.
Hope this helps.
tn...@google.com <tn...@google.com> #3
i have Put in Manual Settings for Call Recorder Source as 0,1,2 and 3 All these
Settings only Records Voice Stream from MIC only there is no Such VoiceCall,
VoiceCall Incomming and Outgoing.
I think Google have missed some file to Support it Actual
Settings only Records Voice Stream from MIC only there is no Such VoiceCall,
VoiceCall Incomming and Outgoing.
I think Google have missed some file to Support it Actual
an...@google.com <an...@google.com> #5
android.media.MediaRecorder.AudioSource.VOICE_DOWNLINK ;
android.media.MediaRecorder.AudioSource.VOICE_UPLINK ;
These two option do not work!
Whatever I set it to VOICE_DOWNLINK,VOICE_UPLINK or VOICE_CALL, the resault is the
same as VOICE_CALL!
Please fix!
Thanks!
android.media.MediaRecorder.AudioSource.VOICE_UPLINK ;
These two option do not work!
Whatever I set it to VOICE_DOWNLINK,VOICE_UPLINK or VOICE_CALL, the resault is the
same as VOICE_CALL!
Please fix!
Thanks!
Description
STEPS TO REPRODUCE:
1. create any kt file
2. type:
buildList {
this += ""
}
Replacing with add("") fixing the issue, but "operator fun" can be more readable in some cases.
------------------
IMPORTANT: Please read
all required information.
------------------
Studio Build:
Android Studio Jellyfish | 2023.3.1 Beta 2
Build #AI-233.14808.21.2331.11608968, built on March 21, 2024
Runtime version: 17.0.10+0-17.0.10b1087.21-11572160 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Version of Gradle Plugin: 8.2.0, 8.4.0-beta02
Version of Gradle: 8.2-bin, 8.6-bin
Version of Java: Azul Zulu 17.0.7, JetBrains runtime 17.0.10
OS: macOS 14.4.1