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.
有没有办法将声音文件的 URI 加载到 SoundPool 中?我试过poolMap.put(id, spool.load(sfxURI.getPath(), 0));了,但没有用。
poolMap.put(id, spool.load(sfxURI.getPath(), 0));
除非您知道字段在服务器上的长度,否则它不会可靠地工作。使用媒体播放器。soundpool 仅适用于短声音。阅读 SDK 页面。:)