mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
[audio] Fix bitrate calc (#4141)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
This commit is contained in:
+1
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user