From 7f91fdfcca60f6aeca7dc04a30bbf0ecc5b96845 Mon Sep 17 00:00:00 2001 From: Shaji Khan Date: Sat, 16 Mar 2024 14:11:10 +0530 Subject: [PATCH] audio is recorded but silent --- app/src/main/java/com/shajikhan/ladspa/amprack/Camera2.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/shajikhan/ladspa/amprack/Camera2.java b/app/src/main/java/com/shajikhan/ladspa/amprack/Camera2.java index 14cd1edf..18f67dfd 100644 --- a/app/src/main/java/com/shajikhan/ladspa/amprack/Camera2.java +++ b/app/src/main/java/com/shajikhan/ladspa/amprack/Camera2.java @@ -412,13 +412,13 @@ public void onOutputBufferAvailable(@NonNull MediaCodec codec, int index, @NonNu } outPutByteBuffer = codec.getOutputBuffer(index); + + mMuxer.writeSampleData(mTrackIndex, outPutByteBuffer, info); + codec.releaseOutputBuffer(index, false); // byte[] outDate = new byte[info.size]; // outPutByteBuffer.get(outDate); - if (isVideo && mMuxerStarted) - mMuxer.writeSampleData(mTrackIndex, outPutByteBuffer, info); - codec.releaseOutputBuffer(index, false); int aIndex = audioEncoder.dequeueOutputBuffer(mBufferInfo, 5000) ; if (aIndex > 0) {