Hi Indicator,

Thanks for the link, but I had seen that link previously and had tried using
a variable which would have the current volume and then either add values
ranging from 0 to 1 to raise the volume. Eg.

float currentVolume = some float value;
float increaseBy = some float value;
mediaPlayer.setVolume((currentVolume + increaseBy) , (currentVolume +
increaseBy));

I am doing this on a button click, (similarly for reducing the volume)
However I am not able to raise or reduce the volume. Have you tried to raise
or reduce the volume on a button click?

Thanks,
Prajakta



On Wed, Feb 17, 2010 at 11:39 PM, Indicator Veritatis <[email protected]>wrote:

> Yes, you are right, they should have documented there. They didn't.
> Fortunately, though, others have asked this question before in this
> group, and the answer may thus be found at the much earlier post,
>
> http://groups.google.com/group/android-beginners/browse_thread/thread/f1848285f8f3b60c
>
> David Sparks answered the question in that thread.
>
> On Feb 13, 1:06 pm, prajakta <[email protected]> wrote:
> > Hi,
> >
> > I am trying the raise / reduce the volume of my MediaPlayer using the
> > function setVolume(float leftVolume, float rightVolume) but I am not
> > sure how to use this function. The documentation says that they have
> > to be raw scalars. Can anyone put more light on this function, as to
> > how I can use this to increase or reduce the volume of mediaplayer on
> > a button click.
> >
> > Thanks,
> > Prajakta
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to