简体   繁体   English

在android中录制现有的音频文件

[英]Recording over existing audio file in android

I am currently building an app in android, and I am trying to record my audio over an existing audio file (without changing the length of the file), does anyone know how is it possible to do that?我目前正在 android 中构建一个应用程序,并且我正在尝试通过现有的音频文件录制我的音频(不更改文件的长度),有谁知道如何做到这一点? Everything I tried just puts the audio files one after another in one file.我尝试的一切只是将音频文件一个接一个地放在一个文件中。

A. You should use GGmpeg for Android, for example. A. 例如,您应该为 Android 使用 GGmpeg。 Here you have some questions like yours.在这里,您有一些与您类似的问题。

B. Another approach, although limited, is Android SoundPool. B. 另一种方法虽然有限,但是 Android SoundPool。 Check documentation here . 在此处查看文档。

The sound pool requires you to manage multiple files rather than doing mixdowns and playback of a single file.声音池要求您管理多个文件,而不是对单个文件进行混音和播放。 It would be cool if the soundpool let you grap the output as a IOStream but, alas, the SDK doesn't seem to allow it.如果 soundpool 允许您将输出作为 IOStream 捕获,那将会很酷,但遗憾的是,SDK 似乎不允许这样做。 Further, it would be nice if the AudioRecorder allowed you to grab a stream from the music layer...but that doesn't look possible either.此外,如果 AudioRecorder 允许您从音乐层获取流,那就太好了……但这看起来也不可能。 List of audio inputs: http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html音频输入列表: http : //developer.android.com/reference/android/media/MediaRecorder.AudioSource.html

SOURCE: https://stackoverflow.com/a/2254086/9415337来源: https : //stackoverflow.com/a/2254086/9415337

C. Others suggest also doing it in a backend server. C.其他人建议在后端服务器中也这样做。

D. This might also help you. D.也可能对你有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM