summaryrefslogtreecommitdiff
path: root/apps/cuesheet.c
AgeCommit message (Collapse)Author
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
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
2010-03-07Pass width instead of x+width to ab_draw_markers()/cue_draw_markers() and ↵Teruaki Kawashima
don't recalculate the width in these functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25053 a1c6a512-1295-4272-9138-f99709370657
2010-01-06FS#10856 - Skip to previous track inconsistent when using cuesheetMichael Chicoine
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24191 a1c6a512-1295-4272-9138-f99709370657
2009-11-09Removed unneeded includesJeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23578 a1c6a512-1295-4272-9138-f99709370657
2009-08-20Make the formatter functions used by the settings return a pointer to avoid ↵Nils Wallménius
usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
2009-07-24more cuesheet cleanup. pass the cuesheet into cue functions so they dont ↵Jonathan Gordon
have to call audio_current_track() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22020 a1c6a512-1295-4272-9138-f99709370657
2009-07-20rework cuesheet support:Jonathan Gordon
swcodec: search for a .cue during buffering (with the possibility of adding embedded cuesheets later) hwcodec: search for a .cue when the id3 info for the current track is requested for the first time (disk should be spining so non issue) major beenfit from this is simplofy cuesheet handling code a bit... if mp3entry.cuesheet != NULL then there is a valid cuesheet.. no need to worry about if its enabled and preloaded. There is the possibility of putting the next/prev subtrack handling inside the playback code (as well as the id3 updating stuff (see FS#9789 for more info), but thats probably not a good idea. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21978 a1c6a512-1295-4272-9138-f99709370657
2009-07-14FS#10080Nils Wallménius
* 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
2009-03-08Clean up some more #includesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20243 a1c6a512-1295-4272-9138-f99709370657
2009-02-08Small code reuse improvementNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19943 a1c6a512-1295-4272-9138-f99709370657
2009-01-31FS#9638 - temp_cue is unused and wasting memory.Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19890 a1c6a512-1295-4272-9138-f99709370657
2009-01-26Fix FS#9830 - utf8 encoded .cue files dont get displayed properlyJonathan Gordon
Also fix a possible problem where the performer and songwriter tags could get cut off git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19858 a1c6a512-1295-4272-9138-f99709370657
2008-09-24Clean up use of snprintf where strncpy if suited, avoid useless copying of ↵Nils Wallménius
constant strings for wps token evaluator, minor const police too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18625 a1c6a512-1295-4272-9138-f99709370657
2008-08-02Unify opening of utf-8 files (FS#6203). This also adds ignoring the BOM in ↵Dominik Riebeling
several places it has been missing (as FS#6071). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18185 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
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-04-28Moved atoi declaration to stdlib.h. Deleted atoi.hBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-16Use file_exists and dir_exists functions where appropriate, fix one wrong ↵Nils Wallménius
file descriptor check and one possible dir descriptor leak git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17147 a1c6a512-1295-4272-9138-f99709370657
2008-04-09Pass the buffer length to the list_get_name callback functions instead of ↵Nils Wallménius
using hardcoded MAX_PATH git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
2008-04-07Some more debug output disabling.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17026 a1c6a512-1295-4272-9138-f99709370657
2008-03-26the menu and list now accepts a parent viewport to draw in (and the menu can ↵Jonathan Gordon
be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
2008-02-05Fix a possible crash in the cuesheet code if the filename lacks a slash, ↵Nicolas Pennequin
which happens for some reason I don't quite understand yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16229 a1c6a512-1295-4272-9138-f99709370657
2007-11-17Code police, declare pointers in .c and expor themNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15653 a1c6a512-1295-4272-9138-f99709370657
2007-11-12FS#6944 - honour the default codepage setting when reading cue sheetsRobert Kukla
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15595 a1c6a512-1295-4272-9138-f99709370657
2007-09-17minor update to gui_synclist_do_button() which will hopefully simplify ↵Jonathan Gordon
things later. Now returns true if the action was handled in that function instead of returning the handled action. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14733 a1c6a512-1295-4272-9138-f99709370657
2007-07-26Set properties for the files I added.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14003 a1c6a512-1295-4272-9138-f99709370657
2007-07-22remove the need for action_signalscreenchange().Jonathan Gordon
Fixes problems with targets where the ACTION_STD_CANCEL event is a combo git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13956 a1c6a512-1295-4272-9138-f99709370657
2007-05-28Fix the warning.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13509 a1c6a512-1295-4272-9138-f99709370657
2007-05-28Add the possibility to store cuesheets in /.rockbox/cue. The code will look ↵Nicolas Pennequin
for a cuesheet there in case there wasn't one in the same folder as the audio file. This is to reduce the clutter created by one cuesheet per audio file in some places. Also some duplicate code was replaced by a function call. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13508 a1c6a512-1295-4272-9138-f99709370657
2007-05-14Add an item to the WPS context menu to browse a currently playing cuesheet. ↵Nicolas Pennequin
The menu that appears allows changing tracks within the cuesheet. It was already reachable by selecting the right cuesheet file in the file browser, but this makes it easier to use (and should help users noticing that possibility because many seemed to ignore this viewer existed). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13388 a1c6a512-1295-4272-9138-f99709370657
2007-05-07Minor header file cleanup - try and include the minimal number of files, and ↵Dave Chapman
only where they are needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13344 a1c6a512-1295-4272-9138-f99709370657
2007-04-21General housekeeping: Make plugin buffer functions take size_t * instead of ↵Michael Sevakis
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-03Better check when using the plugin buffer to store a temp cuesheet.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13007 a1c6a512-1295-4272-9138-f99709370657
2007-04-02Improve ID3 "spoofing" to allow detection of missing information by the WPS.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13005 a1c6a512-1295-4272-9138-f99709370657
2007-03-29Cuesheet tweaks:Nicolas Pennequin
* Max length for the info strings is now 80, according to the cue spec. * Don't display the album artist if it's the same as the track artist. * If the cue has composer info but not the tracks, the cue composer info is displayed for all the tracks. * Slightly change the display in the cue viewer. * A few cosmetic changes in the code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12964 a1c6a512-1295-4272-9138-f99709370657
2007-03-28Fix the warning.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12950 a1c6a512-1295-4272-9138-f99709370657
2007-03-28Improved cuesheet parser. Among other improvements, the use of quotation ↵Nicolas Pennequin
marks around strings in cuesheet files is now optional. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12949 a1c6a512-1295-4272-9138-f99709370657
2007-03-28Use isspace() instead of a naive comparison.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12948 a1c6a512-1295-4272-9138-f99709370657
2007-03-26Add support for the SONGWRITER cuesheet command, displayed as composer in ↵Nicolas Pennequin
the WPS. Also, use the album artist tag to store the disc artist defined in the cuesheet. Finally, only look for INDEX 01 commands instead of simply INDEX: we only care about INDEX 01. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12932 a1c6a512-1295-4272-9138-f99709370657
2007-03-22Add the necessary action_signalscreenchange call to avoid going back one ↵Nicolas Pennequin
level in the tree after leaving the cuesheet viewer screen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12891 a1c6a512-1295-4272-9138-f99709370657
2007-03-21Further error checking that I shouldn't have forgotten earlier.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12883 a1c6a512-1295-4272-9138-f99709370657
2007-03-21Add a bit more error checking to prevent possible crashes.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12880 a1c6a512-1295-4272-9138-f99709370657
2007-03-01Hook up .cue file detection via a callback klugde on HWCODEC, to make cue ↵Jens Arnold
sheet support actually work. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12526 a1c6a512-1295-4272-9138-f99709370657
2007-02-28Unpause after seeking on archos.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12525 a1c6a512-1295-4272-9138-f99709370657
2007-02-16Make a couple of private functions 'static'Nils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12337 a1c6a512-1295-4272-9138-f99709370657
2007-02-14Oops, no need to allocate that much memory. Thanks to Lear for noticing this.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12306 a1c6a512-1295-4272-9138-f99709370657
2007-02-14Cuesheet support by Jonathan Gordon and me (FS #6460).Nicolas Pennequin
Everytime an audio file is loaded, a cue file with the same name is searched for. A setting allows to disable this (default is off). Cuesheet files can also be viewed in the file browser. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12304 a1c6a512-1295-4272-9138-f99709370657