Rockbox Development > Starting Development and Compiling

Audio Overload (aosdk) codec for PSF, etc.

(1/2) > >>

gomtuu:
Tonight, I took a stab at porting the Audio Overload SDK library to Rockbox. I'm not really a C programmer, so it took me several hours just to get it compile. (I had to relearn how make works.) I did get it to compile, though, and it actually plays PSFs! (I haven't tried other AOSDK formats yet.) But the UI Simulator crashes frequently while the codec is in use or after it has been used.

Before I go on, is this even the place to discuss this kind of thing? I didn't know whether I should start a patch tracker entry for something this early in development... I apologize if I'm doing this wrong.

The UI Simulator usually either crashes as soon as a PSF song starts playing, or (it seems) when the window handles events, like losing focus. I haven't seen it crash BEFORE playing a PSF file, so I don't think it's a general stability problem with the way I'm compiling Rockbox, and so far it doesn't seem to crash in the middle of a song if I leave the window alone. I haven't tried it on real hardware yet. My simulated target is the Sansa Clip+.

Here's the error I'm getting:


--- Code: ---*** glibc detected *** ./rockboxui: free(): invalid next size (fast): 0x0000000002b16560 ***
======= Backtrace: =========
/lib/libc.so.6(+0x774b6)[0x7fd751d694b6]
/lib/libc.so.6(cfree+0x73)[0x7fd751d6fc83]
/usr/lib/libpulse.so.0(pa_xfree+0x2e)[0x7fd7518de95e]
/usr/lib/libpulsecommon-0.9.21.so(pa_pdispatch_run+0xd8)[0x7fd751469528]
/usr/lib/libpulse.so.0(+0xfafd)[0x7fd7518bcafd]
/usr/lib/libpulsecommon-0.9.21.so(+0x29564)[0x7fd75146d564]
/usr/lib/libpulse.so.0(pa_mainloop_dispatch+0xf3)[0x7fd7518ca3d3]
/usr/lib/libpulse.so.0(pa_mainloop_iterate+0x48)[0x7fd7518ca808]
/usr/lib/libSDL-1.2.so.0(+0x34b19)[0x7fd7520a9b19]
/usr/lib/libSDL-1.2.so.0(+0x8723)[0x7fd75207d723]
/usr/lib/libSDL-1.2.so.0(+0x103f5)[0x7fd7520853f5]
/usr/lib/libSDL-1.2.so.0(+0x535f9)[0x7fd7520c85f9]
/lib/libpthread.so.0(+0x7971)[0x7fd751697971]
/lib/libc.so.6(clone+0x6d)[0x7fd751dd892d]
======= Memory map: ========
(snipped 60 lines or so)

--- End code ---

I don't have any idea how to go about diagnosing a problem like this... I'd appreciate any pointers.

Thanks.

Llorean:
Generally, as soon as you have any code that is working (even if only partially) it's a good idea to post a patch. If you get far more busy tomorrow, at least your code will still be around for someone interested to pick up.

Of course, we always hope you'll stick around and contribute, and we're glad to see work on a new codec, but it's always best to account for the worst.

saratoga:
Here is fine to ask questions.  I would start an FS task soon though so that people can look at your code.

I don't know much about the simulator, but if you get nondeterministic crashes in the sim I would guess memory corruption.  Does this library use malloc?  If so, I would double check carefully that its not running out of memory.  

Edit:  Also reading through the source code you linked, I see a couple potential issues.  

1)  Theres some doubles and floats in a few places.  You'll probably want to get rid of those before you try it on device (sim won't mind since x86 has an FPU).

2)  Some of those included libraries are under various nasty licenses that are not GPL compatible.  Make sure you're not compiling any of the files with MAME licenses or anything like that with rockbox.  You may have some work cut out for you, the author's of that library seem unconcerned with mixing free and unfree software.

gomtuu:
Yeah, I was worried about the mixed licenses... Should I really create a patch if there are going to be license issues?

saratoga:

--- Quote from: gomtuu on December 22, 2010, 12:48:09 PM ---Yeah, I was worried about the mixed licenses... Should I really create a patch if there are going to be license issues?

--- End quote ---

I wouldn't create a patch for anything that MAME licensed.  Are you using the MAME bits of that program?

Navigation

[0] Message Index

[#] Next page

Go to full version