Support and General Use > Audio Playback, Database and Playlists
.mod file format ?
Sherv:
--- Quote from: theli on June 08, 2006, 04:51:22 AM ---
--- Quote from: mahen on June 07, 2006, 05:26:35 PM ---Actually I would be much interested in .spc support ;) What lib / player code are you using atm ?
--- End quote ---
as i've said - a quick and _dirty_ patch is availible on tracker
it is here
http://www.rockbox.org/tracker/task/2727
as you can see it uses openspc
--- End quote ---
Sweet!! It's always been a dream of mine to have portable SPCs and NSFs....one day, hopefully :)
orfax:
--- Quote from: orfax on June 17, 2006, 10:51:44 PM ---I've now played around with it a bit (created a codec), but there are some issues (such as no sound). The version thats in rockbox is an old version. It appears to be modified a little.
--- End quote ---
I have created a working codec using DUMB that plays .mod, .xm, .it & .s3m, BUT (and its a big but) only for the simulator. DUMB uses some floating point functions (floor, pow, log, exp) in order to play these formats. The modified rockbox version had these functions #define'd to something else which breaks playback. As I believe we don't have the floating point functions available for the host devices (ie ipod, iriver, etc) as there is no FPU, I don't think we can use DUMB in its current form.
I'm now having a look at libmikmod (which is used in the PS2 dev community though I haven't used it before). It looks promising as it appears it doesn't use floating point functions. The added benefits are that it supports even more formats (669, med, plus more), though I'm not sure what the quality is like.
dma:
Orfax : Ah great news that you're looking at those replay routs. :)
LibMikMod seems to have been the choice for tracker replay in iPodLinux, so it might be a good one to try indeed.
Its replay is good as far as i recall hearing tunes replayed with it.
orfax:
--- Quote from: orfax on June 22, 2006, 06:11:13 PM ---I'm now having a look at libmikmod
--- End quote ---
I've played around with libmikmod and had a working version of the codec in the simulator.
The following is going to be a little technical...
There are a couple of issues between rockbox and libmikmod (both define BOOL and use it differently) so I've made some changes to libmikmod and created a rockbox driver for it. libmikmod also doesn't provide a way of finding out how long a song is. The codec build in the simulator is a little too big (around 540K) as there is a limit of 512K for a codec, at least for an ipod simulator build. I can strip the debug stuff out and it falls down to ~160K. There are a number of functions that reference FILE * that would never be used so I could remove these and hope the build falls under 512K. Or remove some of the file format loaders, but I don't want to do this. I also only include the rockbox driver, so nothing like the wav file driver, OSS driver, Windows MM driver, etc is included.
Happy with that, I tried to do an ipod build, but came across more problems. There are a number of standard library (and non standard but often available) functions it needs (ie isalnum, malloc, sprintf, strdup, strncat, strncpy,...). Some of these I've had to write myself (strdup, strncat) and others I've referenced the code from firmware/common. Eventually it built, but I decided to remake the simulator again because of the changes. Now the codec in the simulator no longer works, but I'll fix that soon.
Hopefully shortly I'll have a working codec on actual hardware.
orfax:
--- Quote from: orfax on June 27, 2006, 09:25:11 PM ---Hopefully shortly I'll have a working codec on actual hardware.
--- End quote ---
Unfortunately this will not happen soon. After a bit more investigation, the memory consumption of libmikmod is too high for Rockbox. For my test mod (~200K) it allocated around 750K in internal structures. This of course is much higher than is available for a codec. This means to be able to use libmikmod much of the code will need to be rewritten to utilize less memory. Not a simple task. I'm unlikely to do any more to this (my hope was to be able to use an existing library).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version