rockbox/lib/rbcodec
Michael Sevakis 4888131972 Update software recording engine to latest codec interface.
Basically, just give it a good rewrite.

Software codec recording can be implemented in a more straightforward
and simple manner and made more robust through the better codec
control now available.

Encoded audio buffer uses a packed format instead of fixed-size
chunks and uses smaller data headers leading to more efficient usage.
The greatest benefit is with a VBR format like wavpack which needs
to request a maximum size but only actually ends up committing part
of that request.

No guard buffers are used for either PCM or encoded audio. PCM is
read into the codec's provided buffer and mono conversion done at
that time in the core if required. Any highly-specialized sample
conversion is still done within the codec itself, such as 32-bit
(wavpack) or interleaved mono (mp3).

There is no longer a separate filename array. All metadata goes
onto the main encoded audio buffer, eliminating any predermined
file limit on the buffer as well as not wasting the space for
unused path queue slots.

The core and codec interface is less awkward and a bit more sensible.
Some less useful interface features were removed. Threads are kept
on narrow code paths ie. the audio thread never calls encoding
functions and the codec thread never calls file functions as before.

Codecs no longer call file functions directly. Writes are buffered
in the core and data written to storage in larger chunks to speed up
flushing of data. In fact, codecs are no longer aware of the stream
being a file at all and have no access to the fd.

SPDIF frequency detection no longer requires a restart of recording
or plugging the source before entering the screen. It will poll
for changes and update when stopped or prerecording (which does
discard now-invalid prerecorded data).

I've seen to it that writing a proper header on full disk works
when the format makes it reasonably practical to do so. Other cases
may have incorrect data sizes but sample info will be in tact. File
left that way may play anyway.

mp3_enc.codec acquires the ability to write 'Info' headers with LAME
tags to make it gapless (bonus).

Change-Id: I670685166d5eb32ef58ef317f50b8af766ceb653
Reviewed-on: http://gerrit.rockbox.org/493
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-06-30 00:40:27 +02:00
..
codecs Update software recording engine to latest codec interface. 2013-06-30 00:40:27 +02:00
dsp Remove old EQ presets. 2013-06-21 16:53:02 +02:00
metadata Fix id3v2 album art if more than one image is present. 2013-06-15 21:04:13 +02:00
test Remove dsp_callback because DSP is now library code, not app code. 2013-05-23 14:25:37 -04:00
SOURCES Rename all the "lin_resample..." stuff to simply "resample_...". 2013-05-07 00:35:46 -04:00
platform.h Missed removing a couple unwanted includes in previous commit. 2013-05-27 03:40:02 -04:00
rbcodec.make Make fixepoint.c as a shared library (libfixedpoint.a). 2013-04-26 00:11:04 +02:00
rbcodecconfig-example.h Properly implement volume in warble. dB cut only. 2013-04-25 23:46:17 -04:00
rbcodecplatform-unix.h rbcodec: abstract tdspeed buffer allocation 2012-05-07 10:29:07 +02:00