Commit graph

266 commits

Author SHA1 Message Date
Thomas Martitz
4f5b13077e Fix Player
Change-Id: Ie489f91f78a9bdbded9b4ce09c74602dbca3934b
2014-01-15 22:56:39 +01:00
Thomas Martitz
5007bd64c3 Fix checkwps.
Change-Id: Ic10df965d55939b4d5ff5105f83a08a097877910
2014-01-15 22:40:18 +01:00
Thomas Martitz
2eb873cea6 skins: Update SBS when changing activities.
When changing activities (those that are indicated via %cs skin tag), the sbs
needs to be updated, so that the UI viewport can be applied before that
activity draws its UI.

Fixes FS#12804. I hope this commit doesn't have bad side effects.

Change-Id: If45654e356749f5f27991430dbd1da6f23e6f802
2014-01-15 18:57:46 +01:00
PurlingNayuki
f0bec023d9 Implement volume limiter feature
Add a "volume limit" parameter to the configuration file. The maximum
value of volume setting in sound menu will be limited to the same as
volume limit. Also each time when setvol() is excuted, Rockbox will
check if the global_settings.volume value larger than
global_settings.volume_limit. If larger, take the value of volume_limit
instead. The volume_limit argument shares the same maximum and minimum values
with volume argument, while taking the maximum volume as its default value.

Change-Id: I8ca9bc6ea6e617b48fc346aae5f2a0a1d259ae36
Reviewed-on: http://gerrit.rockbox.org/697
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2014-01-13 11:32:03 +01:00
Ralf Ertzinger
b170c73f92 Updated IAP commands.
Originally written and uploaded by Lalufu (Ralf Ertzinger) in Feb 2012.
They have been condensed into a single patch and some further additions
by Andy Potter.

Currently includes Authentication V2 support from iPod to Accessory,
RF/BlueTooth transmitter support, selecting a playlist and selecting a
track from the current playlist. Does not support uploading Album Art
or podcasts. Has been tested on the following iPods,
4th Gen Grayscale, 4th Gen Color/Photo, Mini 2nd Gen, Nano 1st Gen and
Video 5.5Gen.

Change-Id: Ie8fc098361844132f0228ecbe3c48da948726f5e
Co-Authored by: Andy Potter <liveboxandy@gmail.com>
Reviewed-on: http://gerrit.rockbox.org/533
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2013-11-10 18:41:24 +01:00
Michael Sevakis
023f6b6efd Get rid of some superfluous single-purpose functions in playback.
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
  pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
  it cleaner and removes the struct mp3entry.

Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
2013-07-13 00:08:51 -04:00
Michael Sevakis
ffa8626b0c Fix whitespace in files for following commit.
Change-Id: I4adb8a152e9b99fcd26d95da7334d7d0cbe2a036
2013-07-12 21:39:06 -04:00
Thomas Martitz
8c655cfdc0 New GUI browser to select one (or more) folders.
The browser lets the user pick one or more directories in a convinient
GUI browser. The initial directory list is read from a string
(separated by colons) and the resulting list is written back to the same
string (again separated by colons).

Note: The work was initially done by Jonathan Gordon, however I changed
it substantially so I claim autorship.

This selector is going to be used for autoresume and database scan folders.

Change-Id: Id1d3186dad783411eb5c6056ce93f5b6123c7aa0
2012-07-30 21:20:51 +02:00
Jonathan Gordon
f6d6a4602c Fix fast_readline to handle windows line endings (\r\n)
Change-Id: I3561eff9bc4e244a84ef4afee26a40432d1073dd
2012-07-05 23:00:31 +10:00
Michael Sevakis
57a20d2d63 Make DSP's replaygain independent of global_settings.
Moves replaygain definitions to lib/rbcodec/dsp/dsp_misc.h.
Intermediate functions in misc.c handle any adjustment and calling
the rbcodec APIs.

