These operations can only be used in limited circumstances and have
exactly one user. bufgettail especially seems of dubious value; how
often do you need to read N bytes from the end of a file without
changing the file position?
strip_tags() was the only function using them, to strip off ID3v1
and APE tags off the end of buffered tracks. This would save only
32-192 bytes per track -- if the container format uses APE/ID3v1.
It hardly seems worth the effort.
Change-Id: I8fc3c1408517eda6126e75e76d76daea904b50eb
Left shifts are not defined in C if they would cause signed overflow,
so these expressions get instrumented, which makes them unusable as
switch values and triggers compile errors when compiling with UBSan.
Change-Id: I0588d4be1e00ba1cfde0eac119ead368b20d10c9
decrease size hit of initializing asf by using a union
remove init from bytes LE conversion in metadata common
-- bad idea for performance
Change-Id: I4514adc125e5da2b99d9f913ba74afd5f1345822
fix bugs introduced in the switch over to using string_option
instead of if else strcmp trees,
embedded album art should work again
skin parser had an error for 'noborder' and 'nobar'
Change-Id: I957d81e5fa8467b33bbd93d63c4428c36100acca
didn't set the genre string to null on case entry
means read failure would leave genre string indeterminate
add explicit NULL & leave genre uninitialized
Change-Id: I1452a0b57985646c982ec80755d0df9d03745f1e
Encountered a file with ~600K of ID3v1 headers.
Optimize the potential overhead by minimizing reverse seeks.
Change-Id: I972dbf1af1c36659f19c7ab4eed0b9149c642880
The old code would seek forward by the frame length, expecting to see a
frame header there, perform a validity check, and then seek back to the
current header.
Unfortunately this doesn't handle situations where there is extra padding
between the frames, leading us to potentially read garbage, causing the
validity tests to fail and rejecting the file outright.
Instead, keep track of the previous valid header/position, and if we find
"valid" headers in a row return the first after seeking back to it.
This change allows the file referenced in FS13299 to be properly parsed, but
further work is needed to get the file to be playable. (file reports itself
as layer 1, variable bit rate, variable sample rate!)
Change-Id: I85f61a6360cc041a172db4b7a6b5516e5b60ceee
As per multiple user requests:
https://forums.rockbox.org/index.php/topic,53319.msg
The acceptable size for id3v2 fields currently maxes out at
240 bytes on targets with more than 2MB of memory.
The comments field, especially for Podcasts, can sometimes
contain significantly more characters than Rockbox allows.
The limit for devices with more than 8MB of memory
is increased to 500 bytes for individual fields, and
to 1800 bytes for the buffer containing all fields.
Change-Id: I4593372229158756f102f67bcc4a43e64f632d58
mp4 files can have multiple 'mdat' chunks. This is common for
audiobooks, where there is often a secondary mdat containing the
chapter names, but it's also legal to have multiple mdat chunks
for a single logical "track"
This confuses the mp4 metadata parser, which assumes there is
only a single mdat, and always uses the last mdat seen to
determine the "filesize" of the data we're trying to decode.
Work around this by appending each mdat's size to result in the final
"filesize"
Change-Id: I3e7a7efb0f05ef965e8d77f79e450c957524a480
This codec requires floating point.
Original author: Peter Sovietov
Ported to Rockbox: Roman Skylarov
Further integration and bugfixes: Solomon Peachy
Change-Id: I781ecd3592dfcdbbc694063334350342534f1d6c
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.
Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
* Properly account for ID3v1 tags
* Play time computation fixes
* Add speech feedback
Patch by Igor Poretsky
Change-Id: Ia6df8fb171882a88527cfa9d3b76b705f09becdd
Files with extension "aac" in ADTS or ADIF format are now playable.
Full credit goes to Igor Poretsky.
Change-Id: I413b34e15e5242fea60d3461966ae0984080f530
* More tolerance to the file format variations.
* AC3 coded files in realaudio format are now playable
Full credit to Igor Poretsky
Change-Id: Id24e94bc00623e89fb8c80403efa92f69ab1e5d7
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h
Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc