I am working on a cross-platform music player app with Flutter. I encounter a problem with reading audio metadata. I have found a package to read called Metadata God but it supports a few types of file formats. I need to support MP3, M4A, WMA, OGG, OPUS, FLAC, WAV, and ALAC file types and fetch more metadata fields like genre, mood, language, rating, and more.
I know that TagLib c++ library can do what I require but I couldn't find documentation or example to work with c++ objects using dart FFI. And also it is pretty complicated to compile TagLib inside Flutter plugin project. I can compile it on CMake GUI.
So I am thinking to compile TagLib as a shared library (dll, so, or dylib) and create wrapper functions to bind it using FFI. Please give me an example of how to do that or other suggestions to resolve those difficulties.