Commit graph

57 commits

Author SHA1 Message Date
Dave Chapman
c72824786a Initial, work-in-progress, version of a WMA codec using Michael Giacomelli's fixed-point and malloc-less WMA decoder (based on the ffmpeg WMA decoder from early 2006, and also building on the work started by Paul Jones). The codec itself and the ASF parsing code were written by me, inspired by the ASF parser in libasf. Current performance is around 400% realtime on gigabeat, 100% realtime on PP and 20% realtime on Coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13769 a1c6a512-1295-4272-9138-f99709370657
2007-07-03 09:25:36 +00:00
Dave Chapman
1feb8bd4a1 Minor header file cleanup - try and include the minimal number of files, and only where they are needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13344 a1c6a512-1295-4272-9138-f99709370657
2007-05-07 13:32:56 +00:00
Dave Chapman
9a011f3a80 Clean up the codec API - remove all unused (and in many cases inappropriate) functions, move functions used only by encoders into the HAVE_RECORDING part of the API and document the reasons for the more unexpected functions being present.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13343 a1c6a512-1295-4272-9138-f99709370657
2007-05-07 11:09:45 +00:00
Michael Sevakis
26d242ae65 General housekeeping: Make plugin buffer functions take size_t * instead of int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
2007-04-21 18:38:25 +00:00
Jens Arnold
79c8a8cbbe Let GCC check arguments of some more printf-style functions, also for plugins and codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12815 a1c6a512-1295-4272-9138-f99709370657
2007-03-17 09:02:53 +00:00
Jens Arnold
4d6374c923 Get rid of the 'center' parameter for splashes. There were only 2 of almost 500 splashes which were not centered.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 21:56:08 +00:00
Daniel Ankers
6a3a220da1 Bump plugin/codec API versions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12604 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 20:52:25 +00:00
Daniel Ankers
82f9056988 Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 20:06:41 +00:00
Michael Sevakis
598629c3bf SWCODEC Recording Codecs: Fix problems with hanging recording screen (chiefly on x5) when no voice file present and source is not FMRadio. Caused by extra audio stops causing encoder to unload prematurely. Fix is to have separate stop flags for each codec type to prevent collisions. Also now safe to plug into USB when recording and encoder will stay loaded and not be stopped by the call to audio_stop_playback. Additional discovery: playback will not be able to restart after a USB plug during recording. Probably an old bug. I recommend in the future that recording have higher priority on system resources than playback and playback be denied access explicitly if recording requires them. Codec API becomes incompatible so do full updates.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12579 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 04:16:53 +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
Jens Arnold
6b0fdae0f6 Removed unused 'mode' parameter from mkdir() for consistency with creat().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12183 a1c6a512-1295-4272-9138-f99709370657
2007-02-03 10:28:55 +00:00
Jens Arnold
67eb154146 Removed 'mode' parameter from creat(). It wasn't pure posix anyway, it was ignored on target and mixed into 'oflags' in the simulator. * Simplified io.c a bit by defining a dummy O_BINARY for OSes which don't have that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12179 a1c6a512-1295-4272-9138-f99709370657
2007-02-01 23:08:15 +00:00
Jonathan Gordon
f8c68c7912 Simple cpu boost tracker for LOGF builds. Shows the last 64 cpu_boost() calls from the debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12087 a1c6a512-1295-4272-9138-f99709370657
2007-01-22 10:41:25 +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
0f5cb94aa4 Big Patch adds primarily: Samplerate and format selection to recording for SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
2006-11-06 18:07:30 +00:00
Linus Nielsen Feltzing
80ec47f683 Oops
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11058 a1c6a512-1295-4272-9138-f99709370657
2006-09-26 10:10:36 +00:00
Linus Nielsen Feltzing
537c7546f9 Patch #4899 by Robert Keevil - Automatic pause on iPod when removing the headphones
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11057 a1c6a512-1295-4272-9138-f99709370657
2006-09-26 10:03:56 +00:00
Miika Pekkarinen
a85044bf9e New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked
lists to eliminate unnecessary task switching to improve performance.
Audio should no longer skip on swcodec targets caused by too CPU
hungry UI thread or background threads.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-09-16 16:18:11 +00:00
Michael Sevakis
4fc717a4c1 Added FS#2939 Encoder Codec Interface + Codecs by Antonius Hellmann with additional FM Recording support and my modifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10789 a1c6a512-1295-4272-9138-f99709370657
2006-08-28 22:38:41 +00:00
Linus Nielsen Feltzing
81537d49df No need to include button.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10338 a1c6a512-1295-4272-9138-f99709370657
2006-07-27 13:09:24 +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
62ccbbb418 Rework track skipping. Full playback stop is no longer involved in track skipping. Further simplification of the play related functions can be achieved with this in place, but that's for later. Known skip related bug, high pitched noise sometimes, otherwise stuff is better
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9601 a1c6a512-1295-4272-9138-f99709370657
2006-04-11 03:55:58 +00:00
Miika Pekkarinen
7c4e0c8730 Initial version of tagcache! There are still some bugs in the engine
and much more problems with the UI.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9256 a1c6a512-1295-4272-9138-f99709370657
2006-03-26 11:33:42 +00:00
Brandon Low
86f1e2ead2 Convert playback.c to use unsigned byte counters, and _minor_ refactoring of buffer callbacks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9227 a1c6a512-1295-4272-9138-f99709370657
2006-03-24 13:43:15 +00:00
Jens Arnold
8ac3ae73c5 More 64bit simulator fixes, coinciding with the long policy this time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8890 a1c6a512-1295-4272-9138-f99709370657
2006-03-03 02:09:58 +00:00
Brandon Low
413da2a3d9 Rework PCM buffer
* Linked list instead of static array buffer pointers
* Variable sized chunks
* Improved mix handling
* Reduction in duplicated code
* Reduced IRAM usage w/o sacrificing performance
* Converted to almost entirely unsigned math
* Add pause function to reduce pcm_* exposure to playback.

