android 支持的声音格式详解

本文探讨了Android设备上音频格式的支持情况,建议使用OGG、WAV和MP3格式,详细介绍了各种格式的特点和使用场景,强调了高质量音频对于用户体验的重要性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

或许你和我一样,都曾为android头痛的声音格式烦恼,虽然支持的格式那么多,声音大小,压缩格式,无一不影响着它的正常播放,

What Audio Formats Does Android Support? 
Well, there’s support on paper, there’s support in the emulator, and there’s support on the actual devices. On paper, Android supports the following file types (this is subject to change with new releases): 
    * WAV (PCM uncompressed) 
    * AAC (Apple iPod format, unprotected) 
    * MP3 (MPEG-3) 
    * WMA (Windows media audio) 
    * AMR (Speech codec)     * OGG (Ogg Vorbis)* 
    * MIDI (Instruments) 
In reality, I’ve found that only the OGG, WAV, and MP3 formats work  well  in  the  emulator,  and  thus  those  are  the  only  ones that I can recommend for application development. Android’s native audio format appears to be 44.1kHz 16-bit stereo. How- ever, since WAV files at that rate are huge, you should just stick to OGG or MP3 files (mono for voice or stereo for music). OGG files seem to work best for short clips like game sound effects. 
Stay  away  from  unusual  rates  like  8kHz  because  the  resam- pling artifacts make those rates sound terrible. Use 11kHz, 22kHz, or  44.1kHz  sampling  rates  for  the  best  results.  Remember  that although  the  phone  may  have  a  tiny  speaker,  many  of  your users are going to be plugging in headphones (like an iPod), so you want your audio to be high quality. 

转载于:https://www.cnblogs.com/rywx/archive/2011/10/18/2093819.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值