[audio] Fix bitrate calc (#4141)

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
This commit is contained in:
GiviMAD
2024-04-28 17:43:49 +02:00
committed by GitHub
parent fa9cff6be9
commit 8bca481fff
@@ -64,7 +64,7 @@ public class AudioWaveUtils {
} else {
codecPCMSignedOrUnsigned = null;
}
Integer bitRate = Math.round(format.getFrameRate() * format.getSampleSizeInBits() * format.getChannels());
Integer bitRate = Math.round(format.getSampleRate() * format.getSampleSizeInBits() * format.getChannels());
Long frequency = Float.valueOf(format.getSampleRate()).longValue();
return new AudioFormat(AudioFormat.CONTAINER_WAVE, codecPCMSignedOrUnsigned, format.isBigEndian(),
format.getSampleSizeInBits(), bitRate, frequency, format.getChannels());