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. Portable application running on SD-card

Hello,

I want to build an application which will be placed on SD-card.
I want this application running on the SD-card only. No data exports
on the system for security reason. I mean I don't want any data as dex
file, database, private user data, or native libraries put on /data at
running time.

Is it possible to build this kind of application?
Does it make sense to build this kind of application for security
reason and why?

Thank you,
Regards,

Kevin

-- 

2. Sharing assets directory across apps

What is the easiest way to allow multiple apps to read from the assets
directory of
a particular app? Do I need to use shared IDs here? And where is the
actual assets
dir residing in the device? Is it in the app's database db file?

Thanks

-- 

3. Get screen coordinates by specific location and longitude

4. Have to tap 2times to have the data displayed in a ListView...

5. Point sprite attenuation does not work because the points have the same size.

6. 3rd Party App Permission Prevents System Intent Broadcast ?

7. plz suggest