Change-Id: I9f03561bca9aedd13760cf19c4e19aa3c68e7024
Reviewed-on: http://gerrit.rockbox.org/140
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-30 22:47:37 +02:00
Michael Sevakis
d18a5cad7f Tweak paramters of mp3_play_data and callback.
Use generic void * and size_t and make mp3_play_data and its callback
agree on types. Use mp3_play_callback_t instead of prototyping
right in the function call (so it's not so messy to look at). Change
doesn't appear to require plugin API version increment.

Change-Id: Idcab2740ee316a2beb6e0a87b8f4934d9d6b3dd8
2012-03-04 14:50:47 -05:00
Michael Sevakis
d05db0a90c Correct actionable offense for misappropriation of action context.
Just use a bool to indicate raw button instead of action code. No
bother with plugin version yet again so soon.

Change-Id: I4aa075c0c1fb5308c9d49bebb30ac76f671b2335
2012-03-03 07:52:13 -05:00
Michael Sevakis
f688710707 Change keyclick_click so that it may accept raw buttons or actions.
Adds a new context, CONTEXT_RAWBUTTON, that I hope is out of the way
of everything. Unfortunately have to increment min plugin API version
for the second time today to accomodate additional parameter.

Change-Id: Iaa46b926e57cf377fd4906f2d42bb98e87215033
2012-03-03 07:10:56 -05:00
Thomas Martitz
295c1c1e8b checkwps: Fix buildall.sh and some RaaA/ypr0 versions.
Change-Id: I5889743e94ed568c8f7dcc50de0b03b8421969f7
2012-02-10 20:27:59 +01:00
Jonathan Gordon
c2f0ba7ecd fix compiler error, missed action.h
Change-Id: Idc6d59835d1fd20cb4828543547b6d8b6f74053b
2012-01-15 00:56:56 +11:00
Jonathan Gordon
eb2ea7f9ad keyclick: Add a callback so screens can cancel a click. Add a generic list callback to stop clicks when we are at the end of the list
Change-Id: Iabb44a861dd7506cd883c1bdb0241303fa646746
2012-01-12 22:28:36 +11:00
Rafaël Carré
b612263b1e apps: lcd-remote.h is not needed if HAVE_REMOTE_LCD is not defined
Fix a comment

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31608 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 19:35:46 +00:00
Thomas Martitz
c1bd9b0361 Rework powermgmt to enable code re-use on appliation and sims.
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application)
to break powermgmt.c's assumption about the ability to read battery voltage.
There's now additionally percentage (android) and remaining time measure
(maemo). No measure at all also works (sdl app). If voltage can't be measured,
then battery_level() is king and it'll be used for power_history and runtime
estimation.

* Implement target's API in the simulator, i.e. _battery_voltage(), so it
doesn't need to implement it's own powermgmt.c and other stubs. Now
the sim behaves much more like a native target, although it still
changes the simulated battery voltage quickly,

* Other changes include include renaming battery_adc_voltage() to
_battery_voltage(), for consistency with the new target functions and
making some of the apps code aware that voltage and runtime estimation
is not always available.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 23:44:38 +00:00
Nick Peskett
1b781df59c Convert hard-coded unicode byte order mark values to constants.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31374 a1c6a512-1295-4272-9138-f99709370657
2011-12-20 08:15:36 +00:00
Jonathan Gordon
f65ceebee8 Change the "keyclick repeat" setting behaviour so when it is off only the *first* repeat will click.
Otherwise single presses and all wheel movements will cause a click. with "keyclick repeat" enabled *all* repeats will cause clicks

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30997 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 11:05:46 +00:00
Jonathan Gordon
be716c0be8 Finally commit FS#5111 - piezo clicker for ipods!
Origional implementation by Robert Keevil with contributions from Frederik Vestre,  Stoyan Stratev, Craig Elliott, Michael Sparmann,  Thomas Schott, Rosso Maltese, and syncs from a bunch of other people!

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30995 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 10:25:43 +00:00
Thomas Martitz
0602dbce4e Fix typos in usb_screen.c and use lcd_remote_bmp() for showing the rockbox logo on remotes as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30972 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:44:27 +00:00
Thomas Martitz
9a70c42241 Add the ability to create a prefilled struct bitmap along with generated images.
This allows to directly draw generated and builtin images using lcd_bmp(bm_xxx);
Also fixes builtin list icons on non-mono targets, as they didn't have the
format field set.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30971 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:37:16 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Jonathan Gordon
d43b85c7ed fix the last of the error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30464 a1c6a512-1295-4272-9138-f99709370657
2011-09-06 14:07:27 +00:00
Jonathan Gordon
63a379c64c Add the new file and fix the compile error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30462 a1c6a512-1295-4272-9138-f99709370657
2011-09-06 13:53:46 +00:00
Jonathan Gordon
9b6ac01c7b Lists can now be completly draw using the skin engine!
due to lack of user feedback the actual tags may change, hopefully not though.

