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


相关推荐

  • 谷歌安装Hackbar

    谷歌安装Hackbar首先下载Hackbar插件:将其中的压缩包拖拽到Chrome的扩展程序。点击详细信息在下面的“来源”处点击一个链接:会跳转到给插件在Chrome中安装的文件位置,打开hackbar-panel.js文件将三处disable_hackbar()函数替换成init(),保存即可。完成…

    2022年5月24日
    189
  • gtest测试用例_数据字典简单例子

    gtest测试用例_数据字典简单例子#includeintfun1(){return10;}classtest:public::testing::Test{public:intfun2(){return1;};};TEST(fun1,test_fun){EXPECT_EQ(10,fun1());//单个函数的测试}TE

    2022年9月27日
    0
  • Java基础:instanceof用法详解以及注意事项

    Java基础:instanceof用法详解以及注意事项Java基础:instanceof用法详解以及注意事项instanceofinstanceof使用注意事项instanceof使用示例instanceof应用场景instanceofinstanceof是Java的一个保留关键字,左边是对象,右边是类,返回类型是Boolean类型。它的具体作用是测试左边的对象是否是右边类或者该类的子类创建的实例对象,是,则返回true,否则返回false。instanceof使用注意事项先有继承关系,再有instanceof的使用。当该测试对象创建时右边的声明

    2025年6月22日
    1
  • 腾讯云服务器安装宝塔教程_云服务器的安装

    腾讯云服务器安装宝塔教程_云服务器的安装安装SVN服务端1、安装Subversion(Subversion是一个版本控制系统,相对于的RCS、CVS,采用了分支管理系统,它的设计目标就是取代CVS。)yum命令安装SVN:yuminsatll-ysubversion2、创建SVN版本库2.1创建项目版本库:mkdir-p/data/svn/myproject2.2配

    2022年10月17日
    1
  • goland2021.07激活码【最新永久激活】[通俗易懂]

    (goland2021.07激活码)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.htmlS3…

    2022年3月22日
    109
  • LOAM 论文及原理分析「建议收藏」

    LOAM 论文及原理分析「建议收藏」前言:由于对三维激光SLAM比较感兴趣,并且最近也在找无人驾驶激光SLAM算法的岗位,所以花了一个多月把LOAM的论文和源码好好看了一遍。发现论文还是比较容易明白,但一看代码全是坑。看论文懂了,看代码似懂非懂。为了尽快把这坑填上,所以诚邀读者一起探讨。作者始终认为填坑最好的方法是拉别人和你一起填坑。由于三千多行的源码不是一篇博客能够讲明白的,所以这篇博客主要讲一下我对LOAM论文…

    2022年5月11日
    33

发表回复

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

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