summaryrefslogtreecommitdiff
path: root/apps/playback.c (follow)
Commit message (Collapse)AuthorAge
* 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
* FS#10853 - Skin support in the radio screen! Check CustomWPS for the new tagsJonathan Gordon2010-05-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25964 a1c6a512-1295-4272-9138-f99709370657
* FS#11099 - Rewind before resumeMagnus Holmgren2010-04-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25706 a1c6a512-1295-4272-9138-f99709370657
* drop the playlist viewer stack usage by reading straiught off the buffer ↵Jonathan Gordon2010-04-17
| | | | | | instead of copying it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25661 a1c6a512-1295-4272-9138-f99709370657
* Minor clean up in playback.cAndree Buschmann2010-03-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25178 a1c6a512-1295-4272-9138-f99709370657
* Implement resume for alac codec.Andree Buschmann2010-03-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25169 a1c6a512-1295-4272-9138-f99709370657
* Make the buffer low-level watermark (and the related anti-skip setting) work ↵Magnus Holmgren2010-02-28
| | | | | | again. Update the buffering 'base handle' as new tracks start playing, since this is needed to determine how much playable data is left in the buffer. Should fix the buffering problem reported in the forums (http://forums.rockbox.org/index.php?topic=24014.0), and also makes the usefl line in the buffering thread debug screen useful again. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24968 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
* Get rid of those horrible macros to protect against NULL reference when ↵Jonathan Gordon2010-01-15
| | | | | | | | | looking up the id3 info for tokens. Change the way the wps playlist viewer gets the token values. All %i tokens are now supported (and a few others, experiment :) ) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24233 a1c6a512-1295-4272-9138-f99709370657
* FS#10898 - Add a playlist viewer to the WPS. ↵Jonathan Gordon2010-01-13
| | | | | | http://www.rockbox.org/wiki/CustomWPS#Playlist_viewer for an exaplanation how to use it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24220 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
* Cleanup audio.h, related functionsJeffrey Goode2009-11-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23651 a1c6a512-1295-4272-9138-f99709370657
* pcmbuf cleanupJeffrey Goode2009-11-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23649 a1c6a512-1295-4272-9138-f99709370657
* Crossfade: added a new option, rewrote decision logic, updated manual and ↵Jeffrey Goode2009-11-11
| | | | | | menus. Translators please note that updated translations may be required for some crossfade menu items! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23605 a1c6a512-1295-4272-9138-f99709370657
* Crossfade: carved out crossfade related code with lots of HAVE_CORSSFADE ↵Jeffrey Goode2009-11-10
| | | | | | conditionals, eliminated fade buffer on low memory targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23597 a1c6a512-1295-4272-9138-f99709370657
* Playback: removed duplicate functionsJeffrey Goode2009-11-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23576 a1c6a512-1295-4272-9138-f99709370657
* pcmbuf: clarify and simplify crossfade code, etc.Jeffrey Goode2009-11-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23538 a1c6a512-1295-4272-9138-f99709370657
* Clarify track transition code in pcmbuf and playback. No functional changes yet.Jeffrey Goode2009-11-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23506 a1c6a512-1295-4272-9138-f99709370657
* Playback.c: Eliminate repetitive watermark calculation when the buffer is ↵Jeffrey Goode2009-11-02
| | | | | | idle. Also fix evil comment git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23487 a1c6a512-1295-4272-9138-f99709370657
* Tweak logf statementsJeffrey Goode2009-11-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23486 a1c6a512-1295-4272-9138-f99709370657
* Code cleanup in codec_thread, playback and pcmbuf; more elegant solution to ↵Jeffrey Goode2009-11-01
| | | | | | leftover samples git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23471 a1c6a512-1295-4272-9138-f99709370657
* Fix yellow, definesJeffrey Goode2009-10-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23446 a1c6a512-1295-4272-9138-f99709370657
* FS#10739: playback.c code splitJeffrey Goode2009-10-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23444 a1c6a512-1295-4272-9138-f99709370657
* Correct wrong usage of event callbacks all over the place. It's not supposed ↵Thomas Martitz2009-10-20
| | | | | | | | to return anything, and should take a data parameter. Fixing it because correcting the event api prototypes causes many warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
* Initial custom statusbar commit.Thomas Martitz2009-10-19
| | | | | | | | | | | | | | | | | | | | The custom statusbar can be used as a WPS for the main UI, using .(r)sbs files. It's using the skin engine and knows all tags the WPS also knows. The default folder for .sbs is the wps folder to reuse images used in the WPS. As it can be shown in the WPS also, it's useful to move shared parts to the custom statusbar in order to save skin buffer space. There are a few restrictions/TODOs: *) Peak meter doesn't redraw nicely(not frequent enough), as very frequent updates would slow the UI down as hell (some targets fight with it in the WPS already: FS#10686) *) No touchregion support as the statusbar doesn't have any action handling (it won't fail to parse though). *) Drawing stuff into the default VP is forbidden (loading images in it is not). You *need* to use viewports for the displaying stuff (parsing fails if no viewport is used). *) Themes that don't use a custom ui viewport can be fixed up using the new %Vi tag to avoid nasty redraw effectts (you must not draw into it as well, it's used to fix up the ui viewport). %Vi describes the viewport that the lists can use without getting in the way of the statusbar. Otherwise, it behaves like the classic statusbar, it can be configured in the theme settings, and can be turned off in the wps using %wd. Note to translaters: When translating LANG_STATUSBAR_CUSTOM, please consider using the same translation as for LANG_CHANNEL_CUSTOM if it's compatible. They could be combined later then. Flyspray: FS#10566 Author: myself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23258 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
* Remove unused definesMaurus Cuelenaere2009-08-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22470 a1c6a512-1295-4272-9138-f99709370657
* Remove some unused #includesBertrik Sikken2009-08-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22183 a1c6a512-1295-4272-9138-f99709370657
* A bit mroe wps/skin engine cleanup so that the structs the wps uses can be ↵Thomas Martitz2009-08-03
| | | | | | | | | static: -add wrappers wps_data_load() and wps_data_init() so that other code doesn't need the structs for that -change (and rename) gui_sync_wps_uses_albumart() to take points to be filled as parameter to get the AA size of a wps git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22139 a1c6a512-1295-4272-9138-f99709370657
* Change the naming scheme for codecs found in different containers.Mohamed Tarek2009-07-27
| | | | | | | Like changing AFMT_AAC to AFMT_MP4_AAC and AFMT_RAAC to AFMT_RM_AAC. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22066 a1c6a512-1295-4272-9138-f99709370657
* Get cuesheets working again (hopefully fixes FS#10460), on swcodec only read ↵Jonathan Gordon2009-07-23
| | | | | | the cuesheet from the buffer once git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22012 a1c6a512-1295-4272-9138-f99709370657
* fix FS#10453 - the cuesheet changes broke playback on swcodec, rework it so ↵Jonathan Gordon2009-07-20
| | | | | | | | | it uses the audio buffer instead of a temp buffer from the start (which also removes one pretty big memcpy) also remove the audio_filename from the cuesheet struct as its useless git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21982 a1c6a512-1295-4272-9138-f99709370657
* rework cuesheet support:Jonathan Gordon2009-07-20
| | | | | | | | | | | 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
* 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
* Bugfix for FS#10157 - "inaccurate seeking while paused" by Jeffrey Goode.Thomas Martitz2009-06-29
| | | | | | The pcmbuffer wasn't reset after subsequent seeks (i.e. all but the first one) when seeking while paused. This caused the buffer to be filled only once and so the wrong sound was played upon resuming. Now we make sure the pcmbuffer is always reset when not playing (a more detailed explaination is in the task). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21570 a1c6a512-1295-4272-9138-f99709370657
* FS#10377 - "PCM buffer remainder is played under too many conditions" by ↵Thomas Martitz2009-06-29
| | | | | | | | Jeffrey Goode. Prevents playing the remainder of the pcmbuf on manual stop, as it isn't needed in this case. Now the remainder is only played when the music automatically plays out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21569 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#10335 from Jeffrey Goode.Dan Everton2009-06-17
| | | | | | | | | Ensure that the PCM buffer is flushed at the end of the last track in a playlist. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21316 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#10101 and FS#8999. Buffering was stopped prematurely if a manual ↵Thomas Martitz2009-06-10
| | | | | | track skip occured in between, leaving the CPU boosted, because audio_fill_file_buffer() returned if a new track was requested no matter of the filling state. Now keep buffering if it's currently filling the buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21244 a1c6a512-1295-4272-9138-f99709370657
* Fix duplicate #includesBertrik Sikken2009-05-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
* In audio_current_track(), don't overwrite thistrack_id3 when it is being ↵Boris Gjenero2009-04-21
| | | | | | used by the codec. This fixes divide by zero errors when selecting other files while a FLAC file is playing. See FS#10102. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20764 a1c6a512-1295-4272-9138-f99709370657
* Fix red introduced in r20747Boris Gjenero2009-04-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20749 a1c6a512-1295-4272-9138-f99709370657
* Add anti-skip buffer time when calculating watermark. This fixes the ↵Boris Gjenero2009-04-19
| | | | | | "Anti-Skip Buffer" setting. Since the minimum and default value is 5 seconds, this is relevant even when that setting isn't changed. It prevents playback pauses on the 5G iPod, and it should also prevent pauses on other SWCODEC hard drive based players, including FS#10115. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20747 a1c6a512-1295-4272-9138-f99709370657
* fix FS#10102 (progress doesnt get updated on the first track of a boot) and ↵Jonathan Gordon2009-04-14
| | | | | | hopefully dont introduce any extra wierdness... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20705 a1c6a512-1295-4272-9138-f99709370657
* Remove unnecessary copying of current track id3 data back into the buffer. ↵Boris Gjenero2009-04-07
| | | | | | It was used before when track_unbuffer_callback existed, but now PLAYBACK_EVENT_TRACK_FINISH takes care of this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20638 a1c6a512-1295-4272-9138-f99709370657
* FS9795 - some playback cleanup. Jonathan Gordon2009-04-06
| | | | | | | | | | | * Use events to notify things when the track has changed instead of the nasty has_track_changed() * Event for when the mp3entry for the next track is avilable (which allows alot more tags to be static which means less redrawing in the WPS) * virtually guarentee that the mp3entry sturct returned by audio_current/next_track() is going to be valid for the duration of the current track. The only time it wont be now is during the time between the codec finishing the previous track and the next track actually starting (~2s), but this is not an issue as long as it is called again when the TRACK_CHANGED event happens (or just use the pointer that gives) It is still possible to confuse the WPS with the next tracks id3 info being displayed but this should fix itself up faster than it used to (and be harder to do) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20633 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
* Correct comment and log message for failed AlbumArt bitmap loading.Antonius Hellmann2009-03-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20150 a1c6a512-1295-4272-9138-f99709370657
* Bugfix: If AlbumArt bitmap loading fails, dont try loading it over and over ↵Antonius Hellmann2009-03-01
| | | | | | again, but simply ignore AlbumArt in this case. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20149 a1c6a512-1295-4272-9138-f99709370657
* Remove some unused code. bufopen for TYPE_ID3 can only return ↵Thomas Martitz2009-02-28
| | | | | | ERR_BUFFER_FULL (or a valid id of course) and no other error anyway. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20143 a1c6a512-1295-4272-9138-f99709370657
* make audio_get_buffer() properly invalidate the buffer (FS#9935, fix by ↵Frank Gevaerts2009-02-25
| | | | | | Nicolas Pennequin) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20106 a1c6a512-1295-4272-9138-f99709370657