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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Oracle数据库数据恢复方法

    Oracle数据库数据恢复方法前一段遇到:操作系统崩溃,数据库留有所有数据文件,控制文件,配置文件。下面记录一下数据恢复过程。1.下载安装Oracle数据库。安装的数据库定要与之前版本的数据库版本一致。安装的数据库位置要与之前安装的数据库位置一致。2.创建新的数据库。创建新的数据库实例,实例名称密码要与之前数据库实例一致。3.打开sqlPlus命令行(1)输入命令system/密码assysdba。(2)shutdownimmediate;关闭数据库。4.使用原本的数据文件替换到新的数据

    2022年7月17日
    25
  • 一级域名301重定向到www二级域名

    一级域名301重定向到www二级域名301重定向有利于百度的搜索例如一个域名www.test.com如果不做设置会产生4个网址,(1)test.com(2)www.test.com(3)test.com/default.html(4)www.test.com/default.html会导致网址的PR值被分散.htaccess设置Options+FollowSymLinksIndexIgnore*/*…

    2022年5月21日
    57
  • MMC卡驱动分析

    MMC卡驱动分析MMC卡驱动分析 最近花时间研究了一下MMC卡驱动程序,开始在网上找了很多关于MMC卡驱动的分析文章,但大都是在描述各个层,这对于初学者来讲帮助并不大,所以我就打算把自己的理解写下来,希望对大家有用。个人觉得理解LINUX内核当中MMC/SD卡驱动程序构架是学习MMC卡驱动程序的重点,只有理解了它的基本框架或流程才能真正理解一个块设备驱动程序的写法,同时才能真正理

    2022年4月28日
    58
  • arp欺骗可以利用哪些工具来实现_arp防欺骗功能

    arp欺骗可以利用哪些工具来实现_arp防欺骗功能这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好!这是你第一次使用Markdown编辑器所展示的欢迎页。如果你想学习如何使用Mar

    2022年10月7日
    2
  • OJ错误提示类型

    OJ错误提示类型答案正确(Acepted,AC)  恭喜你!所提交的代码通过了数据!这个评测结果应该是大家最喜欢见到的,也非常好理解。如果是单点测试,那么没通过一组数据,就会返回一个Accepted;如果是多点测试,那么只有当通过了所有数据时,才会返回Accepted。编译错误(CompileError,CE)  很显然,如果代码没有办法通过编译,那么就会返回CompileError。这是要…

    2022年6月24日
    23
  • 回文子串的个数_统计回文子串的个数

    回文子串的个数_统计回文子串的个数1、题目描述本题要求统计一个字符串中包含多少个回文子串。首先我们来确定子串的概念:一个字符串的子串,就是指它本身的各个部分。如字符串“aba”的子串有“a”、“b”

    2022年10月16日
    3

发表回复

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

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