Commit graph

57 commits

Author SHA1 Message Date
Andree Buschmann
cc6a780a13 Remove obsolete 'ci->set_elapsed()' from mpc.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30368 a1c6a512-1295-4272-9138-f99709370657
2011-08-28 14:25:38 +00:00
Michael Sevakis
7ad2cad173 Commit work started in FS#12153 to put timing/position information in PCM
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-08-28 07:45:35 +00:00
Andree Buschmann
10a1e8a609 Fix musepack resume for resume positions > 7:30m.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30202 a1c6a512-1295-4272-9138-f99709370657
2011-07-23 20:56:53 +00:00
Michael Sevakis
c537d5958e Commit FS#12069 - Playback rework - first stages. Gives as thorough as 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-04-27 03:08:23 +00:00
Michael Sevakis
85e40257dc Enforce that codecs wait for their metadata in a proper-ish and consistent 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
2011-02-20 15:27:10 +00:00
Nils Wallménius
6325ef978b codecs: mark some local variables with 'static'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27566 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 22:24:53 +00:00
Andree Buschmann
fc1fab4776 Clean up comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27078 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 06:25:18 +00:00
Andree Buschmann
a3541c07de Disable unneeded parts of mpc's file-I/O interface.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27024 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 18:45:34 +00:00
Andree Buschmann
1f725ebe34 Fix FS#11103. Resuming musepack files was handled wrong since ages. This change converts the decoders exact sample position to an estimated byte position within the file. The resume position in samples is calculated the reverse way,
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25164 a1c6a512-1295-4272-9138-f99709370657
2010-03-14 13:32:16 +00:00
Andree Buschmann
b3d9578c27 Major change to musepack decoder: Import v1.3.0 (r458 from svn.musepack.net) to rockbox. Several adaptions in the musepack decoder were made to get the library work and perform fast under rockbox on several targets. With this change mpc sv8 is supported, including seek, replay gain and metadata support. The decoding speed is a 1-4% lower than the last implementation. Reason for this is main restructuring in the bitstream demuxer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25056 a1c6a512-1295-4272-9138-f99709370657
2010-03-07 19:34:44 +00:00
Andree Buschmann
f4ac75752e Allow higher precision in calculation of seek position and elapsed time for mpc codec.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20756 a1c6a512-1295-4272-9138-f99709370657
2009-04-20 19:16:48 +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
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
Andree Buschmann
f52696ef8a Correct DSP_SET_SAMPLE_DEPTH to 29 for mpc (18.14 fixed point samples). Higher precision for fast 32x32=32 multiplication in dewindowing part of synthesis filter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17708 a1c6a512-1295-4272-9138-f99709370657
2008-06-10 06:11:50 +00:00
Andree Buschmann
1d28fe7d79 Musepack seek hotfix. Do not dynamically allocate seek buffer but use a buffer of constant size (~28.5min). Files larger than this will still not seek properly. Some additional rework has to be done for the seek buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17584 a1c6a512-1295-4272-9138-f99709370657
2008-05-19 18:06:00 +00:00
Andree Buschmann
14d45c9d17 Removed non-active seek mechanism from musepack library, small other cleanups.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17446 a1c6a512-1295-4272-9138-f99709370657
2008-05-10 20:33:28 +00:00
Magnus Holmgren
87842ca0e7 Change to (or add) 'standard' codec startup delay, fixing potential startup problems for APE and MPC files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16410 a1c6a512-1295-4272-9138-f99709370657
2008-02-24 19:12:15 +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
1df1e7b0c7 Remove unused conf_preseek from buffering.c and all of its accountraments. This is _not_ a setting. This is a guessing tool used by either playback or buffering to serve its clients better. Use the REBUFFER_GUESS size in resume to help obviate pondlife's bug. This will also need to be used when FS8092 gets fixed correctly with a complete rebuffer for backward movements. It may also belong in buffering not playback, haven't decided for sure
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15475 a1c6a512-1295-4272-9138-f99709370657
2007-11-05 16:02:12 +00:00
Thom Johansen
953348f1ba FS #7166. Musepack optimizations and cleanups. Huge speedup on ARM. Note that all ARM (Ipod/Sansa/Gigabeat) targets will now play back Musepack files with somewhat reduced accuracy. Please get in touch via forums or Flyspray if you've got sample files where this is very apparent. Most users should hear no difference.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14531 a1c6a512-1295-4272-9138-f99709370657
2007-08-30 11:41:05 +00:00
Adam Boot
a5d7309d96 Support resume for Musepack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13049 a1c6a512-1295-4272-9138-f99709370657
2007-04-06 21:48:17 +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
Tomasz Malesinski
5c54ba49d5 Added macros controlling what goes to IRAM on different targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11483 a1c6a512-1295-4272-9138-f99709370657
2006-11-09 21:59:27 +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
Thom Johansen
7197c0e588 Put Musepack output data array back in IRAM for faster DSP processing. Patch by Andrew Cupper.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10844 a1c6a512-1295-4272-9138-f99709370657
2006-09-01 12:09:20 +00:00
Thom Johansen
20332bce1d FS patch #5172 by Andrew Cupper. Musepack seeking support. Decoder should also be faster.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10827 a1c6a512-1295-4272-9138-f99709370657
2006-08-31 18:18:57 +00:00
Thom Johansen
5398f720f0 The last frame of Musepack files can contain double the amount of samples as in ordinary frames, so let's double our buffer size to accomodate...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9808 a1c6a512-1295-4272-9138-f99709370657
2006-04-25 20:39:31 +00:00
Brandon Low
1191fa41fd Make playback not screw up if the user tries to seek on musepack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9806 a1c6a512-1295-4272-9138-f99709370657
2006-04-25 20:05:01 +00:00
Thom Johansen
9df0ea8297 Fix warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9805 a1c6a512-1295-4272-9138-f99709370657
2006-04-25 20:00:53 +00:00
Thom Johansen
8324725511 Correctly identify end of file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9803 a1c6a512-1295-4272-9138-f99709370657
2006-04-25 19:52:08 +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
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
Thom Johansen
153f906d74 Start converting codecs to use internal sample format (28 bits + sign,
or s3.28 fixed point).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8680 a1c6a512-1295-4272-9138-f99709370657
2006-02-13 19:24:36 +00:00
Thom Johansen
b978acc59d Fix mpc.c to use new mpc_bool_t type to remove some warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8489 a1c6a512-1295-4272-9138-f99709370657
2006-01-30 01:04:43 +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
Dave Bryant
c78b019944 I figured out what was *really* causing the MPC track-change noise, so I
backed out Thom's change and made the appropriate change. Note that this
should not fix the track change *pop* because there still seems to be a
problem decoding the first and last several hundred samples of MPC files.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8306 a1c6a512-1295-4272-9138-f99709370657
2006-01-08 08:38:18 +00:00
Thom Johansen
dad0011e31 Quick fix for annoying musepack noise on track change bug. Proper fix coming Some Day Soon Now (tm). Thanks go out to David Bryant.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8305 a1c6a512-1295-4272-9138-f99709370657
2006-01-07 23:20:49 +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
4d9be96a81 Changed output format of libmpcdec to non-interleaved stereo for a slight speed boost. Also stopped wasting 10kb of IRAM in the output sample buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7769 a1c6a512-1295-4272-9138-f99709370657
2005-11-06 23:05:49 +00:00
Thom Johansen
741012004b Disabled Musepack seeking, since it's so slow that most users conclude the codec has crashed. Left in original seek code for those who're aware of the issue and want seek support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7767 a1c6a512-1295-4272-9138-f99709370657
2005-11-06 19:12:27 +00:00
Thom Johansen
d5eefe8bc7 Fixed the halved volume bug, remove ad-hoc metadata loading and add ReplayGain support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7753 a1c6a512-1295-4272-9138-f99709370657
2005-11-04 21:35:08 +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
Miika Pekkarinen
127f069545 Fixed the playlist skipping with MusePack.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7638 a1c6a512-1295-4272-9138-f99709370657
2005-10-18 06:52:58 +00:00
Miika Pekkarinen
eb04a53830 Fixed the pops with musepack.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7632 a1c6a512-1295-4272-9138-f99709370657
2005-10-16 06:19:23 +00:00