Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Audio Overload (aosdk) codec for PSF, etc.
« previous next »
  • Print
Pages: [1]

Author Topic: Audio Overload (aosdk) codec for PSF, etc.  (Read 3048 times)

Offline gomtuu

  • Member
  • *
  • Posts: 4
Audio Overload (aosdk) codec for PSF, etc.
« on: December 22, 2010, 01:05:15 AM »
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: [Select]
*** 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)

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

Thanks.
« Last Edit: December 22, 2010, 01:08:30 AM by gomtuu »
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #1 on: December 22, 2010, 01:15:30 AM »
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.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #2 on: December 22, 2010, 01:16:06 AM »
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.
« Last Edit: December 22, 2010, 01:24:02 AM by saratoga »
Logged

Offline gomtuu

  • Member
  • *
  • Posts: 4
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #3 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?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #4 on: December 22, 2010, 07:16:35 PM »
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?

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

Offline gomtuu

  • Member
  • *
  • Posts: 4
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #5 on: December 22, 2010, 09:47:08 PM »
Quote from: saratoga on December 22, 2010, 07:16:35 PM
I wouldn't create a patch for anything that MAME licensed.  Are you using the MAME bits of that program?

Yeah, according to the license.txt file that came with AOSDK, some of the files I'm using are MAME, some are BSD, and some are GPL. (Zlib is also required, but its license seems pretty liberal.)

I guess I could try porting SexyPSF instead. It's GPL, but unfortunately it doesn't support as many formats (not even PSF2) and it doesn't seem as easy to use...
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #6 on: December 22, 2010, 10:21:15 PM »
Quote from: gomtuu on December 22, 2010, 09:47:08 PM
Quote from: saratoga on December 22, 2010, 07:16:35 PM
I wouldn't create a patch for anything that MAME licensed.  Are you using the MAME bits of that program?

Yeah, according to the license.txt file that came with AOSDK, some of the files I'm using are MAME, some are BSD, and some are GPL. (Zlib is also required, but its license seems pretty liberal.)

The authors put their names in the source.  You could email them and point out that they can't technically even distribute that source under the license they've chosen and ask them for permission to use it under the GPL.  With any luck they're merely confused and not actually jerks.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Audio Overload (aosdk) codec for PSF, etc.
« Reply #7 on: December 23, 2010, 07:05:41 AM »
Quote from: gomtuu on December 22, 2010, 09:47:08 PM
I guess I could try porting SexyPSF instead. It's GPL, but unfortunately it doesn't support as many formats (not even PSF2) and it doesn't seem as easy to use...

Even if SexyPSF doesn't play everything, you'll have a much easier time using the source code for it due to the GPL.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Audio Overload (aosdk) codec for PSF, etc.
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.085 seconds with 16 queries.