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. Google Map is not displaying in emulator

have an odd problem.  I'm working on my first Maps application.  I'm
using the demo/tutorial code as a baseline to figure this out.

I have the app running, I can see the zoom controls....but no map
graphic.

I see no errors in the console.

I've set the debug.keystore.  I also have the key for the API set.
I've verified I have them in the right place according to the Eclipse
configuration.

I can even add an overlay with a small graphic with no problem.

But I still only see the "graph paper"-like background for the map.
I'm not sure what's going on.

Using Java 1.6.

--

2. Specify URL for Uri.parse() in resource file?

I tried creating a string with an id (myurl) and then referring to it
using R.id.myurl in my code but this doesn't work. So how can I
specify a URL in the XML and then retrieve it to use in Uri.parse() ?


--

3. can't write to sdcard anymore

4. Selection

5. How to perform the animation in viewgroup

6. URLSpan string problem

7. Android Dev Phone with Verizon?