I am currently trying to implement something where (on Android, iOS & PC) mp3s are loaded at runtime and played back to the user. I also need to be able to access the raw PCM data to do some processing on it.
Using the WWW class is no option, because that eats memory like no other. (Even if that weren’t a problem, due to a bug in the getData method of AudioClip I can not access the raw data, once I’ve created an AudioClip from a file loaded through the WWW class. And then it also won’t read mp3s on some platforms)
I have tried various libraries and so far only paid ones worked (fmod, etc), but these are not an option for me. (I need an open source solution)
Currently trying to get ffmpeg to work, but none of the C# wrappers I have found seem to be any good. The neat thing about it is that it uses streams though, which greatly reduces memory usage especially when handling PCM data. …If I could just get it to work.
Does anyone have any experience in that regard? Help with either ffmpeg or another approach would be greatly appreciated!