[Android] EqualizerBar: Round equalizer band frequencies instead of truncating them
Ronald Wright
git at videolan.org
Sun Aug 18 18:51:25 CEST 2013
vlc-ports/android | branch: master | Ronald Wright <logiconcepts819 at gmail.com> | Sun Aug 18 11:17:03 2013 -0500| [25607321d3118fdfcb5ad3a405bd74695b259d89] | committer: Edward Wang
EqualizerBar: Round equalizer band frequencies instead of truncating them
Currently, the Android app truncates the equalizer frequencies to the nearest
whole. The Qt GUI in the desktop VLC app depicts rounded frequencies, so the
same scheme should be used in the Android app.
Signed-off-by: Sébastien Toque <xilasz at gmail.com>
Signed-off-by: Edward Wang <edward.c.wang at compdigitec.com>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=25607321d3118fdfcb5ad3a405bd74695b259d89
---
vlc-android/src/org/videolan/vlc/widget/EqualizerBar.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/widget/EqualizerBar.java b/vlc-android/src/org/videolan/vlc/widget/EqualizerBar.java
index 5ed0919..e861646 100644
--- a/vlc-android/src/org/videolan/vlc/widget/EqualizerBar.java
+++ b/vlc-android/src/org/videolan/vlc/widget/EqualizerBar.java
@@ -59,9 +59,9 @@ public class EqualizerBar extends LinearLayout {
mSeek.setProgress(RANGE);
mSeek.setOnSeekBarChangeListener(mSeekListener);
mBand = (TextView) findViewById(R.id.equalizer_band);
- mBand.setText(band < 1000
- ? (int) band + " Hz"
- : (int) (band / 1000) + " kHz");
+ mBand.setText(band < 1000.0f
+ ? (int) (band + 0.5f) + " Hz"
+ : (int) (band / 1000.0f + 0.5f) + " kHz");
mValue = (TextView) findViewById(R.id.equalizer_value);
}
More information about the Android
mailing list