Commit graph

69 commits

Author SHA1 Message Date
Magnus Holmgren
04be8dd7fe Fix inaccurate time display for 44.1 (and 22.05) kHz MP3 audio tracks. Time was off by about 0.2%. Doesn't sound much, but after one hour, that's 8 seconds. Also fix a problem when seeking to near the end of a file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22145 a1c6a512-1295-4272-9138-f99709370657
2009-08-03 20:28:16 +00:00
Andree Buschmann
f7a9125781 Fix FS#10139 (broken seek for very long mp3 files) through avoiding int32 overflow in calculation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20755 a1c6a512-1295-4272-9138-f99709370657
2009-04-20 19:10:27 +00:00
Michael Sevakis
21f0c9a282 Make basic cache functions into calls, and get rid of CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
2009-02-11 12:55:51 +00:00
Bertrik Sikken
8e22f7f5b0 Make local functions static in codecs, where possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19612 a1c6a512-1295-4272-9138-f99709370657
2008-12-29 19:49:48 +00:00
Michael Sevakis
8cfbd3604f Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 08:57:10 +00:00
Michael Sevakis
2041fed03a Opening function brace style police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18574 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 09:23:32 +00:00
Michael Sevakis
5c903724fb Simplify synchronizaton for MPA codec and make it fully atomic, let synth thread exist for life of codec, do a bit of cleanup and use number of cores do determine if it is compiled as multithread instead of CPU type.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18573 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 08:09:04 +00:00
Michael Giacomelli
3dedcfc454 Hopefully fix glitches when seeking in MP3s on dual core processors. Also, clean up initialization and preprocessor commands.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18563 a1c6a512-1295-4272-9138-f99709370657
2008-09-22 01:29:50 +00:00
Michael Giacomelli
4e36a2b991 Commit FS#9318 - MP3 synthesis filter on COP. Loads the MP3 synth filer on to the CoProcessor on all PortalPlayer devices, resulting in an ~90% speedup according to test_codec on the Sansa. Real world improvement is somewhat less, but still considerable. Allows MP3 decoding at 30MHz without boosting, or use of more DSP/EQ with less boosting/skipping, thus improving battery life. Minor changes to mpegplayer to retain compatibility with libmad changes. Should be no significant changes for other targets or codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18557 a1c6a512-1295-4272-9138-f99709370657
2008-09-20 22:06:12 +00:00
Bertrik Sikken
9fe4dbf33c Removed unused abort function implementation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18261 a1c6a512-1295-4272-9138-f99709370657
2008-08-12 21:07:15 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
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-06-28 18:10:04 +00:00
Nicolas Pennequin
73a71a4712 Move audio_set_elapsed to mpa.c, as recommended by the TODO note. Please correct me if affecting ci->id3->elapsed directly (ie without using ci->set_elapsed) is wrong.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16945 a1c6a512-1295-4272-9138-f99709370657
2008-04-03 12:13:03 +00:00
Michael Sevakis
4855e734f3 Move codec_get_file_pos somewhere else like the comment said should be done. Codec API version increment was needed so update all codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16874 a1c6a512-1295-4272-9138-f99709370657
2008-03-29 06:36:53 +00:00
Brandon Low
3f69930aa0 Fix mp3 resume
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15481 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 18:15:52 +00:00
Brandon Low
3379440a4b Remove conf_filechunk, it should never have been a setting and its 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-11-05 17:48:21 +00:00
Brandon Low
d02b5c744e Don't keep useless id3v2 or other leading tag data on the buffer, it could be large
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15465 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 01:56:12 +00:00
Michael Sevakis
d4e904bf35 SWCODEC: Dsp speed optimizations. Changes for more modularity. Removal of some usless stuff. Some assembly routines for Coldfire with speed in mind over size for the outputs but the channel modes remain compact. Miscellaneous coldfire asm updates to accomodate the changes. Codec API structure version has to increase so do a full update.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12472 a1c6a512-1295-4272-9138-f99709370657
2007-02-24 17:06:36 +00:00
Michael Sevakis
97f369a587 SWCODEC: Annoying neatness update. Use intptr_t for codec_configure_callback 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-10 16:34:16 +00:00
Michael Sevakis
aba6ca0881 Fix resampling clicking as much as possible at the moment. 1) Upsampling 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-07 00:51:50 +00:00
Tomasz Malesinski
80da8b141c FS#6357, patch 1: let iramcopy and bss share the same space in codecs and
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-26 18:31:41 +00:00
Michael Sevakis
bbef13eddf SWCODEC: Stop clicks between tracks when resampler is active by only 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-26 12:02:47 +00:00
Thom Johansen
354770088e Re-enable the currently unused and broken dithering and noise shaping code 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-10-27 20:41:33 +00:00
Dave Chapman
fa5caa0b5b Patch from bug report #5200 by Mark Arigo - attempt to fix gapless playback after seeking in an MP3 file. It works for me, but needs more testing with a wider range of files before we can close the bug report - please post feedback on the tracker.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9962 a1c6a512-1295-4272-9138-f99709370657
2006-05-20 09:57:55 +00:00
Magnus Holmgren
d5e1157cf7 Tweak MP3 seeking a little, and don't do gapless trim if a seek has been done.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9848 a1c6a512-1295-4272-9138-f99709370657
2006-05-01 11:54:04 +00:00
Brandon Low
83ce56846a Remove an unneeded define, add a todo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9765 a1c6a512-1295-4272-9138-f99709370657
2006-04-22 21:31:07 +00:00
Brandon Low
f42459ff3b Comment and make pretty the hack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9761 a1c6a512-1295-4272-9138-f99709370657
2006-04-22 15:13:53 +00:00
Brandon Low
4194990d73 Replace one hack with a better hack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9759 a1c6a512-1295-4272-9138-f99709370657
2006-04-22 14:48:05 +00:00
Brandon Low
f3bc1efc49 First commit of reworking voice to be mroe stable on swcodec
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9758 a1c6a512-1295-4272-9138-f99709370657
2006-04-22 14:40:13 +00:00
Brandon Low
ebadcc633a Put new_track on the codec_api, and use it instead of the reload_codec 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-04-15 02:03:11 +00:00
Brandon Low
c76904be53 Fix warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9230 a1c6a512-1295-4272-9138-f99709370657
2006-03-24 14:02:27 +00:00
Jens Arnold
ec70f29f1e Fix remaining warnings in 64bit simulator builds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9196 a1c6a512-1295-4272-9138-f99709370657
2006-03-22 19:51:40 +00:00
Miika Pekkarinen
6d6ca6b6a5 Muting trick to prevent tiny pops and glitchless mp3 seeking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8416 a1c6a512-1295-4272-9138-f99709370657
2006-01-22 10:25:07 +00:00
Miika Pekkarinen
0e159f13cf Fixed a few iriver playback quirks and issues with previous fixes.
Also fixed "TST.." bug when seeking and possible an enhancement to mp3
gapless playback also.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8402 a1c6a512-1295-4272-9138-f99709370657
2006-01-20 22:02:44 +00:00
Brandon Low
1060e447f8 Part of the profiling patch to use a consistent return path in all codecs to facilitate 'on exit' functionality
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8374 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 20:22:03 +00:00
Jens Arnold
b8749fdf21 New codec loader, using the same mechanism as the new plugin loader. API 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-18 00:05:14 +00:00
Jens Arnold
07c4254135 Don't include the .bss and .ibss sections in the binary image for codecs and 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
2006-01-08 22:50:14 +00:00
Magnus Holmgren
0dac8b77b8 iRiver: improved handling of bad mpeg files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8283 a1c6a512-1295-4272-9138-f99709370657
2005-12-22 21:53:21 +00:00
Daniel Stenberg
76667e2a5b fix gcc4 (un)signed warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8124 a1c6a512-1295-4272-9138-f99709370657
2005-12-02 08:42:48 +00:00
Magnus Holmgren
9758911be0 iRiver: re-add an end of file check, to see if it helps the reported problems with gapless MP3 playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8119 a1c6a512-1295-4272-9138-f99709370657
2005-12-01 21:09:09 +00:00
Miika Pekkarinen
9c0f1a9e39 More stable playback with reduced stuttering when skipping tracks.
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-18 20:21:13 +00:00
Thom Johansen
a8b9fd1cf8 Need to set sample depth before clip limits to avoid having clip limits overridden.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7732 a1c6a512-1295-4272-9138-f99709370657
2005-11-02 19:15:25 +00:00
Thom Johansen
6b8bd6bc1a Support large delay fields in LAME header, plus some cleanups.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7731 a1c6a512-1295-4272-9138-f99709370657
2005-11-02 19:02:25 +00:00
Thom Johansen
e6021381ef Introduced usage of IBSS_ATTR and ICONST_ATTR to codec plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7659 a1c6a512-1295-4272-9138-f99709370657
2005-10-27 11:32:02 +00:00
Thom Johansen
4d7e5dfbdc Use correct types to avoid sim warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7627 a1c6a512-1295-4272-9138-f99709370657
2005-10-13 12:15:31 +00:00
Thom Johansen
c91e0bbfc9 Cleaned up the messy codec header and library system by merging codec.h, lib/codeclib.[ch] and lib/xxx2wav.[ch] into just codeclib.[ch]. Deleted much of the unused code in the xxx2wav portion. All codecs should now only include codeclib.h, and whatever codec specific headers are needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7626 a1c6a512-1295-4272-9138-f99709370657
2005-10-13 11:32:52 +00:00
Thom Johansen
0059995326 Cosmetic changes and cleanup. Removed all unused mad_timer code and a couple of unnecessary headers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7623 a1c6a512-1295-4272-9138-f99709370657
2005-10-12 16:25:59 +00:00
Thom Johansen
735208a541 Adapted codecs and DSP system to having MACSR saved in thread context.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7485 a1c6a512-1295-4272-9138-f99709370657
2005-09-07 00:24:27 +00:00
Linus Nielsen Feltzing
984712f291 iriver: The MP3 codec didn't take the ID3 tag size into account when seeking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7391 a1c6a512-1295-4272-9138-f99709370657
2005-08-23 12:52:59 +00:00
Miika Pekkarinen
8a7d104a35 Now codecs will do the buffer flushing after seeking as they find it
necessary.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7369 a1c6a512-1295-4272-9138-f99709370657
2005-08-21 18:12:31 +00:00
Linus Nielsen Feltzing
a387805071 Correct samplecount calculation, suggested by Markus Kaufhold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7336 a1c6a512-1295-4272-9138-f99709370657
2005-08-17 09:34:18 +00:00