This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8806 - MikMod MOD, S3M, IT, XM player
Attached to Project:
Rockbox
Opened by Jason Yu (captainkewl) - Wednesday, 26 March 2008, 07:22 GMT+1
Opened by Jason Yu (captainkewl) - Wednesday, 26 March 2008, 07:22 GMT+1
|
DetailsPlayer for various tracker module formats supported by MikMod 3.1.12 -- http://sourceforge.net/projects/mikmod/
* All MikMod-supported formats should be playable in theory, though viewers.config is set to recognize only MOD, S3M, IT, and XM. Those four formats are the only ones tested. * Only tested on iPod 5G. Realtime playback on most mods; some stuttering on more complex IT files like snowf.it * Had to butcher libmikmod a good bit to get it to compile. As has been noted elsewhere (http://forums.rockbox.org/index.php?topic=4716.msg38535#msg38535), there are colliding namespaces (BOOL, nop) and undefined types (FILE). * Based on midiplay by Karl Kurbjun * dbestfit malloc() replacement by Daniel Stenberg |
This task depends upon
What's the word on building things around existing libraries of code? Problems like what we have here could be dealt with definitively by just cutting out the offending blocks, and we could probably do away with a good number of source files altogether. But I'm hesitant to make any substantial changes to anything as it's not really my code and merging any future updates to the original sources might become difficult.
* Tweaked the Makefile for Coldfire building
* Full (Mikmod internal) volume. Should fix some problems with fading.
* Increased get_more call to render 32768, which fixes stuttering in more complex files. I'm not sure if this will cause any adverse effects though -- I didn't see a value this high used in any other plugin.
* Pause uses internal Mikmod pause function. Pausing a song sounds a whole lot nicer now.
Plugging my iPod into my computer's USB port while playing a file causes the file to stop playing and then crashes the iPod when I try to exit. I'm not sure where to even begin to look.
only at the moment patch doesn't apply cleanly on svn, might need a resync?
Here's a patch that i used after i patched my source with mikmod-plugin-3.zip.
It seems mikmod is running atleast at 200% of it's normal speed. sounds funny tho.
Not sure about the Gigabeat problem as I don't know anything about it and don't have any way to test it, but first guess would be a bad value for SAMPLE_RATE in mikmod_supp.h.
Compiled under r18934 and works without problems on my Sansa c240.
The new 1MB codec buffer isn't intended to stay at that size forever - the intention is to reduce it as much as possible, which will be especially important as Rockbox starts to work on new targets, some of which only have 1MB or 2MB RAM in total.
I know almost nothing about the formats mikmod plays, but looking briefly at the source code, I see that it supports about 18 different file formats - are these 18 different codecs, or just different ways to store the same thing?
You mention in the first comment that you've only tested four formats - MOD, S3M, IT, and XM. How much of the code is shared between these formats? I'm wondering if (with some build-system magic) it would make sense to build separate codecs for each format? This would minimise the codec size, and also give more scope for optimisation (e.g. IRAM usage).
But even that won't solve the main issue of memory usage. Do you know how much memory each of the four main formats requires? Ideally, codecs like this should use the main audio buffer as working memory, which means the buffering API would need changing to meet the needs of these kinds of codecs. The first step towards this would be to try and define this API - i.e. what memory is needed?
It may be easier to discuss this on IRC.