In the GUI, I would not consider to offer the user to upload any file not having a supported extension, i.e. only MP3 at the time being. A basic MP3 sanity check as discussed above would be a good idea.
Okay, so I will add a file extension check when the download button should be unlocked and perhaps try to implement this sanity check in the actual upload code.
As long as you keep to plain basic C, as it is used in libhimd (and himdcli), please feel free to move the code to libhimd. It is what should be done in my oppinion anyway.
[...]
As we have an himd_mp3stream, we should add an himd_mp3writestream
[...]
The abstraction layer libhimd currently provides is on the layer of streams and frames, so opening the file, extracting ID3 tags and splitting it into frames should not really go into libhimd, but generating the TOC entry for the track index (including adding the strings to the string table) would belong there.
Good, I will try this. The himd_mp3writestream sounds like a good solution. I will include ID3 tag reading and title writing but perhaps in another function, so it
will be easier to move it to a higher-level API later. Kevin