简体   繁体   中英

How do I play loaded sound in chunks?

Is it possible to load a compressed mp3 file, take small chunk, decode it to PCM and play, one by one? By far what I saw is an ability to decode the entire mp3 file to PCM, but it eats too much memory. What if I have 20 mp3 files that I need to play simultaneously? It will just crash when I try to decompress them all.

I need this for my online DAW station that I build.

Here is a great solution to this, someone already took care of the same problem I have:

https://github.com/audiocogs/aurora.js/

These guys wrote a special framework for implementing any sound decoder and revealed some examples, including mp3. They have AAC too, which is much better for my needs! Thank you guys, especially a guy, who gave me -1 for some mysterious reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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