Commit graph

120 commits

Author SHA1 Message Date
Thomas Martitz
d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.

Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.

audiobuf and audiobufend are local to buffer.c now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 15:13:00 +00:00
Jonathan Gordon
835683b442 %cs (current screen) changes:
* Every top level menu item now has a different screen number
* Playlist viewer and Playlist Catalogue browsers no longer share the same number

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30261 a1c6a512-1295-4272-9138-f99709370657
2011-08-07 08:39:56 +00:00
Frank Gevaerts
94b4a8bb9a revert r30226, which is apparently broken.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30232 a1c6a512-1295-4272-9138-f99709370657
2011-08-01 08:38:32 +00:00
Frank Gevaerts
92b392e722 Reload the current playlist after reboot even if it has ended. (FS#11644)
This is done to make reboot more transparent. If a playlist has ended, there should be no difference between the player doing nothing for ten minutes and the player shutting down after the idle timeout and being restarted.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30226 a1c6a512-1295-4272-9138-f99709370657
2011-07-31 12:56:00 +00:00
Jonathan Gordon
d1fd4f08f5 Fix FS#8656 - Error saving non-current playlist file
Use the plugin buffer to save the playlist copy if there isnt enough buffer already allocated to the inram copy of the playlist

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30184 a1c6a512-1295-4272-9138-f99709370657
2011-07-21 06:40:21 +00:00
Jonathan Gordon
061ff42187 s/Playlist/Current Playlist/ in the playlist viewer context menu.
This menu needs to be changed to a proper menu so the icons dont suck

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30180 a1c6a512-1295-4272-9138-f99709370657
2011-07-20 14:54:10 +00:00
Jonathan Gordon
97a4c1efa4 FS#11808 - Major playlist handling changes (on disk playlists)
* Playlists are treated similar to directories in the browser, they now open in the viewer when selected instead of automatically starting the playlist.
* Make the "Playlists" main menu item useful, it now displays the playlist catalog (and has been renamed accordingly)
* Default to storing playlists in the catalog
* Add a UI to move the catalog directory

(other minor stuff too)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30177 a1c6a512-1295-4272-9138-f99709370657
2011-07-20 14:11:15 +00:00
Nils Wallménius
e7c6ba66aa Whitespace and cosmetics consistency cleanup in playlist_viewer.c, no functional changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29694 a1c6a512-1295-4272-9138-f99709370657
2011-04-08 13:39:56 +00:00
Nils Wallménius
a0791178ae Voice filenames in the playlist viewer, closes FS#11951
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29693 a1c6a512-1295-4272-9138-f99709370657
2011-04-08 13:10:32 +00:00
Thomas Martitz
16d44e9b02 Playlist viewer: Fix regression introduced by r28138 which made some buttons not work in the playlist viewer.
Fixes FS#11772.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28648 a1c6a512-1295-4272-9138-f99709370657
2010-11-23 07:39:16 +00:00
Thomas Martitz
c4925f14a3 Playlist viewer: Fix off-by-one when moving tracks caused by r28131.
The callbacks for the list code need the current item for rendering the moving track,
which is not known until after the first draw. Hence the first draw is off.
A second one is needed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28199 a1c6a512-1295-4272-9138-f99709370657
2010-10-02 20:15:35 +00:00
Thomas Martitz
3013103249 Bad copy&paste.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28140 a1c6a512-1295-4272-9138-f99709370657
2010-09-21 22:56:12 +00:00
Thomas Martitz
138ee6304b Use convenience function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28139 a1c6a512-1295-4272-9138-f99709370657
2010-09-21 22:55:24 +00:00
Thomas Martitz
aa01ee314e Fix a bug in playlist viewer's list handling, causing superfluous redraws and
potentially leading to the wrong track being selected.

The playlist viewer should perform a bit better now.
I always felt it was slower than the otehr lists.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28131 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 23:10:19 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc 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-05-06 21:04:40 +00:00
Thomas Martitz
c19e53654b Playlist Viewer Changes to bring consistency:
- combine its two context menus to one and
- make the ACTION_STD_MENU go to the main menu as it does in all other screens
- call playlist_viewer() via root_menu to reduce call depth and to be consistent with other screens (and for the above changes to be more flexible w.r.t to the following screen)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24791 a1c6a512-1295-4272-9138-f99709370657
2010-02-20 19:06:39 +00:00
Jonathan Gordon
eeb1f3e25e Accept FS#8321 by Lee Kang Hyuk
something about the wrong track being selected with a long playlist and playing the last song.. i dunno... its important to set the title of the lists before setting the selection anyway


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24108 a1c6a512-1295-4272-9138-f99709370657
2009-12-24 07:13:04 +00:00
Dave Hooper
6c62b1bf3d Take out that code from the dynamic playlist viewer that aborts track move-in-progress on playlist change .. based on assumption it doesn't do anything other than cause FS#10395
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23751 a1c6a512-1295-4272-9138-f99709370657
2009-11-25 22:48:15 +00:00
Nils Wallménius
3200d04d75 Make the formatter functions used by the settings return a pointer to avoid 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-08-20 16:47:44 +00:00
Thomas Martitz
18e40e0f4c Make kbd_input() show a cancel splash to indicate user abort better and for better consistency all over the place. Change checking for its return value (style-wise) at some places too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22269 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 14:38:25 +00:00
Andrew Mahone
1bc67c81b6 Fix type mismatch warnings and errors exposed when building with EABI toolchain.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21769 a1c6a512-1295-4272-9138-f99709370657
2009-07-11 00:22:26 +00:00
Dave Hooper
be0cd7310a Fix bug introduced in r21616 (my bad)- playlist moving array could show in playlist viewer even when track not being moved
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21704 a1c6a512-1295-4272-9138-f99709370657
2009-07-07 22:40:47 +00:00
Dave Hooper
119252177c Commit patch in FS#7967 by Vuong Minh Hiep (with some small changes to variable names for consistency) - separately keep track of viewer-index and playlist-index of moving tracks, so that viewer correctly shows which track is moving when playlist is shuffled, and correctly moves the track you tell it to
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21616 a1c6a512-1295-4272-9138-f99709370657
2009-07-02 23:03:46 +00:00
Dave Hooper
4044499198 Fix playlist viewer behaviour when deleting tracks (one ret had missed being changed to ret_val). FIx playlist viewer behaviour when deleting the only remaining track in playlist (i.e. when audio stops, prevent resume playback also)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21615 a1c6a512-1295-4272-9138-f99709370657
2009-07-02 22:45:00 +00:00
Bertrik Sikken
0023943439 Fix duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 14:50:19 +00:00
Bertrik Sikken
09085a30f6 Remove unneeded #include "backdrop.h"
Remove unneeded #include "statusbar.h"


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20891 a1c6a512-1295-4272-9138-f99709370657
2009-05-09 18:09:14 +00:00
Bertrik Sikken
66cf3a3329 Clean up some #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20238 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 16:10:40 +00:00
Jonathan Gordon
e385ee18ce Decouple the statusbar drawing from the rest of the screen drawing. it is not drawn roughly 4x per second automatically.
viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.)
All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false).

