On Wed, Mar 23, 2011 at 04:19:09PM -0400, Sean Bartell wrote:
> I'm a student and I'd be interested in improving support for module formats
> (MOD, S3M, XM, IT), which are somewhat similar. My concern is that these
> projects are only useful for a small portion of Rockbox users, and they
> require more knowledge about obscure formats than about Rockbox.
Rockbox supports those, but currently using a plugin, so it's not well
integrated with the playback system. There is a version of that code on
the patch tracker that works as a codec (which provides such
integration), but we didn't use that version because of memory
constraints for codecs (module formats basically require the entire file
to be loaded to RAM at the same time, which doesn't fit our regular
playback system at all).
We definitely wouldn't mind having a good solution for this. At first
glance, I'd guess it would involve:
(a) Being able to allocate a chunk of memory easily from a codec. This
is related (or possibly even the same...) as the "Porting buflib from
the pluginlib over to the core and use it to allocate big buffers in
a more dynamic way" idea on our GSoC ideas page.
(b) Possibly changes to the buffering system. I haven't thought this
through entirely and I'm not a specialist, so maybe this isn't
As a side note, this work wouldn't only benefit module formats. We only
support MIDI as a plugin for very similar reasons (here it's mainly the
patchset that has to be loaded, the midi file itself would probably be
small enough not to be a problem usually), and allowing codecs to
allocate more RAM as needed would also allow us to dedicate less RAM to
the codecs in the first place (only very few codecs need all the RAM
that's currently set aside for them), which would lead to more RAM for
the playback buffer, and therefore longer battery runtime in general.
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
Received on 2011-03-23