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. Global search app

I would like to write an application that replaces the dialog that
shows up when you long press the search button. How would I making it
so my app gets launched on a search button long press?

-- 

2. Paket data xl sering disconnected

Monin RR,
As subject,kenapa skrg bgt ya?Pdhl 3G or Hsdpa manteng.Sering drop-nya di
spot2 yg used 2b lancar jaya. Pdhl ane setia dgn paket unlimited yg 150k :)
Ada RR yg punya pangalaman sama?

Best regards
Donny

G!                       : no1dadda26
follow                 : @no1dadda
Y!                        : donny_suhen...@yahoo.co.uk

Please Excuse any Typos

-- 
===============
"

3. Gmail diandroid tidak bisa tampilkan file Gif (gambar)

4. Netbook Elevo R7 - OS Android 2.0

5. Facebook Update

6. Barnacle and Oddysey

7. forward-lock the app