[英]Where can I get the original PCM data from the Android framework?
Where can I get the original pcm data from the Android framework?哪里可以得到Android框架的原始pcm数据? I think I can get it from:
我想我可以从:
Write (const void * buffer, size_t userSize, bool blocking)
in /framework/av/media/libmedia/AudioTrack.cpp
在
/framework/av/media/libmedia/AudioTrack.cpp
However, it differs from the pcm data in the file before streaming service and the pcm data obtained in write.但是,它不同于流服务之前文件中的pcm数据和写入时获得的pcm数据。
I think it is like re-sampling.我认为这就像重新采样。
Where can I get original pcm data?我在哪里可以获得原始 pcm 数据?
Note:笔记:
You have better chance of tapping the pcm
buffer at one layer below the android-framework layer - audio hal.您有更好的机会在 android-framework 层下方的一层 - 音频 hal 处点击
pcm
缓冲区。 Now that would be dependent on the hardware hence I can provide you with some probable examples:-现在这将取决于硬件,因此我可以为您提供一些可能的示例:-
hardware/xxx/audio/hal/audio_hw.c
(Where xxx is qcom in my case) hardware/xxx/audio/hal/audio_hw.c
(在我的例子中xxx是qcom)
in_read()
--> pcm_read()
in_read()
--> pcm_read()
external/tinyalsa/pcm.c
pcm_read()
AudioTrack.cpp 中的 PCM 数据将输入到 AudioMixer 和 AudioEffects 组件中以自定义效果,然后进入音频 HAL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.