Sample Rate Conversion

Sample Rate ConversionSampleRateConversionIntroductionSeetheWikipediaarticleResampling(audio)foragenericdefinitionofsamplerateconversion,alsoknownas"resampling."Theremainderofthisarticledescr…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

Sample Rate Conversion

Introduction


See the Wikipedia article Resampling (audio) for a generic definition of sample rate conversion, also known as “resampling.” The remainder of this article describes resampling within Android. See Sample Rate Conversion for related terminology.

Sample rate conversion is the process of changing a stream of discrete samples at one sample rate to another stream at another sample rate. A sample rate converter, or resampler, is a module that implements sample rate conversion. With respect to the resampler, the original stream is called the source signal, and the resampled stream is the sink signal.

Resamplers are used in several places in Android. For example, an MP3 file may be encoded at 44.1 kHz sample rate and needs to be played back on an Android device supporting 48 kHz audio internally. In that case, a resampler would be used to upsample the MP3 output audio from 44.1 kHz source sample rate to a 48 kHz sink sample rate used within the Android device.

The characteristics of a resampler can be expressed using metrics, including:

  • degree of preservation of the overall amplitude of the signal
  • degree of preservation of the frequency bandwidth of the signal, subject to limitations of the sink sample rate
  • overall latency through the resampler
  • consistent phase and group delay with respect to frequency
  • computational complexity, expressed in CPU cycles or power draw
  • permitted ratios of source and sink sample rates
  • ability to dynamically change sample rate ratios
  • which digital audio sample formats are supported

The ideal resampler would exactly preserve the source signal’s amplitude and frequency bandwidth (subject to limitations of the sink sample rate), have minimal and consistent delay, have minimal computational complexity, permit arbitrary and dynamic conversion ratios, and support all common digital audio sample formats. In practice, ideal resamplers do not exist, and actual resamplers are a compromise among these characteristics. For example, the goals of ideal quality conflict with short delay and low complexity.

Android includes a variety of audio resamplers, so that appropriate compromises can be made depending on the application use case and load. Section Resampler implementations below lists the available resamplers, summarizes their characteristics, and identifies where they should typically be used.

Resampler implementations


Available resampler implementations change frequently, and may be customized by OEMs. As of Android 4.4, the default resamplers in descending order of signal distortion, and ascending order of computational complexity include:

  • linear
  • cubic
  • sinc with original coefficients
  • sinc with revised coefficients

In general, the sinc resamplers are more appropriate for higher-quality music playback, and the other resamplers should be reserved for cases where quality is less important (an example might be “key clicks” or similar).

The specific resampler implementation selected depends on the use case, load, and the value of system property af.resampler.quality. For details, consult the audio resampler source code in AudioFlinger.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/181120.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 布隆过滤器工作原理_布隆过滤器的原理

    布隆过滤器工作原理_布隆过滤器的原理布隆过滤器(BloomFilter)是1970年由布隆提出的。它实际上是一个很长的二进制向量和一系列随机映射函数。布隆过滤器可以用于检索一个元素是否在一个集合中。它的优点是空间效率和查询时间都远远超过一般的算法,缺点是有一定的误识别率和删除困难。hash原理Hash(哈希,或者散列)函数在计算机领域,尤其是数据快速查找领域,加密领域用的极广。其作用是将一个大的数据集

    2022年10月6日
    3
  • java编程代码都是背下来的吗_向学弟学妹们介绍自己的大学

    java编程代码都是背下来的吗_向学弟学妹们介绍自己的大学同学们好,今天二哥是来还债的,记得先拖到文末点个赞再回来细细的读,好不好!最近一段时间,我一直在学习Java虚拟机和字节码方面的知识,为的就是有朝一日成为真正牛逼的技术大佬!不知道大家有没有这种感觉,就是一开始学习编程的时候,真心不想看底层的东西,就想直接上来撸代码,但时间久了以后,总感觉缺点啥~~~~于是我开始阅读《深入理解计算机系统》、《图解TCP/IP》、《深入理解Java虚拟机》这些偏底层的书籍,看得烦了,就去刷我之前给大家推荐过的两个视频课,《哈佛大学的CS50》和《计算机科学速成

    2025年6月20日
    2
  • pycharm激活码2021.12.12_最新在线免费激活

    (pycharm激活码2021.12.12)JetBrains旗下有多款编译器工具(如:IntelliJ、WebStorm、PyCharm等)在各编程领域几乎都占据了垄断地位。建立在开源IntelliJ平台之上,过去15年以来,JetBrains一直在不断发展和完善这个平台。这个平台可以针对您的开发工作流进行微调并且能够提供…

    2022年3月30日
    69
  • vue项目部署后刷新404_vue重载当前页面

    vue项目部署后刷新404_vue重载当前页面vue页面访问正常,但是一刷新就会404的问题解决办法:第一种解决方法:将vue路由模式mode:’history’修改为mode:’hash’//router.js文件constrouter=newRouter({//mode:’history’,mode:’hash’,routes:[{path:’/’,redirect:’/login’},{path:’/login’,compon

    2022年10月10日
    1
  • Python 画图常用颜色 – 单色、渐变色、混色 – 够用

    Python 画图常用颜色 – 单色、渐变色、混色 – 够用单色  装了seaborn扩展的话,在字典seaborn.xkcd_rgb中包含所有的xkcdcrowdsourcedcolornames。如下:plt.plot([1,2],lw=4,c=seaborn.xkcd_rgb[‘babypoopgreen’])虽然觉得上面的已经够用了,但是还是备份一下这个最全的吧。 渐变色:  混色…

    2022年6月6日
    82
  • 运行时常量池与字符串常量池_string字符串常量池

    运行时常量池与字符串常量池_string字符串常量池文章目录一、概念1、Class常量池(ClassConstantPool)1.1、常量池中数据项类型2、字符串池(StringPool、StringLiteralPool)2.1、参考文章:3、运行时常量池(RuntimeConstantPool)4、总结二、方法区的class文件信息,class常量池和运行时常量池的三者关系2.1、三者关系图:2.2、方法区class文…

    2022年9月9日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号