Android Mediaplayer给Mediaplayer设置固定的音量

时间:2015-02-13 17:50:41   收藏:0   阅读:532

技术分享最早直接调用Mediaplayer类中的setVolume(float leftVolume, float rightVolume)这个API,调试后发现没有任何效果,最后在网上查到要设置音量的大小,要使用Audiomanager这个类,在这个类中有setStreamVolume(int streamType, int index, int flags)可以设置指定音频通道的声音大小,经过测试,搞定!哈哈哈

参考以下2个链接

http://www.juapk.com/thread-4790-1-1.html

http://www.linuxidc.com/Linux/2011-10/44660.htm

原文:http://www.cnblogs.com/jiuguimianju/p/4290440.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!