Rockbox Development > Feature Ideas

Porting modplug...?

<< < (2/5) > >>

saratoga:

--- Quote from: delt on August 25, 2008, 08:52:13 PM ---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.



--- End quote ---

You can do that, but it means you can't use the buffering system, and so would have to write your own.

Llorean:
The playback system does essentially keep the original file in memory, decode to a PCM buffer, and then discard the PCM buffer as it's played.

As I think I said above, there's a significant problem when there's not enough RAM available to fit the original, compressed file. With streaming files you can dispose of played compressed data. Basically, someone needs to figure out a proper way to handle non-streaming data in the playback system.

delt:
I still say it can be done. I mean, if you can play doom and have a gameboy emulator on rockbox - both with low latency sound - it's certainly possible to make a plugin that plays s3m and xm files. At least within the limits of the hardware it's running on. It won't be a simple matter of copy/pasting code from modplug, but it most certainly can't be that hard to do.

I'm a bit busy with other stuff these days, but i look forward to become acquainted with rockbox's source code in the relatively near future.

GodEater:
Llorean didn't say it couldn't be done - he said it wouldn't be easy with the current design of the playback engine.

Doom and Rockboy don't use the playback engine.

Captain Kewl:
http://www.rockbox.org/tracker/8806 -- not Modplug, but it does play other mod formats (and renders .mod more completely).

Incidentally, I did do some preliminary work on a proper Mikmod codec about a month back, but pretty much ran into the same problems as the previous attempt: the 512k codec buffer makes it impossible to render anything more than some really simple .mod files.  I attempted to hijack the file buffer and use that for memory allocation, but then that broke, well, file buffering.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version