Merge pull request #1521 from ifeelsoalone/dev

Add bit depth to song info if the audio codec is lossless
This commit is contained in:
Prathamesh More 2023-12-30 14:42:28 +05:30 committed by GitHub
commit 4c3a429878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,9 @@ fun getSongInfo(song: Song): String {
val string: StringBuilder = StringBuilder() val string: StringBuilder = StringBuilder()
val uriFile = file.toUri() val uriFile = file.toUri()
string.append(getMimeType(uriFile.toString())).append("") string.append(getMimeType(uriFile.toString())).append("")
if (audioHeader.isLossless) {
string.append(audioHeader.bitsPerSample).append("-bit").append("")
}
string.append(audioHeader.bitRate).append(" kb/s").append("") string.append(audioHeader.bitRate).append(" kb/s").append("")
string.append(RetroUtil.frequencyCount(audioHeader.sampleRate.toInt())) string.append(RetroUtil.frequencyCount(audioHeader.sampleRate.toInt()))
.append(" kHz") .append(" kHz")