add: bitsPerSample to SongInfo if audio codec is lossless

This commit is contained in:
ILikeToCode 2023-05-24 15:31:24 +01:00
parent 757a75a9dc
commit 6c5d0e3008

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")