Make createAudioRecord a class method not a static method.
PiperOrigin-RevId: 515740313
This commit is contained in:
parent
db779ba78f
commit
3e8fd58400
|
@ -170,7 +170,7 @@ public class BaseAudioTaskApi implements AutoCloseable {
|
||||||
* @throws IllegalArgumentException if the model required channel count is unsupported
|
* @throws IllegalArgumentException if the model required channel count is unsupported
|
||||||
* @throws IllegalStateException if AudioRecord instance failed to initialize
|
* @throws IllegalStateException if AudioRecord instance failed to initialize
|
||||||
*/
|
*/
|
||||||
public static AudioRecord createAudioRecord(
|
public AudioRecord createAudioRecord(
|
||||||
int numChannels, int sampleRate, int requiredInputBufferSize) {
|
int numChannels, int sampleRate, int requiredInputBufferSize) {
|
||||||
int channelConfig = 0;
|
int channelConfig = 0;
|
||||||
switch (numChannels) {
|
switch (numChannels) {
|
||||||
|
@ -222,7 +222,7 @@ public class BaseAudioTaskApi implements AutoCloseable {
|
||||||
* @throws IllegalArgumentException if the model required channel count is unsupported
|
* @throws IllegalArgumentException if the model required channel count is unsupported
|
||||||
* @throws IllegalStateException if AudioRecord instance failed to initialize
|
* @throws IllegalStateException if AudioRecord instance failed to initialize
|
||||||
*/
|
*/
|
||||||
public static AudioRecord createAudioRecord() {
|
public AudioRecord createAudioRecord() {
|
||||||
// TODO: Support creating AudioRecord based on the model specifications.
|
// TODO: Support creating AudioRecord based on the model specifications.
|
||||||
return createAudioRecord(1, 16000, 16000);
|
return createAudioRecord(1, 16000, 16000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user