[android-beginners] Re: MediaPlayer Volume Range

2009-01-08 Thread Marc Lester Tan
Thanks Dave. Although when I tried putting 100 in the setVolume method

clickSound.setVolume(100, 100);

The volume level in the emulator seems to be louder when compared to 1.0.
Any idea?

-Marc

On Thu, Jan 8, 2009 at 10:39 AM, Dave Sparks davidspa...@android.comwrote:


 The range is 0 to 1. You can use any increment you want to create a
 logarithmic volume scale, just make full volume 1.0. Multiply be a
 scalar less than 1.0 to get the next lower volume. Multiply that
 volume by the same scalar to get the next one. Repeat until you have
 enough values.

 The number you choose for your multiplier will vary according to
 purpose. For example, the Android music volume control is much finer
 grained (32 steps?) than the notification volume control (8 steps?).
 To get a smooth fade, you probably want to use 1dB or less (1dB =
 ~0.89).

 On Jan 7, 3:04 am, Marc Lester Tan mail...@gmail.com wrote:
  Hi folks,
 
  I just want to ask if somebody knows the usable range for the
 MediaPLayer's
  volume levels? The doc just says it is a raw scalar and the UI should
 scale
  logarithmically. An example would be helpful.
 
  Thanks in advance.
 
  -Marc
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: MediaPlayer Volume Range

2009-01-08 Thread Marc Lester Tan
So should we report that? Any reaction, google employees?

-M


On Fri, Jan 9, 2009 at 11:48 AM, Dave Sparks davidspa...@android.comwrote:


 I took a quick look at the code, and it looks like we're not clamping
 the values. If I'm reading the code correctly - not easy because there
 are a lot of layers between the Java client and the audio output - it
 looks like some nasty wrapping effects will occur if you use values
 higher than 1.0. I would consider that a bug in the code.

 I suggest sticking to values between 0 and 1.

 On Jan 8, 3:41 am, Marc Lester Tan mail...@gmail.com wrote:
  Thanks Dave. Although when I tried putting 100 in the setVolume method
 
  clickSound.setVolume(100, 100);
 
  The volume level in the emulator seems to be louder when compared to 1.0.
  Any idea?
 
  -Marc
 
  On Thu, Jan 8, 2009 at 10:39 AM, Dave Sparks davidspa...@android.com
 wrote:
 
 
 
   The range is 0 to 1. You can use any increment you want to create a
   logarithmic volume scale, just make full volume 1.0. Multiply be a
   scalar less than 1.0 to get the next lower volume. Multiply that
   volume by the same scalar to get the next one. Repeat until you have
   enough values.
 
   The number you choose for your multiplier will vary according to
   purpose. For example, the Android music volume control is much finer
   grained (32 steps?) than the notification volume control (8 steps?).
   To get a smooth fade, you probably want to use 1dB or less (1dB =
   ~0.89).
 
   On Jan 7, 3:04 am, Marc Lester Tan mail...@gmail.com wrote:
Hi folks,
 
I just want to ask if somebody knows the usable range for the
   MediaPLayer's
volume levels? The doc just says it is a raw scalar and the UI should
   scale
logarithmically. An example would be helpful.
 
Thanks in advance.
 
-Marc
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: MediaPlayer Volume Range

2009-01-07 Thread Dave Sparks

The range is 0 to 1. You can use any increment you want to create a
logarithmic volume scale, just make full volume 1.0. Multiply be a
scalar less than 1.0 to get the next lower volume. Multiply that
volume by the same scalar to get the next one. Repeat until you have
enough values.

The number you choose for your multiplier will vary according to
purpose. For example, the Android music volume control is much finer
grained (32 steps?) than the notification volume control (8 steps?).
To get a smooth fade, you probably want to use 1dB or less (1dB =
~0.89).

On Jan 7, 3:04 am, Marc Lester Tan mail...@gmail.com wrote:
 Hi folks,

 I just want to ask if somebody knows the usable range for the MediaPLayer's
 volume levels? The doc just says it is a raw scalar and the UI should scale
 logarithmically. An example would be helpful.

 Thanks in advance.

 -Marc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---