gpt4 book ai didi

android - Audio Android.Mixing 一首歌和一段录音!

转载 作者:太空宇宙 更新时间:2023-11-03 11:22:03 28 4
gpt4 key购买 nike

我正在开发一个卡拉 OK 应用程序,我一直在处理来自 android 的音频。我想就如何从录制的语音中保存一首歌曲并在后台播放另一首歌曲提出意见。

谢谢

最佳答案

您可以尝试Android 的FFMPEG 库,考虑使用android wrapper .有几个求助的SO答案

Audio song mixer in android programmatically

How to overlay two audio files using ffmpeg

FFmpeg on Android

您可能需要查看 amergeamix ffmpeg 过滤器根据您的需要

SoundPool如果只需同时播放两个音频流就可以满足要求, 是一个不错的选择。

SoundPool can also manage the number of audio streams being rendered at once. When the SoundPool object is constructed, the maxStreams parameter sets the maximum number of streams that can be played at a time from this single SoundPool.

另请注意 Android - Lollipop版本现在支持 multi-channel audio stream mixing

Multi-channel audio stream mixing means professional audio applications can now mix up to eight channels including 5.1 and 7.1 channels.

Multi-channel support

If your hardware and driver supports multichannel audio via HDMI, you can output the audio stream directly to the audio hardware.

关于android - Audio Android.Mixing 一首歌和一段录音!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6548083/

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