Rockbox Development > Feature Ideas

Porting modplug...?

(1/5) > >>

delt:
I was wondering, how difficult would it be to port modplug to work as a plug-in on rockbox? The current .mod support is a bit buggy/incomplete, and i'd very much like to see support for .s3m, .xm, and .it files as well. I'm willing to help with development on this.

Modplug is the best open-source option in my opinion, other than the very mangled version of modplug we're currently using in schism tracker ;D

Llorean:
Modplug appears to include C++, it might be a considerable amount of work. And one of the greater concerns for these formats is how to properly buffer them for use in Rockbox playback.

delt:
DOH!! didn't think of that (c++) Yeah it does use classes, but not (much) the weird c++ syntax stuff like &variable in function headers, try {} fail {} etcetc.

But for buffering, isn't it the whole point of modplug to "convert" module files to pcm/wave data on the fly? and then send this data to an audio buffer?

Llorean:
The module files themselves need to be buffered (be in-RAM, as you can't constantly be spinning the disk). Because module files can in some situations be too long to fit in the buffer, and because they can contain loops, there is difficulty as to how to properly manage this aspect of them: You can't loop back to an area that's no longer buffered, but sometimes you can't keep the whole song in-buffer.

Basically, non-streaming files aren't what Rockbox was designed for, and there needs to be some work in general to handle them well. This applies to MIDI as well.

delt:
What about just keeping a copy of the module in memory, and rendering it to pcm one pattern at a time? ie. determine next pattern to play, render that while the current one is playing, and discard pcm buffers of previously played patterns, or cache them according to memory available, usage in orderlist, etc... ?

I would think rockbox's plugin architecture certainly offers enough flexibility for that. It can't be that much different from the music in a gameboy emulator.

Navigation

[0] Message Index

[#] Next page

Go to full version