mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 13:21:53 +01:00
[audio] Fix bitrate calc (#4141)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
This commit is contained in:
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());
|
||||
|
Loading…
Reference in New Issue
Block a user