gpt4 book ai didi

android - 是否可以通过 MediaRecorder 或其他类获取当前样本幅度

转载 作者:行者123 更新时间:2023-11-29 00:51:12 26 4
gpt4 key购买 nike

我有一个媒体录音机,想从麦克风录制媒体并获得它是振幅样本。我想尝试立即获得正确的电流幅度调用某些 API 时。但是 MediaRecorde 中只有一个 API 用于获取振幅:getMaxAmplitude,用于获取最大绝对振幅自上次通话以来测量。是否可以瞬时获取当前样本幅度通过 MediaRecorder 或来自麦克风的其他类?

谢谢,此致,陈

最佳答案

MediaRecorder.getMaxAmplitude 的文档说:

Returns the maximum absolute amplitude that was sampled since the last call to this method. Call this only after the setAudioSource().

因此,您可以在一个小的时间间隔内采样两次,然后查看第二个值。这实际上是一个瞬时样本。

关于android - 是否可以通过 MediaRecorder 或其他类获取当前样本幅度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2010800/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com