Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Android 中按顺序播放 3 种声音。我创建了一个 SoundPool 并将“maxStreams”设置为“1”,认为在 for 循环中声音会“一次播放一个”,而不是一次播放。不幸的是,这是错误的。如何使用 soundPool 按顺序播放声音,而不是一次播放所有声音。谢谢。
SoundPool 没有队列功能。它只会在需要流时停止以前的声音。
如果超过最大流数,SoundPool 将首先根据优先级自动停止先前播放的流,然后根据该优先级内的年龄。
声池文档