Hi all !
I am investigating the feasibility of porting / writing a DAISY Digital Talking Book player for Rockbox.
My Toshiba Gigabeat F60 is probably the best candidate for a full text+audio player, but I appreciate that most DAPs would be limited to audio-only books (albeit with the full Daisy navigation features).
The 2 main problematic areas are XML parsing and synchronized audio playback.
I believe that XML parsing is possible, but requires some porting effort to get rid of the dynamic malloc/free memory allocation. I am thinking about the MiniXML library, which has a small SAX event-based implementation (we don't need a full-fledge in-memory DOM document).
My immediate concern is the ability to play a portion ("clip") of an MP3 file, starting at a "begin" time and stopping at an "end" time (time offsets are relative to the beginning of the audio content).
The function "play_audio_data()" (available to plugins) takes a buffer of encoded mp3 data it seems, but I do not see how to convert a time offset to a byte offset.
I would basically want to implement something like that:
play_mp3("/books/part1.mp3", "00:00:30.0", "00:02:45.8");
Thanks for your help !
Kind regards, Dan.