dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: librbcodec update; directory structure discussion

librbcodec update; directory structure discussion

From: Sean Bartell <>
Date: Wed, 13 Jul 2011 15:36:44 -0400

Hi all,

My codec test program (warble) is now in FS. It needs some codec API
changes in FS#12189, and the actual program is in FS#12190 [1].

I've also gotten the DSP and metadata code compiling as a library. It
has its own makefile, rbcodec.make, that builds librbcodec.a from the
DSP and metadata code and makes the codecs. The Rockbox build process
uses this and links librbcodec.a into the rockbox executable, with the
end result no different from current builds. The test program is also
changed to use this library. I'm now working on cleaning up these

One issue raised about these changes is where the librbcodec files
should be moved. My current version moves them to /rbcodec, with dsp,
metadata, and codecs subdirectories. Saratoga is doubtful the files
should be moved at all [2], which means they would be copied out of
/apps for a librbcodec release. JdGordon thinks they should be moved to
/lib/rbcodec [3]. I'm inclined to put them in one directory because
they're becoming independent from the rest of Rockbox, and it would make
the build process cleaner.

Once that's resolved and the build-as-library patches are in, I'll
resume work on removing dependencies. This means dependencies on Rockbox
header files outside librbcodec and functions like strlcpy. Since this
is embedded software, wrapper functions and redundancy should be

In my current solution, the user of the library provides a file (say
rbcodecinterface.h) that declares or #defines system functions like
open(). It can also optionally #define library functions like strlcpy();
if it doesn't, a version provided with librbcodec will be used. There
will be an rbcodecinterface.h for normal Rockbox builds as well as a
POSIX rbcodecinterface.h used by the test program. This solution is
quite efficient; its downsides are that it's a bit tricky and

Finally, I've submitted three miscellaneous fixes: FS#12163 (AIFF on
64-bit), FS#12164 (r30060; slightly incorrect behavior in cook and
atrac3_rm), and FS#12188 (Perl scripts with Perl 5.14.0).


Sean Bartell
Received on 2011-07-13

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy