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. Help using Eclipse to "attach" to a process on the emulator...

I have a process running on the emulator but can't figure out how to
get Eclipse to
attach to it so I can debug it.

DDMS isn't doing anything useful, it does the "ps" and shows my
process but it is
"not DDMS aware", has no description and no VM version.  Threads don't
update,
heap doesn't show anything, allocations is blank...

Debugging through Eclipse's "Remote Java Application", set to port
8700 does
nothing for a while and then fails with a failed to connect to remote
VM error.

any help would be appreciated,

  mike

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

2. Paid applications in the UK

Does anyone know the status of paid applications in the Android market for
the UK?

I'm still not seeing any. Filtering the market for "Priced items only"
returns the message "No matching content in Android Market".


Regards,

Sean

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

3. Build libbluedroid.so ERROR

4. gps mock location doubt

5. How to get a reference to a TabWidget in my java code

6. Flash Embed?

7. A new way to increase downloads for your apps on Android Market