How to increase speaker volume using AudioTrack

by Breno » Sat, 27 Jun 2009 02:23:32 GMT


Sponsored Links
 Hey everyone,

     Does anybody knows how to increase the volume of speaker using
AudioTrack? the streamed audio is playing in speaker, but not loud as
voice call. Here my code

       mPlayer = new AudioTrack(AudioManager.STREAM_RING,
                        AUDIO_SAMPLE_FREQUENCY_8000HZ,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
                        AudioFormat.ENCODING_PCM_16BIT, 32000,
AudioTrack.MODE_STREAM);
       mAudioManager = (AudioManager) (App.getSystemService
(Context.AUDIO_SERVICE));

       mAudioManager.setMode(AudioManager.MODE_NORMAL);

       //this line, apparently, has no effect
       mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC,
                        mAudioManager.getStreamMaxVolume
(AudioManager.STREAM_MUSIC), 0);

  Thanks a lot


--~--~---------~--~----~------------~-------~--~----~



How to increase speaker volume using AudioTrack

by niko20 » Mon, 29 Jun 2009 21:45:15 GMT


 Hi,

Why are you setting stream music volume while your AudioTrack is using
Stream_Ring?





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. When is the App Market Opening?

We have an application we would like to release into the App Market.
Does anyone know when that will be turned on.

Thank you,

Bill
--~--~---------~--~----~------------~-------~--~----~

2. Changing the gravity of titles in Activity themes

It doesn't appear to be possible to change text alignment (gravity)
using android:windowTitleStyle or any of the related properties.

Can anyone tell me if this is an intentional limitation, a bug, or a
mistake on my part?

Thanks, Tom.
--~--~---------~--~----~------------~-------~--~----~

3. Printable Documentation

4. Is there printable documentation?

5. MediaPlayer streaming playback

6. Install Apps on G1

7. How to suppress the window title/chrome completely at all times?