Hi,

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



On Jun 26, 1:02 pm, Breno <[email protected]> wrote:
> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to