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


相关推荐

  • 二叉树的详解与实现「建议收藏」

    二叉树的详解与实现「建议收藏」简介二叉树的相关概念,如,树高度,节点层数,节点度数,路径,叶节点,分支节点,根节点,父节点,左节点,右节点,兄弟节点,祖先节点,子孙节点,左子树,右子树等基本概念,不再赘述。二叉树分类1、完全二叉树若设二叉树的高度为h,除第h层外,其它各层(1~h-1)的结点数都达到最大个数,第h层有叶子结点,并且叶子结点都是从左到右依次排布,这就是完全二叉树。一维数组可以作为完全二叉树…

    2022年5月31日
    32
  • zynq双核运行设计_zynq udp

    zynq双核运行设计_zynq udp前面文章讲解了《zynq高速存储方案》,那种方案是针对单个pciehost设计的方案,当项目需求记录速度很高,并且没有国产化要求时,可以考虑使用ZynqUltraScale+系列的ZU11EG芯片,该芯片成本低,且支持4个PCIe硬核,可以将该4个pcie都配置成host模式,在每个host下挂载pcie3.0x4的SSD固态硬盘,这样每个pciehost能够跑的速率就是ssd盘能够支持的最大速率,如果选择三星的SSD盘,那么PCIe3.0x4读写速率能够到3GB/s,那么4个…

    2022年9月1日
    1
  • Pytest(6)重复运行用例pytest-repeat「建议收藏」

    Pytest(6)重复运行用例pytest-repeat「建议收藏」前言平常在做功能测试的时候,经常会遇到某个模块不稳定,偶然会出现一些bug,对于这种问题我们会针对此用例反复执行多次,最终复现出问题来。自动化运行用例时候,也会出现偶然的bug,可以针对单个用例,

    2022年7月29日
    5
  • 解决Android 网页加载链接 图片不展示问题

    解决Android 网页加载链接 图片不展示问题

    2021年10月1日
    42
  • 【树莓派】一根网线将树莓派4B直连笔记本电脑的方法

    【树莓派】一根网线将树莓派4B直连笔记本电脑的方法当我们为新买来的树莓派刷上系统之后,如何将树莓派和笔记本电脑连接到同一网络使用SSH工具登录树莓派呢?相信大多数人的做法是将树莓派连接到路由器上,然后通过SSH工具(putty,SecureCRT等)远程登录,但如果你没有显示器和HDMI线,那么,这里介绍如何使用一根网线来连接树莓派。准备材料1、树莓派2、已经刷入系统的SD卡3、一根网线4、一个已经连接互联网的笔记本5、usb网口…

    2022年6月5日
    39
  • C语言的标识符命名规则

    C语言的标识符命名规则

    2021年9月27日
    54

发表回复

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

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