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


相关推荐

  • 关于计算机病毒的试题,计算机病毒测试题.doc

    关于计算机病毒的试题,计算机病毒测试题.doc计算机病毒1.下列叙述中,正确的一条是______。A、Word文档不会带计算机病毒B、计算机病毒具有自我复制的能力,能迅速扩散到其他程序上C、清除计算机病毒的最简单的办法是删除所有感染了病毒的文件D、计算机杀病毒软件可以查出和清除任何已知或未知的病毒2.下列关于计算机病毒知识的叙述中,正确的一条是______。A、反病毒软件可以查、杀任何种类的病毒B、计算机病毒是一种被破坏了的程序C、…

    2022年6月2日
    34
  • datagrip 激活码最新_最新在线免费激活

    (datagrip 激活码最新)好多小伙伴总是说激活码老是失效,太麻烦,关注/收藏全栈君太难教程,2021永久激活的方法等着你。https://javaforall.net/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~1STL5S9V8F-eyJsaWNlbnNlSWQiOi…

    2022年3月27日
    61
  • usb眼图测试方法_USB4.0

    usb眼图测试方法_USB4.01、现象HUB芯片电源噪声所引起;USBHUB芯片电压偏置电阻不合适所引起。2、参考电路3、原因分析在眼图测试时发现有一个USB口的眼图有抖动碰到眼图模板,当时经过千辛万苦,屡试不成,都未找到具体原因。只能确定眼图的抖动可能由于电源的噪声所引起,后续多次更换电源的滤波参数和割PCB后才找到由于一路电源1.8VPLL的布局所引起。真是众里寻她千百度,暮然回首,尽在一个HUBcore电源的滤波未做好。未通过模板时眼图如下图(未做任何调试):未通过模板时所对应的PCB布局..

    2025年6月19日
    3
  • App的三种类型与区别(原生、混合应用程序、web版App)

    App的三种类型与区别(原生、混合应用程序、web版App)

    2021年5月23日
    161
  • Idea 2021年激活码刚出(最新序列号破解)

    Idea 2021年激活码刚出(最新序列号破解),https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月18日
    102
  • 数仓建设 | ODS、DWD、DWM等理论实战(好文收藏)

    数仓建设 | ODS、DWD、DWM等理论实战(好文收藏)本文目录:一、数据流向二、应用示例三、何为数仓DW四、为何要分层五、数据分层六、数据集市七、问题总结导读数仓在建设过程中,对数据的组织管理上,不仅要根据业务进行纵向的主题域划分,还需要横向的数仓分层规范。本文作者围绕企业数仓分层展开分析,希望对你有帮助。因文章太长,本文不是完结版,文末可获取完整PDF版从事数仓相关工作的人员都知道数仓模型设计的首要工作之一就是进行模型分层,可见模型分层在模型设计过程中的重要性,确实优秀的分层设计是一个数仓项目能否建设成功的核心要素,让数

    2022年6月26日
    74

发表回复

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

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