From 2e691a00dc7ca4fdb3eca6b8d1675c7eb97f705a Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Tue, 3 Jun 2014 10:55:45 -0700 Subject: Stop from upsampling (ie: 128 kpbs -> 192 kpbs) --- src/github/daneren2005/dsub/service/DownloadFile.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java index 1f962707..6e1efcf6 100644 --- a/src/github/daneren2005/dsub/service/DownloadFile.java +++ b/src/github/daneren2005/dsub/service/DownloadFile.java @@ -106,6 +106,11 @@ public class DownloadFile implements BufferFile { } else { br = 320; } + } else if(song.getSuffix() != null && song.getSuffix().equals(song.getTranscodedSuffix()) { + // If just downsampling, don't try to upsample (ie: 128 kpbs -> 192 kpbs) + if(song.getBitRate() != null && br > song.getBitRate()) { + br = song.getBitRate(); + } } return br; -- cgit v1.2.3