This commit also includes some menu/list viewport cleanups from kugel in FS#9603


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
2008-12-31 05:59:26 +00:00
Nils Wallménius
da01219ca2 Search In Playlist
* Add a title to the list of search results.
* Fix drawing of the statusbar.
* Avoid splashing in every iteration of the search loop if no new hits, 
gives about 10x speedup on h300 when searching for a string that gives 
30 hits in a playlist of 3000 tracks.
* Boost cpu when searching, ~doubles the search speed.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18764 a1c6a512-1295-4272-9138-f99709370657
2008-10-10 21:19:56 +00:00
Nils Wallménius
173b411b87 Fix FS#9418 'Player unresponsive while searching playlist with directory cache enabled'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18665 a1c6a512-1295-4272-9138-f99709370657
2008-09-29 19:29:42 +00:00
Peter D'Hoye
3c1e9ca558 Change screens memebers char_width, char_height and nb_lines to functions returning a calculated value. Fixes FS #9361 because the values were calculated based on sysfont, not the user selected font.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18441 a1c6a512-1295-4272-9138-f99709370657
2008-09-07 20:09:11 +00:00
Nils Wallménius
01729e7a18 FS#9281 Rename of splash functions.
* Remove gui_splash()
* Rename gui_syncsplash() to splashf() and remove its voice 
capabilities.
* Rename the internal splash() to splash_internal() and introduce an 
externally visible splash() that handles simple splashing  without 
printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, 
"foo"); if a LANG_* id is passed it will be voiced.
* Adjust all places that called gui_syncsplash() to use the correct 
variant from above.
* Export both new functions to plugins and adjust places calling 
rb->splash() to use the correct variant so that we now have naming 
consistency between the core and plugins.
* Fix one latent bug that would cause my sim to crash with the above 
changes and correct P2STR and P2ID macros, thanks to pondlife.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
2008-08-15 08:27:39 +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
Steve Bavin
ad95df2cab Const police raid.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17474 a1c6a512-1295-4272-9138-f99709370657
2008-05-12 17:52:50 +00:00
Jonathan Gordon
517aca8532 use the playlist catalog code to generate the playlists under Playlist > Create playlist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17352 a1c6a512-1295-4272-9138-f99709370657
2008-05-04 13:01:16 +00:00
Nils Wallménius
791e0928c5 Slight readability improvements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17056 a1c6a512-1295-4272-9138-f99709370657
2008-04-09 21:47:43 +00:00
Nils Wallménius
6848961aa5 Pass the buffer length to the list_get_name callback functions instead of using hardcoded MAX_PATH
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
2008-04-09 15:25:17 +00:00
Jonathan Gordon
5ca1539969 the menu and list now accepts a parent viewport to draw in (and the menu can 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-03-26 03:35:24 +00:00
Antoine Cellerier
a6d4e531a3 Patch "Remain in PLViewer when move_track is canceled", by Lee Kang Hyuk. Closes FS#8322.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15937 a1c6a512-1295-4272-9138-f99709370657
2007-12-15 17:14:04 +00:00
Nils Wallménius
4acae4da03 Use the strrsplt function in one more place
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15662 a1c6a512-1295-4272-9138-f99709370657
2007-11-18 14:12:01 +00:00
Antoine Cellerier
2490700867 Playlist viewer move live preview. Closes FS #7968.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15124 a1c6a512-1295-4272-9138-f99709370657
2007-10-15 20:34:02 +00:00
Jonathan Gordon
cf1cef5f57 minor update to gui_synclist_do_button() which will hopefully simplify 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-09-17 10:08:50 +00:00
Peter D'Hoye
b8ded7d674 Accept FS #7627: allow viewing of dynamic playlist when it has ended
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14456 a1c6a512-1295-4272-9138-f99709370657
2007-08-25 16:05:58 +00:00
Peter D'Hoye
df3281347d Accept FS #7626: allow viewing playlist files if no playlist is loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14420 a1c6a512-1295-4272-9138-f99709370657
2007-08-21 23:50:26 +00:00
Nils Wallménius
b311367481 *** Lang v2 cleanup (FS#6574) ***
1) Introduces apps/features.txt that controls which strings are included 
for each target based on defines.
2) .lng and .voice files are now target specific and the format versions 
of both these file types have been bumped, which means that new voice 
files are needed. 
3) Use the 'features' mechanism to exclude strings for targets that 
didn't use them.
4) Delete unused and deprecated and duplicated strings, sort strings in 
english.lang

Some string IDs were changed so translations will be slightly worse than 
before.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
2007-08-05 19:19:39 +00:00
Jonathan Gordon
88882a83d6 sync and commit FS#4954 - return any results found when aborting a playlist search
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14179 a1c6a512-1295-4272-9138-f99709370657
2007-08-04 09:36:47 +00:00
Jonathan Gordon
f7675a244b remove the need for action_signalscreenchange().
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-07-22 06:05:53 +00:00
Jonathan Gordon
52ba1c614d Fix some naughty variable name reuse (hopefully correctly)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13269 a1c6a512-1295-4272-9138-f99709370657
2007-04-26 10:28:32 +00:00
Jonathan Gordon
3d44a20db7 Accept FS7078, try to show the last playlist if no audio is being played
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13268 a1c6a512-1295-4272-9138-f99709370657
2007-04-26 08:21:29 +00:00
Jonathan Gordon
70e2846241 oops, wrong return value
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13260 a1c6a512-1295-4272-9138-f99709370657
2007-04-25 12:17:16 +00:00