Commit graph

41 commits

Author SHA1 Message Date
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
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
Andree Buschmann
7e63bfd2ab Correctly re-initialize wma decoder on next track. This fixes strange observed issues (noise, crashes) which only could be solved through re-entering the wma codec.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29202 a1c6a512-1295-4272-9138-f99709370657
2011-02-03 11:05:33 +00:00
Michael Giacomelli
3e074a6410 Remove old debug line from wma.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27796 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 23:20:42 +00:00
Mohamed Tarek
b1fefcf3e9 Modify WMA to produce non-interleaved stereo output (FS#11503 by me). speeds up wma by 3.5MHz on CF and 2.2MHz on ARM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27591 a1c6a512-1295-4272-9138-f99709370657
2010-07-28 12:45:21 +00:00
Mohamed Tarek
76aeb6028e Rename seek() to asf_seek()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26237 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 16:05:28 +00:00
Mohamed Tarek
546edf3621 Move seek() from wma.c to libasf since it's really ASF-specific.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26235 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 15:51:22 +00:00
Mohamed Tarek
2fa864b9e6 Remove unnecessary parameter (struct codec_api* ci) passed to libasf functions, and consequently remove the no-longer needed #ifdef in apps/codecs/libasf/asf.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25788 a1c6a512-1295-4272-9138-f99709370657
2010-05-02 20:07:11 +00:00
Mohamed Tarek
80b9bb4f17 Add the Rockbox GPL header to apps/codecs/libasf/asf.c and fix the one in apps/codecs/wma.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25781 a1c6a512-1295-4272-9138-f99709370657
2010-05-02 17:30:41 +00:00
Mohamed Tarek
792ae6b1bd - Factor out container specific code from apps/codecs/wma.c.
- Create an independent asf packet-parsing library in apps/codecs/libasf.
- Modify wma.c to use the newly created libasf.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25780 a1c6a512-1295-4272-9138-f99709370657
2010-05-02 17:19:42 +00:00
Michael Giacomelli
755ddc9fc2 Commit fix suggested by Siaoru Lee in FS#9776. Fixes a bug in our ASF parser.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19946 a1c6a512-1295-4272-9138-f99709370657
2009-02-08 22:05:15 +00:00
Björn Stenberg
6427d127aa Calculate watermark from bitrate and harddisk spinup time.
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
2009-01-10 21:10:56 +00:00
Björn Stenberg
c6b3d38a15 New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
2008-11-20 11:27:31 +00:00
Michael Giacomelli
d016402fec Actually put the output in IRAM this time by combining some buffers that weren't used at the same time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18231 a1c6a512-1295-4272-9138-f99709370657
2008-08-10 02:31:01 +00:00
Michael Giacomelli
1334738071 Use Tremor IMDCT for WMA. Gives a ~20% speedup on ARM and coldfire. All my test samples gave equivilent or better accuracy (>>16 bit), but there may still be problems. Code becomes somewhat less readable since the IMDCT has bits of Vorbis in it, but this is not a serious issue and the old ffmpeg transform remains in SVN if anyone wants it. Also, WMA now passes Vorbis as the fastest transform codec on ARM, although MPC remains the fastest lossy codec overall.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18084 a1c6a512-1295-4272-9138-f99709370657
2008-07-17 17:43:49 +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
Magnus Holmgren
bce419d890 Fix skipping back to the start of WMA files, broken by the addition of resume support. Not the most elegant fix perhaps, but it works for me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17291 a1c6a512-1295-4272-9138-f99709370657
2008-04-29 19:00:42 +00:00
Dave Chapman
d65930f972 Correct copyright date and add acknowledgement of projects (libasf and VLC) that the ASF parsing code is based on.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17146 a1c6a512-1295-4272-9138-f99709370657
2008-04-16 19:42:26 +00:00
Magnus Holmgren
d715f79ed6 Remove redundant init call.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17092 a1c6a512-1295-4272-9138-f99709370657
2008-04-13 10:00:42 +00:00
Michael Giacomelli
9a946f6022 Commit FS#8822 by Magnus Holmgren. Fixes resuming previously playing WMA files after a reboot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17090 a1c6a512-1295-4272-9138-f99709370657
2008-04-12 19:52:31 +00:00
Michael Giacomelli
82dc8175cf Make the WMA decoder less noisy in the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17014 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 02:32:48 +00:00
Michael Giacomelli
afd5c6a03f Fix (another) overflow when seeking in long WMA files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16597 a1c6a512-1295-4272-9138-f99709370657
2008-03-09 23:38:11 +00:00
Michael Giacomelli
191b7e8380 Don't assume reading the duration field advances the buffer 12 bytes, instead check the return value and seek accordingly. Improves (fixes?) seeking in sample submitted by Lear.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16595 a1c6a512-1295-4272-9138-f99709370657
2008-03-09 22:55:38 +00:00
Michael Giacomelli
dadd80a8a6 If seek fails, don't insert nonsense for the current position. Also, make one of the error messages a bit more clear.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16002 a1c6a512-1295-4272-9138-f99709370657
2008-01-06 02:50:01 +00:00
Dave Chapman
05b158f81e Code-police raid - cosmetic changes only.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15862 a1c6a512-1295-4272-9138-f99709370657
2007-12-01 02:46:31 +00:00
Dave Chapman
95c117cdb8 Use the correct variable name - fixes warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15860 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 19:58:59 +00:00
Michael Giacomelli
8b99ad39b1 Fix warning when compiling the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15858 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 14:24:05 +00:00
Michael Giacomelli
1a5d59498a Fix overflow when seeking in long files wma. Also, add a simple sanity check when seeking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15851 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 00:46:32 +00:00
Michael Giacomelli
f861320177 Add seeking support for wma. Works quite well on my Sansa, and theres some effort to catch and recover from seeking errors, but theres likely to be problems in some files. Also, add Thom's idea to skip past some errors in wma streams rather then just giving up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15753 a1c6a512-1295-4272-9138-f99709370657
2007-11-22 05:32:26 +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
Thom Johansen
7113d11a1c Make a fix for the WMA seek to start bug that actually works...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15170 a1c6a512-1295-4272-9138-f99709370657
2007-10-17 18:19:35 +00:00
Thom Johansen
a478e46946 Fix FS #7973. Hack a way to make skip to start of track work for WMA until we have proper seeking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15166 a1c6a512-1295-4272-9138-f99709370657
2007-10-17 12:51:37 +00:00
Marcoen Hirschberg
c43629f08b use the full resolution we get from the WMA decoder and let the DSP code do the rest
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14224 a1c6a512-1295-4272-9138-f99709370657
2007-08-06 23:34:28 +00:00
Dave Chapman
e6a3f7d731 Cosmetic changes - update a comment and add more info to a DEBUGF
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13925 a1c6a512-1295-4272-9138-f99709370657
2007-07-18 09:43:12 +00:00
Dave Chapman
a9df713ee9 TAB and whitespace police
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13858 a1c6a512-1295-4272-9138-f99709370657
2007-07-11 23:07:41 +00:00
Michael Giacomelli
28b0c58726 Don't assume files are WMAv2, instead actually check that they are and quit gracefully if they are not.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13855 a1c6a512-1295-4272-9138-f99709370657
2007-07-11 16:58:11 +00:00
Dave Chapman
47e969278b ASF parser improvements - it now correctly handles files containing multiple payloads. i.e. files where the audio packets are split into multiple payloads, and streams where audio/video payloads are mixed within the same packet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13840 a1c6a512-1295-4272-9138-f99709370657
2007-07-10 13:37:16 +00:00
Dave Chapman
88e32c2fc6 Reorganise the wma_decode_superframe() function - split into a separate init and decode functions. Each call to the decode function now decodes a single frame (2048 samples) instead of an entire superframe (which typically contained about 7 or 8 frames and can in theory contain up to 16 frames). This allows us to replace the 256KB output buffer with a 8KB buffer, and also perform more yields in the main decoding loop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13833 a1c6a512-1295-4272-9138-f99709370657
2007-07-09 17:24:00 +00:00
Dave Chapman
9cb40ea5e3 WMA clean-up commit - fix 64-bit sim warnings, set svn keywords property, and add new files to apps/FILES
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13771 a1c6a512-1295-4272-9138-f99709370657
2007-07-03 10:21:23 +00:00
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