[vlc-devel] [PATCH] EqualizerBar: Round equalizer band frequencies instead of truncating them
Ronald Wright
logiconcepts819 at gmail.com
Sun Aug 18 18:17:03 CEST 2013
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.
---
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);
}
--
1.7.10.4
More information about the vlc-devel
mailing list