Remove unused IOException

IOException may not be thrown from this method.
This commit is contained in:
Romain Vimont 2023-03-11 16:01:45 +01:00
parent eca8766545
commit 2380879376

View file

@ -14,7 +14,6 @@ import android.media.MediaRecorder;
import android.os.Build; import android.os.Build;
import android.os.SystemClock; import android.os.SystemClock;
import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
public final class AudioCapture { public final class AudioCapture {
@ -110,7 +109,7 @@ public final class AudioCapture {
} }
@TargetApi(Build.VERSION_CODES.N) @TargetApi(Build.VERSION_CODES.N)
public int read(ByteBuffer directBuffer, int size, MediaCodec.BufferInfo outBufferInfo) throws IOException { public int read(ByteBuffer directBuffer, int size, MediaCodec.BufferInfo outBufferInfo) {
int r = recorder.read(directBuffer, size); int r = recorder.read(directBuffer, size);
if (r < 0) { if (r < 0) {
return r; return r;