The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves).
Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern.
The UI viewport is used to bound the items (i.e %Vi() )
Scrolling is completly disabled in all items except the currently selected item.

This works well in combination with the %cs tag to show differently styled lists based on the current screen :)

New tags:
%LT - Get the current items text
%LI - Get the current items icon number
%Lc - Use as a conditional to determine if the current item is the selected item
%LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed
%Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list

example.sbs:
%?cs<%Lb(a,100,20)|>
%V(0,0,10,-,1)%Vf(aabbcc)
%?LB<%LB(0,0,10,185, invert)>
%Vi(-,10,0,-,-35,1)
%Vl(a,5,5,160,12,1)
%s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz            %LT         zzzzz%s%?Lc<%ar%<%<%<>
%V(0,185,-,-,1)
%s%LT

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
2011-09-06 13:49:41 +00:00
Thomas Martitz
1da1b70e26 Fix panic after usb extraction if lastfm logging is enabled.
Previously the scrobbler was shutdown, probably to force a log flush,
and the cache was re-allocated afterwards. Now don't shut down or
re-allocate, but instead rely on the ata idle callback which is
called called on usb insertion to do the log flush.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30325 a1c6a512-1295-4272-9138-f99709370657
2011-08-17 11:27:33 +00:00
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
Bertrik Sikken
b2d0ea204c Remove a couple of duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30301 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 13:42:32 +00:00
Thomas Martitz
dbdbc242ac Remove hosted_get_volume(), as event data is available in button_get_data().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30300 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 13:38:10 +00:00
Amaury Pouly
eb90d95693 imx233/fuze+: huge rework
- enable MMU
-rework lcd frame buffer
- add rtc/adc/power stubs (or not)
- fix a few MMC related defines (hopefully)
- implement cache handling for DMA
- more SD work
- add keymap (based on clip)
- add virtual buttons
- update linker scripts
- big step toward apps actually compiling

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30200 a1c6a512-1295-4272-9138-f99709370657
2011-07-23 11:45:22 +00:00
Michael Sevakis
b2dbc2fe70 Fix r30130 red. New functions in misc.c shouldn't be compiled if '__PCTOOL__' is defined.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30131 a1c6a512-1295-4272-9138-f99709370657
2011-07-08 22:51:12 +00:00
Michael Sevakis
5663e1cd0a Have mpegplayer use the mixer (the playback channel, since it's mutually exclusive to audio playback) so the clicks and skip beep can be used according to user settings. Introduce some system sound functions to make easier playing event sounds from various places and convert files calling 'beep_play' to use 'system_sound_play' and 'keyclick_click'. Event sound could be become themeable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30130 a1c6a512-1295-4272-9138-f99709370657
2011-07-08 22:31:15 +00:00
Michael Sevakis
7996d6d3f9 Knock out at least some red/yellow from r30097.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30098 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 07:06:10 +00:00
Michael Sevakis
a2b6703a36 Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 06:37:04 +00:00
Miika Pekkarinen
d0084ffd7a Fixed a regression caused in r30021: tagnavi_custom.config parsing
fails if lines ended with <CR><LF> sequence.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30058 a1c6a512-1295-4272-9138-f99709370657
2011-06-23 20:22:00 +00:00
Miika Pekkarinen
f2ef42c1da Fixed a changelog export/import problem with tagcache where <CR> or <LF>
characters in a tag could cause the parser fail to import a track
statistics correctly. Now line feeds are escaped properly and carriage
returns ignored on import.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30021 a1c6a512-1295-4272-9138-f99709370657
2011-06-20 15:53:33 +00:00
Dominik Riebeling
482e83d09a Center Rockbox logo when smaller than the screen size.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29954 a1c6a512-1295-4272-9138-f99709370657
2011-06-04 18:55:51 +00:00
Jonathan Gordon
b58d3656d7 FS#11925 - Add a proper system to keep track of the current screen/activity to make %cs far more useful
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29944 a1c6a512-1295-4272-9138-f99709370657
2011-06-01 14:41:49 +00:00
Michael Hohmuth
5aec3c2400 FS#11931 part 2: Allow a short rewind when playback is paused. Patch
by John Morris.

This patch adds an option to rewind the current track by a few seconds
when it is paused, irrespective of what has caused the pause.  This is
useful for audiobooks and podcasts to allow the listener to recall
where the track was left off.

The patch subsumes the existing rewind-on-headphone-unplug feature and
extends it to all invocations of pause: play/pause button (or touch
area), headphone removal, and power-supply unplug in car-adapter
mode. It also subsumes FS#9448 (rewind on fade).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29876 a1c6a512-1295-4272-9138-f99709370657
2011-05-13 22:28:47 +00:00
Michael Hohmuth
84301c1e2d FS#11931 part 1: Make fade in/out behavior more consistent across the
various causes of pause and unpause.

Patch by John Morris.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29844 a1c6a512-1295-4272-9138-f99709370657
2011-05-09 12:59:46 +00:00
Michael Hohmuth
9b7027232f unplug_change: Precede call to audio_ff_rewind with
audio_pre_ff_rewind (for SWCODEC).

This became necessary with the recent playback-code renovation.
Thanks to jethead for the hint!

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29843 a1c6a512-1295-4272-9138-f99709370657
2011-05-09 12:51:19 +00:00
Michael Sevakis
82e97363f1 Get rid of a committed #define from kernel.h that didn't make the final cut. Put voice_wait in voice_thread.h where it ought.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29787 a1c6a512-1295-4272-9138-f99709370657
2011-04-27 04:00:48 +00:00
Björn Stenberg
ce755dd9c5 Only set volume on SYS_VOLUME_CHANGED the first time. Workaround for FS#12034.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29663 a1c6a512-1295-4272-9138-f99709370657
2011-03-31 07:04:44 +00:00
Thomas Martitz
8c46ddf9d7 Android: Implement app shutdown and thus, sleep timer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29602 a1c6a512-1295-4272-9138-f99709370657
2011-03-16 15:17:24 +00:00
Björn Stenberg
e50cc0e3d7 Listen to and follow external Android volume changes. (Based on FS#11914 by Maurus Cuelenaere)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29586 a1c6a512-1295-4272-9138-f99709370657
2011-03-14 12:25:48 +00:00
Michael Sevakis
48b1a2d39d Fix the r29343 red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29344 a1c6a512-1295-4272-9138-f99709370657
2011-02-20 11:46:57 +00:00
Michael Sevakis
03862292a2 Make format_time properly format negative times because sometimes they are shown if track length estimates are off from seeking. Example: -0:15 instead of 0:-15. -1000ms < t < 0 is shown as -0:00.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29343 a1c6a512-1295-4272-9138-f99709370657
2011-02-20 11:33:25 +00:00
Thomas Martitz
1e391fbdbc Fix yellows and checkwps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29328 a1c6a512-1295-4272-9138-f99709370657
2011-02-18 23:17:07 +00:00