This WILL break playback on the iPod until linuxstb makes a followup commit.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8612 a1c6a512-1295-4272-9138-f99709370657
2006-02-07 20:38:55 +00:00
Jens Arnold
e6e8aa9519 Added memmove() to codec API & plugin API, and changed codeclib and plugin libs to use it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8602 a1c6a512-1295-4272-9138-f99709370657
2006-02-06 16:04:01 +00:00
Brandon Low
d2e75bf02d Remove exported pcm functions. Codecs should never be allowed to access
the pcm directly.  Only through the callbacks in playback.c.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8544 a1c6a512-1295-4272-9138-f99709370657
2006-02-03 00:12:11 +00:00
Brandon Low
05dccc3551 Profiling support, tools and documentation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8375 a1c6a512-1295-4272-9138-f99709370657
2006-01-18 20:54:13 +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
Dave Chapman
77bf6bf370 iPod: current_tick is now a variable, so we can export it via the plugin and codec APIs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8225 a1c6a512-1295-4272-9138-f99709370657
2005-12-12 14:05:14 +00:00
Daniel Stenberg
f981ea93fb kill gcc4 warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8162 a1c6a512-1295-4272-9138-f99709370657
2005-12-05 22:44:42 +00:00
Dave Chapman
e12f797311 iPod: current_tick is (currently) a macro - so we exclude it from the plugin and codec APIs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7826 a1c6a512-1295-4272-9138-f99709370657
2005-11-12 15:45:48 +00:00
Jens Arnold
859d4da8de Ooops.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7785 a1c6a512-1295-4272-9138-f99709370657
2005-11-08 01:21:45 +00:00
Thom Johansen
6dfe98e196 Fixed an #if that would never trigger. Added inclusion of dsp.h and playback.h, since lots of codecs include these when they really shouldn't have to.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7605 a1c6a512-1295-4272-9138-f99709370657
2005-10-10 15:54:36 +00:00
Jens Arnold
ba966c1761 Archos recording/playback: (1) Xing header creation: * Now estimates the framecount from the recording time if the MAS frame counter saturates, so it always writes a valid Xing header. * Reverted my brainless short-xing-header change. This was only valid for layer 3. (2) Xing/VBRI header evaluation: Fixed possible overflow in bitrate calculation. (3) MPEG thread: Avoid double chunk size limiting for the rare case of 8 MB modded Ondios.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7522 a1c6a512-1295-4272-9138-f99709370657
2005-09-15 05:29:26 +00:00
Jens Arnold
a317d74d8e Iriver: Changed the IRAM splitting between core and plugins to 48KB/48KB, and reduced the main thread stack to 8KB, same size as on archos.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7447 a1c6a512-1295-4272-9138-f99709370657
2005-09-01 20:57:33 +00:00
Jens Arnold
d6c054575b Renamed CONFIG_HWCODEC and MASNONE to the more appropriate CONFIG_CODEC and SWCODEC, respectively.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7416 a1c6a512-1295-4272-9138-f99709370657
2005-08-29 21:15:27 +00:00
Jens Arnold
99a0598c28 Major peakmeter rework: * Changed set/get functions for dbfs mode to bool type. * Removed performance setting, leaving (slightly adapted) high performance mode only. * Refresh rate is always 20 Hz now. * Readout doesn't do an extra (hidden) peek, should allow for slightly better clip detection. * Brought back high performance peakmeter for recording. Peakmeter stops hogging the CPU when the disk is spinning; this is enough to avoid the performance problem when saving data. * Optimisations, code cleanup and code policeing. * (iriver) Reduced CPU load of peakmeter by not calculating excessive overlaps. ** Bumped config block version, so save your settings before upgrading.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7415 a1c6a512-1295-4272-9138-f99709370657
2005-08-29 20:07:17 +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
Miika Pekkarinen
159c52dd36 Initial voice ui support for software codec platforms. Added also a
beep when changing tracks.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7360 a1c6a512-1295-4272-9138-f99709370657
2005-08-20 11:13:19 +00:00
Miika Pekkarinen
20b3897474 Separated buffering stuff from pcm_playback to pcmbuf. Renamed some
function calls (audiobuffer -> pcmbuf etc.).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7131 a1c6a512-1295-4272-9138-f99709370657
2005-07-13 12:48:22 +00:00
Ryan Jackson
d191756286 Resume now starts playback at the point it was stopped, not 2-7 seconds later.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7125 a1c6a512-1295-4272-9138-f99709370657
2005-07-12 16:45:38 +00:00
Linus Nielsen Feltzing
a19acbdadd Removed picky warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7116 a1c6a512-1295-4272-9138-f99709370657
2005-07-12 10:05:13 +00:00
Miika Pekkarinen
645a2e16ed Fixed a simulator crash while trying to play a song. Fixed crossfade
when selecting a new track to play. Most likely fixed a bug which
caused playback to stop on track change.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7094 a1c6a512-1295-4272-9138-f99709370657
2005-07-10 16:33:03 +00:00
Miika Pekkarinen
5c2c991d14 Applied patch "[ 1232957 ] MP3 metadata fixes for software codec".
Thanks to Magnus Holmgren. Now metadata reading is better with
improved performance for mp3 files.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7030 a1c6a512-1295-4272-9138-f99709370657
2005-07-05 19:55:40 +00:00
Linus Nielsen Feltzing
eaf8b2d76d Patch #1232549 by Ryan Jackson, adds seeking and comments to Vorbis playback
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7025 a1c6a512-1295-4272-9138-f99709370657
2005-07-05 08:43:36 +00:00
Daniel Stenberg
a24017f4da Moved the codec and plugin buffer sizes to the config-*.h files instead of
having it repeated in numerous files where they all had to be updated to the
same value if ever changed. This allows specific models to actually have its
own buffer sizes.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6901 a1c6a512-1295-4272-9138-f99709370657
2005-06-27 21:23:03 +00:00