Skip to content

Commit

Permalink
add: bitsPerSample to SongInfo if audio codec is lossless
Browse files Browse the repository at this point in the history
  • Loading branch information
ILikeToCode authored and ILikeToCode committed May 24, 2023
1 parent 757a75a commit 6c5d0e3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ fun getSongInfo(song: Song): String {
val string: StringBuilder = StringBuilder()
val uriFile = file.toUri()
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(RetroUtil.frequencyCount(audioHeader.sampleRate.toInt()))
.append(" kHz")
Expand Down

0 comments on commit 6c5d0e3

Please sign in to comment.