I am trying to create my own wrapper for FLAC, so that I can use FLAC in my own Python code.
At first I tried using ctypes, but it showed a really strange interface for the library, for example. all init functions for FLAC streams and files became one function without real information on how to initialize it. Moreover, he wants a link to the stream decoder, but Python has no way to store pointers ( BZZZT! ), And therefore I cannot save the pointer to the stream decoder. This does not help that different init functions have a different number of arguments, and some types of arguments differ. It also has many enumerations and structures, and I don’t know how to include them in my code.
I looked at Pyrex, but somehow I ran into the same issue with pointers, but I think I solved it, sort of. The file is also small, and it is not even complete .
So, I'm looking for alternatives or guides that will help me better understand the above methods. This will really help if I can get a recommendation and / or help.
Bocom source
share