2011-07-01 58 views

回答

0

不幸的是,我不认为有一个“在设备上”的方式,以两个音频文件合并成一个。你能做的最好的就是同时播放我读过的内容。

Sound Pool Documentation

0

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

Audio song mixer in android programmatically

How to overlay two audio files using ffmpeg

FFmpeg on Android

您可能需要根据您的需求

SoundPool检查amergeamix ffmpeg的过滤器是一个很好的选项,如果需求可以通过一起播放两个音频流。

SoundPool还可以管理正在呈现的音频流数量 。构建SoundPool对象时,maxStreams 参数设置可从此单个SoundPool以 时间播放的最大流数。

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

多通道音频流混合装置专业音频 应用程序现在可以混合多达8个通道,包括5.1和7.1 频道。

多通道支持

如果您的硬件和驱动程序通过HDMI支持多声道音频,您可以 输出的音频直接流音频硬件。