[Android] Use audio max value instead of hardcoded one

Geoffrey Métais git at videolan.org
Tue Apr 7 16:11:50 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr  7 16:11:16 2015 +0200| [4c3e3aa4489d72c10cc6b72fa9d970f6d9ec4a0d] | committer: Geoffrey Métais

Use audio max value instead of hardcoded one

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4c3e3aa4489d72c10cc6b72fa9d970f6d9ec4a0d
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index fba6b29..d2386d2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1867,7 +1867,7 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
             mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, vol, AudioManager.FLAG_SHOW_UI);
 
         mTouchAction = TOUCH_VOLUME;
-        vol = vol * 100 /15;
+        vol = vol * 100 / mAudioMax;
         showInfoWithVerticalBar(getString(R.string.volume) + '\u00A0' + Integer.toString(vol) + '%', 1000, vol);
     }
 



More information about the Android mailing list