summaryrefslogtreecommitdiff
path: root/apps/buffering.c (follow)
Commit message (Collapse)AuthorAge
* Fix FS#11586. Corrects rebuffering behaviour which did not allow to play ↵Andree Buschmann2010-08-30
| | | | | | several m4a files. Thanks to Magnus Holmgren. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27950 a1c6a512-1295-4272-9138-f99709370657
* Oops, committed before finishing the removal of "#include "memory.h""Thomas Martitz2010-08-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27790 a1c6a512-1295-4272-9138-f99709370657
* Remove some redundant #include'sBertrik Sikken2010-06-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 a1c6a512-1295-4272-9138-f99709370657
* playback.c: don't assume cacheline size is 16 bytesRafaël Carré2010-06-23
| | | | | | | | | | ideally all targets should define CACHEALIGN_BITS, for now we default it to 16 bytes if it's not specified Since the buffer is already aligned in playback.c no need to align it again in buffering.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27073 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* fix: when move_handle() is successful, the return valueYoshihisa Uchida2010-05-24
| | | | | | corrects valid type. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26249 a1c6a512-1295-4272-9138-f99709370657
* FS#11263 - Radio Art support! %C and %Cl tags work in the radio screen and ↵Jonathan Gordon2010-05-16
| | | | | | | | | Base Skin when the radio is running. put your station images in .rockbox/fmpresets/<preset name>.bmp or .jpg. Must be in preset mode and the preset name must match the filename git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26078 a1c6a512-1295-4272-9138-f99709370657
* Eliminate %zd tag in printf format strings, replace them with %ld. The %z ↵Jeffrey Goode2010-05-15
| | | | | | formatter kept generating type mismatch warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26040 a1c6a512-1295-4272-9138-f99709370657
* Hopefully the last warningFrank Gevaerts2010-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26036 a1c6a512-1295-4272-9138-f99709370657
* Fix various size_t related warnings and errorsFrank Gevaerts2010-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26035 a1c6a512-1295-4272-9138-f99709370657
* cast ssize_t to longRafaël Carré2010-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26033 a1c6a512-1295-4272-9138-f99709370657
* Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz2010-05-06
| | | | | | | | directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
* Make storage alignement use cache alignement macrosRafaël Carré2010-03-25
| | | | | | | | | | Introduce STORAGE_ALIGN_DOWN, STORAGE_PAD (using new CACHE_PAD) and STORAGE_OVERLAP (using new CACHE_OVERLAP), make them useful only when PROC_NEEDS_CACHEALIGN and STORAGE_NEEDS_ALIGN are defined Modify PP and nano2g system-target.h accordingly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25336 a1c6a512-1295-4272-9138-f99709370657
* Use a helpfer function to avoid ugly casting and correct some data types (no ↵Thomas Martitz2010-02-20
| | | | | | functional change). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24790 a1c6a512-1295-4272-9138-f99709370657
* Hopefully fix yellow now, I don't understand why %ld works for ssize_t but ↵Thomas Martitz2010-02-18
| | | | | | %lu not for size_t (and still no warnings on my system). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24757 a1c6a512-1295-4272-9138-f99709370657
* Fix yellow caused by signedness.Thomas Martitz2010-02-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24756 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#11004 - Buffering crashes when skipping back from end of song.Thomas Martitz2010-02-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24755 a1c6a512-1295-4272-9138-f99709370657
* Convert RINGBUF_* macros to inline functions, saving binsize and improving ↵Thomas Martitz2010-02-12
| | | | | | type safety. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24618 a1c6a512-1295-4272-9138-f99709370657
* Align addresses in the buffering code to STORAGE_ALIGN_MASK if the target ↵Torne Wuff2010-02-01
| | | | | | | | | | | | | | | has one. The PP502x DMA controller can only deal with doing DMA to 16-byte-aligned addresses because we have inadequate control over the cache to prevent interference. Other targets may also *prefer* cacheline aligned DMAs to reduce the number of cache operations required. Almost all disk reads in buffering.c will now be suitably aligned, allowing DMA to be used on PP502x. Original change from FS#9708 by Boris Gjenero (dreamlayers). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24440 a1c6a512-1295-4272-9138-f99709370657
* buffering.c: cosmeticsRafaël Carré2009-11-22
| | | | | | remove tabs, remove trailing spaces, indentation git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23697 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#10605 - stable playback on low memory swcodec targets by Matthias ↵Michael Giacomelli2009-11-21
| | | | | | Schneider. Should allow stable playback on targets with less then 4MB of RAM and sofware decoding such as the Sandisk Clip, c200v2, m200v4 and probably others. Fixes several problems in buffering that occured when the files to be buffered weren't much smaller then the ring buffer size. Fixes a bug where move_handle would corrupt the audio buffer when trying to copy a handle that both wrapped around the highest address in the ring buffer and overlapped part of the source and desination ranges. Moves the decision in playback.c about when to update the current track handle from audio_check_new_track to after the metadata has been buffered. Corrects several other minor pieces of code. I've logged about 100 hours without a crash on various players with this patch but its possible it breaks some combination of players and features I haven't thought to test. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23680 a1c6a512-1295-4272-9138-f99709370657
* Removed unneeded includesJeffrey Goode2009-11-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23578 a1c6a512-1295-4272-9138-f99709370657
* buffering: leave a comment to explain what is broken in the code and link to ↵Rafaël Carré2009-10-25
| | | | | | FS#10605 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23344 a1c6a512-1295-4272-9138-f99709370657
* Rework albumart buffering internally to allow for mutliple albumart sizes.Thomas Martitz2009-10-16
| | | | | | | | Playback now has a few albumart slots. Anything (most importantly: skins) can obtain such a slot. The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size. Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
* FS#10080Nils Wallménius2009-07-14
| | | | | | | | | | * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
* Fix yellow when building with HAVE_ALBUMART, without HAVE_JPEG/HAVE_BMP_SCALING.Andrew Mahone2009-05-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21092 a1c6a512-1295-4272-9138-f99709370657
* Fix the lock contention stall during cover art load, by adding a separate ↵Andrew Mahone2009-05-15
| | | | | | | | modify mutex for the buffer. Operations that modify contents of a buffer entry can still proceed, but ones that add or remove buffer entries, or move them in memory, will still block. Some members of struct memory_handle also need an earlier init in bufopen to make sure that buffer stats aren't trashed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20932 a1c6a512-1295-4272-9138-f99709370657
* Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both ↵Andrew Mahone2009-05-04
| | | | | | | | defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow gets overlay support. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
* Search for, and load, JPEG album art files.Andrew Mahone2009-05-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20837 a1c6a512-1295-4272-9138-f99709370657
* Clean up some #includesBertrik Sikken2009-03-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20238 a1c6a512-1295-4272-9138-f99709370657
* Show the watermark in the "Show buffering thread" screen (in bytes).Thomas Martitz2009-02-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20096 a1c6a512-1295-4272-9138-f99709370657
* This should fix the occasional data aborts mainly in conjunction with ↵Antonius Hellmann2009-02-22
| | | | | | AlbumArt on PP targets. See FS#9827 for details. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20081 a1c6a512-1295-4272-9138-f99709370657
* Calculate watermark from bitrate and harddisk spinup time.Björn Stenberg2009-01-10
| | | | | | | | 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
* Make scaler output truly pluggable, add an 8-bit greyscale output toAndrew Mahone2008-12-26
| | | | | | | pluginlib for use with greylib, and add source for a test scaled bmp viewer using greylib. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19593 a1c6a512-1295-4272-9138-f99709370657
* Use cookies for thread identification instead of pointers directly which ↵Michael Sevakis2008-12-10
| | | | | | 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
* resize-on-load for bitmap files on 2bpp and color targetsAndrew Mahone2008-12-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#9319 and its (probably) duplicate, FS#9576. They both describe the ↵Nicolas Pennequin2008-12-02
| | | | | | | | | boost remaining active after a change of the dynamic playlist, an issue added in r17109. The fix is to notify the buffering thread whenever an ID3 handle is created via bufopen (as is done in the other cases of bufopen). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19304 a1c6a512-1295-4272-9138-f99709370657
* Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts2008-11-01
| | | | | | | | | that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#9480 - centralise and organise the events in the apps/ layer. Jonathan Gordon2008-10-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18819 a1c6a512-1295-4272-9138-f99709370657
* Fix a possible deadlock if the album art loading failsJonathan Gordon2008-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18711 a1c6a512-1295-4272-9138-f99709370657
* Add handle values to the buffering LOGFQUEUE messages for easier debugging.Nicolas Pennequin2008-07-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18092 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#9137 and FS#8194 (the end of a track is cut off after rebuffering): ↵Nicolas Pennequin2008-07-18
| | | | | | the cause was a confusion between regular subtraction and subtraction in a ring-buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18090 a1c6a512-1295-4272-9138-f99709370657
* Hopefully fix FS #9153, as well as another bug (in fill_buffer) that could ↵Magnus Holmgren2008-07-11
| | | | | | cause problems when rebuffering. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18009 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#8964 (CPU remains boosted after buffering). 'filling' needs to be set ↵Nicolas Pennequin2008-07-02
| | | | | | to false when there's nothing left to buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17923 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | 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
* Lock the linked list mutex when accessing the memory handles. This should ↵Nicolas Pennequin2008-05-13
| | | | | | fix the invalid values appearing for short times in the buffering debug screen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17497 a1c6a512-1295-4272-9138-f99709370657
* Remove unused #define.Steve Bavin2008-04-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17294 a1c6a512-1295-4272-9138-f99709370657
* Cleaned up playblack.h header file and usage of it.Bertrik Sikken2008-04-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17276 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#8902 (NSF files get skipped). The cause was too strict metadata ↵Nicolas Pennequin2008-04-16
| | | | | | checking (the NSF metadata parser doesn't fill the 'length' field). Hopefully there won't be any problems with that anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17142 a1c6a512-1295-4272-9138-f99709370657
* A rather big change to how tracks are loaded: there are now two parts to the ↵Nicolas Pennequin2008-04-14
| | | | | | | | | process and metadata loading is done by the buffering thread (except for the first unbuffered track). The audio thread now calls audio_load_track, and once the metadata is loaded, the buffering thread sends an event which will make the audio thread call audio_finish_load_track. This one then takes care of the rest of the loading. This method makes skipping noticeably faster for unbuffered tracks, and especially backwards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17109 a1c6a512-1295-4272-9138-f99709370657