summaryrefslogtreecommitdiffstats
path: root/apps/codecs/flac.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-25Add codecs to librbcodec.Sean Bartell1-536/+0
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
2011-12-19FS#12463: Improve performance for multichannel FLAC decoding. Speeds up ↵Andree Buschmann1-10/+17
decoding by 3 MHz on PP5022, 6-7 MHz on S5L870x and 11-12 MHz on MCF5250. 5.1-88kHz-files still do not decode in realtime on Coldfire and PP502x. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31367 a1c6a512-1295-4272-9138-f99709370657
2011-12-14FS#12443: Implement downmixing to stereo for multichannel flac.Andree Buschmann1-3/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31253 a1c6a512-1295-4272-9138-f99709370657
2011-12-10Fix decoding of multichannel flac, refactor sample buffer handling and ↵Andree Buschmann1-3/+19
decorrelation (taken from ffmpeg sources) and add some flac details to the manual. Solves FS#12371. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31207 a1c6a512-1295-4272-9138-f99709370657
2011-08-28Commit work started in FS#12153 to put timing/position information in PCMMichael Sevakis1-1/+3
buffer chunks. * Samples and position indication is closely associated with audio data instead of compensating by a latency constant. Alleviates problems with using the elapsed as a track indicator where it could be off by several steps. * Timing is accurate throughout track even if resampling for pitch shift, whereas before it updated during transition latency at the normal 1:1 rate. * Simpler PCM buffer with a constant chunk size, no linked lists. In converting crossfade, a minor change was made to not change the WPS until the fade-in of the incoming track, whereas before it would change upon the start of the fade-out of the outgoing track possibly having the WPS change with far too much lead time. Codec changes are to set elapsed times *before* writing next PCM frame because time and position data last set are saved in the next committed PCM chunk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30366 a1c6a512-1295-4272-9138-f99709370657
2011-04-27Commit FS#12069 - Playback rework - first stages. Gives as thorough as ↵Michael Sevakis1-35/+27
possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
2011-02-20Enforce that codecs wait for their metadata in a proper-ish and consistent ↵Michael Sevakis1-6/+7
manner. Sort of a halfway patch; best would be to give them an internal copy of the current track information which lasts unaltered by playback until a track switch or unload. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29348 a1c6a512-1295-4272-9138-f99709370657
2010-09-15flac: more detailed debug messageRafaël Carré1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28087 a1c6a512-1295-4272-9138-f99709370657
2010-08-03flac: error out if max blocksize is larger than we can handle.Nils Wallménius1-1/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27676 a1c6a512-1295-4272-9138-f99709370657
2010-07-25codecs: mark some local variables with 'static'Nils Wallménius1-4/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27566 a1c6a512-1295-4272-9138-f99709370657
2010-05-15Fix logf lines in codecs (type mismatches)Jeffrey Goode1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26038 a1c6a512-1295-4272-9138-f99709370657
2009-08-08Fix FS#10476. Prevent FLAC bitrate calculation overflow with large files. ↵Boris Gjenero1-1/+2
The watermark depends on the bitrate, and so this also fixes playback pauses on large FLAC files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22211 a1c6a512-1295-4272-9138-f99709370657
2009-03-29Fix FS#10067: Crash when playing very short (less than a second) FLAC files.Magnus Holmgren1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20567 a1c6a512-1295-4272-9138-f99709370657
2009-01-10Calculate watermark from bitrate and harddisk spinup time.Björn Stenberg1-2/+0
Use a smaller PCM buffer on targets with 2MB or less ram. (FS#9703) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19743 a1c6a512-1295-4272-9138-f99709370657
2008-12-29Make local functions static in codecs, where possible.Bertrik Sikken1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19612 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-02-24Try to fix resume problems for FLAC files.Magnus Holmgren1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16404 a1c6a512-1295-4272-9138-f99709370657
2007-11-05Remove conf_filechunk, it should never have been a setting and its ↵Brandon Low1-1/+0
implementation doesn't do what it claims any way git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15478 a1c6a512-1295-4272-9138-f99709370657
2007-10-25Fix a fixme in flac and make the usage of the read_filebuf codec api more ↵Brandon Low1-8/+4
consistent with its actual contract. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15303 a1c6a512-1295-4272-9138-f99709370657
2007-03-18Fix several printf-style warnings in logf builds.Magnus Holmgren1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12830 a1c6a512-1295-4272-9138-f99709370657
2007-02-10SWCODEC: Annoying neatness update. Use intptr_t for codec_configure_callback ↵Michael Sevakis1-5/+5
and dsp_configure and stop all the silly type casting of intergral types to pointers to set dsp configuration and watermarks. Shouldn't have any effect on already compiled codecs at all. Will fix any important patches in the tracker so they compile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12259 a1c6a512-1295-4272-9138-f99709370657
2007-02-07Fix resampling clicking as much as possible at the moment. 1) Upsampling ↵Michael Sevakis1-5/+2
clicked because of size inaccuracies returned by DSP. Fix by simplifying audio system to use per-channel sample count from codec to pcm buffer. 2) Downsampling affected by 1) and was often starting passed the end of the data when not enough was available to generate an output sample. Fix by clamping input range to last sample in buffer and using the last sample value in the buffer. A perfect fix will require a double buffering scheme on the resampler to sufficient data during small data transients on both ends at all times of the down ratio on input and the up ratio on output. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12218 a1c6a512-1295-4272-9138-f99709370657
2007-02-04Fixed 64 bit warning.Jens Arnold1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12192 a1c6a512-1295-4272-9138-f99709370657
2007-02-04Try to fix the simulator build warnings.Magnus Holmgren1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12189 a1c6a512-1295-4272-9138-f99709370657
2007-02-04Fix playback of mono FLAC files, so they don't play in the left channel only.Magnus Holmgren1-1/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12188 a1c6a512-1295-4272-9138-f99709370657
2006-12-07Minor corrections to FLAC seeking calculationsAdam Boot1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11687 a1c6a512-1295-4272-9138-f99709370657
2006-11-26FS#6357, patch 1: let iramcopy and bss share the same space in codecs andTomasz Malesinski1-21/+2
plugins. Currently, in case of plugins using IRAM bss is cleared twice, once in the loader, once in PLUGIN_IRAM_INIT. For codecs, bss is cleared only during codec initialization. Also, removed double variables in codecs storing a pointer to codec_api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11606 a1c6a512-1295-4272-9138-f99709370657
2006-11-26SWCODEC: Stop clicks between tracks when resampler is active by only ↵Michael Sevakis1-1/+1
switching the DSP frequency and not resetting the resampler at track boundaries. Will make sure DSP is correctly flushed at dicontinuities but don't hear any problems currently. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11600 a1c6a512-1295-4272-9138-f99709370657
2006-11-09Added macros controlling what goes to IRAM on different targets.Tomasz Malesinski1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11483 a1c6a512-1295-4272-9138-f99709370657
2006-11-08Sample-accurate seeking for FLACAdam Boot1-54/+241
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11474 a1c6a512-1295-4272-9138-f99709370657
2006-10-27Re-enable the currently unused and broken dithering and noise shaping code ↵Thom Johansen1-1/+0
already in Rockbox, and make it a user option instead of a codec-controlled option. The majority of people probably will not even hear any difference with this enabled, but feedback is welcome. Save your settings! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11368 a1c6a512-1295-4272-9138-f99709370657
2006-06-04Fix bug 5341: Resume in Wav and Flac doesn't start from the position where ↵Magnus Holmgren1-10/+37
it was left off. Mark Arigo helped with the Flac fix. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10051 a1c6a512-1295-4272-9138-f99709370657
2006-04-22First commit of reworking voice to be mroe stable on swcodecBrandon Low1-5/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9758 a1c6a512-1295-4272-9138-f99709370657
2006-04-15Put new_track on the codec_api, and use it instead of the reload_codec ↵Brandon Low1-1/+1
variable in most places. Should help with problems people have had with GUI vs. playback sync. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9670 a1c6a512-1295-4272-9138-f99709370657
2006-03-24Fix warningsBrandon Low1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9230 a1c6a512-1295-4272-9138-f99709370657
2006-03-24Convert playback.c to use unsigned byte counters, and _minor_ refactoring of ↵Brandon Low1-5/+3
buffer callbacks git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9227 a1c6a512-1295-4272-9138-f99709370657
2006-01-29Prevent unaligned memory accesses whilst reading seektable - fixes FLAC ↵Dave Chapman1-7/+13
playback on iPod git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8477 a1c6a512-1295-4272-9138-f99709370657
2006-01-18Part of the profiling patch to use a consistent return path in all codecs to ↵Brandon Low1-5/+11
facilitate 'on exit' functionality git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8374 a1c6a512-1295-4272-9138-f99709370657
2006-01-18New codec loader, using the same mechanism as the new plugin loader. API ↵Jens Arnold1-3/+3
version numbering restarted for the new system. Uses the target ID from configure, so don't change that too often. * Fixed sim_plugin_load_ram() to truncate the tempfile. * Reduced plugin buffer size to 512KB for iriver and iPod. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8362 a1c6a512-1295-4272-9138-f99709370657
2006-01-08Don't include the .bss and .ibss sections in the binary image for codecs and ↵Jens Arnold1-2/+5
plugins. Saves quite some disk space (and buffer space in case of codec changes during playback). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8308 a1c6a512-1295-4272-9138-f99709370657
2005-11-18More stable playback with reduced stuttering when skipping tracks.Miika Pekkarinen1-1/+0
Removed CODEC_SET_FILEBUF_LIMIT setting; now playback.c determines how to buffer the files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7970 a1c6a512-1295-4272-9138-f99709370657
2005-11-06The seek_time member of the codec API needs to be decremented before use as ↵Thom Johansen1-1/+1
a seeking time. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7768 a1c6a512-1295-4272-9138-f99709370657
2005-11-02Enable replaygain for the new FLAC decoderDave Chapman1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7729 a1c6a512-1295-4272-9138-f99709370657
2005-11-02Call ci->seek_complete() callback after processing a seek request (an old ↵Dave Chapman1-1/+1
API change that wasn't implemented in all the codecs) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7717 a1c6a512-1295-4272-9138-f99709370657
2005-10-30Fix bug with FLAC and ALAC output being half the correct volume. The ↵Dave Chapman1-1/+1
DSP_SET_SAMPLE_DEPTH function expects needs clarifying or changing - it seems to expect one less than the number of bits in cases where the depth is greater than the native depth (16 bits). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7692 a1c6a512-1295-4272-9138-f99709370657
2005-10-30Skip ID3v2 tags at the start of a FLAC file.Dave Chapman1-5/+14
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7689 a1c6a512-1295-4272-9138-f99709370657
2005-10-30Optimizations to the FLAC-codec buffer requesting to eliminate theMiika Pekkarinen1-12/+7
need of extra copying. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7685 a1c6a512-1295-4272-9138-f99709370657
2005-10-29Initial seeking support. This only seeks to the nearest point (before the ↵Dave Chapman1-10/+106
target sample) in the seektable. NOTE: not all FLAC files have seektables - some front-ends have the skill to create FLAC files without them. You can add seek points every 10 seconds to a FLAC file with the command: metaflac --add-seekpoint=10s file.flac git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7680 a1c6a512-1295-4272-9138-f99709370657
2005-10-28Add more useful error codes from decoderDave Chapman1-3/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7675 a1c6a512-1295-4272-9138-f99709370657
2005-10-27Prevent compiler warning for LOGF buildsDave Chapman1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7664 a1c6a512-1295-4272-9138-f99709370657