zoukankan      html  css  js  c++  java
  • android 支持的声音格式详解

    或许你和我一样,都曾为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. 

  • 相关阅读:
    程序员必须知道的10大基础实用算法及其讲解
    6 Java Exceptions that Haunts a Newbie Java Developer(Java菜鸟6种常见的异常)
    在线学习Java免费资源推荐(来自:importnew)
    Oracle触发器
    Oracle性能分析工具介绍及使用
    开口大数据闭口高并发,你们都是怎么回答
    Http中Get/Post请求区别
    快速排序算法
    MAG EF查询增加指定索引功能
    WEB传参
  • 原文地址:https://www.cnblogs.com/rywx/p/2093819.html
Copyright © 2011-2022 走看看