Commit Graph

119 Commits

Author SHA1 Message Date
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-14 23:36:30 +01:00
Thomas Martitz
1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +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
Nils Wallménius
d29a11b7a8 Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROL
Also move the definition to config.h

Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff
Reviewed-on: http://gerrit.rockbox.org/234
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-09 14:32:38 +02:00
Rafaël Carré
65bb8e4452 Remove extraneous parens 2012-05-06 23:13:34 -04:00
Michael Sevakis
56f17c4164 Make rbcodec/dsp includes more specific.
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29 17:31:30 -04:00
Osborne Jacobs
595427c095 Add new actions to %Tp (Touchscreen areas)
Add the following actions to %Tp:
createbookmark   create a new bookmark from the wps
listbookmarks    list bookmarks from the wps
trackinfo        show track info from the wps

My main motivation was to allow bookmarking and jumping around audio books
from the wps on touch enabled targets.  You can do it now through the context
menu but it requires 4 screen presses instead of 1.

Change-Id: I1fa1bf0064dfd22b897eca7c56acc1ce8956f14c
Reviewed-on: http://gerrit.rockbox.org/171
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-03-13 03:17:12 +01:00
Jonathan Gordon
a2f28452e1 Fix FS#9391 - playback engine gets confused by multiple simultaneous button presses
Change-Id: Ie08f9dabc814adfe92c382d2e770808839cd6dd2
2012-02-07 22:06:09 +11:00
Thomas Martitz
54044fd6e9 Apply "Skip to outro" and specific skip lengths to individual tracks in a cuesheet.
Previously it applied to the whole file and you couldn't skip betweenn the
subtracks. Now it behaves consistently with real seperated tracks.

Change-Id: Ic1730ace142a05d9726b8c9afd67e94823651b60
2012-01-30 21:25:31 +01:00
Jonathan Gordon
a55982d130 Fix touchscreens so entering the WPS with a skin with no touchregions reverts to grid mode (caused by r30991)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31156 a1c6a512-1295-4272-9138-f99709370657
2011-12-06 10:30:13 +00:00
Jonathan Gordon
1252d0d540 Get rid of a really annoying #ifdef line to check if backdrop support should be enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31027 a1c6a512-1295-4272-9138-f99709370657
2011-11-19 13:46:25 +00:00
Jonathan Gordon
9e07ef2b0a Use buflib for all skin engine allocations.
Massive thanks to Michael Chicoine and other testers for finding the early bugs.

This removes all skin memory limitations

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
2011-11-15 14:11:08 +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
Bertrik Sikken
2e58d5935d Make function calc_db in peakmeter.c static
Remove some unneeded #include "peakmeter.h"

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30713 a1c6a512-1295-4272-9138-f99709370657
2011-10-04 21:25:26 +00:00
Bertrik Sikken
9bddc48b32 Remove unused function display_keylock_text
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30712 a1c6a512-1295-4272-9138-f99709370657
2011-10-04 20:34:15 +00:00
Michael Sevakis
5078d460c6 Fix FS#12238 - WPS delay on pause introduced by r30097 which was the excuse I wanted anyway to do a better PCM fade on stop/pause implementation. New fade is asynchronous tick-based. Restores skin update points in the WPS that were removed when fading mechanism was changed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30340 a1c6a512-1295-4272-9138-f99709370657
2011-08-23 01:37:59 +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
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
Michael Sevakis
caf907eef1 Workaround an occasional problem where album art or cuesheets might not be ready by the time the track change event is send which can result in the WPS not immediately being aware that the handles are ready. A better solution will be sought that hopefully doesn't require the additional event.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29923 a1c6a512-1295-4272-9138-f99709370657
2011-05-25 08:35:31 +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
0b59079dd2 Fix a warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29845 a1c6a512-1295-4272-9138-f99709370657
2011-05-09 13:07:04 +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 Sevakis
c537d5958e Commit FS#12069 - Playback rework - first stages. Gives as thorough as possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
2011-04-27 03:08:23 +00:00
Jonathan Gordon
443b134983 Fix touchregions muting volume, and change &<action> to mean 'needs long press but only fire once'. Use *<action> for 'long press and allow repeats'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29653 a1c6a512-1295-4272-9138-f99709370657
2011-03-27 07:23:38 +00:00
Jonathan Gordon
f4e152bdef Make repeat mode/shuffle work in the sbs also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29632 a1c6a512-1295-4272-9138-f99709370657
2011-03-22 09:41:11 +00:00
Jonathan Gordon
98881fd822 Add some playback controls to the SBS. 2 new touch regions wps_next/wps_prev needed to make it work. 'next' in the sbs changes list selection, 'wps_next' in sbs changes audio tracks. no difference in the wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29631 a1c6a512-1295-4272-9138-f99709370657
2011-03-22 09:31:45 +00:00
Björn Stenberg
b8f29c7eed Quicker fade_on_stop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29558 a1c6a512-1295-4272-9138-f99709370657
2011-03-10 22:25:18 +00:00
Jonathan Gordon
343001b5f8 Merge a bunch of code which is 99% identical so it makes it easier to add more of these later
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29535 a1c6a512-1295-4272-9138-f99709370657
2011-03-07 12:45:45 +00:00
Jonathan Gordon
fb3616368f Remove code duplication in some generic skin touch action handling.
fix a bug which stopped the setting_inc/dec touch actions from parsing


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29477 a1c6a512-1295-4272-9138-f99709370657
2011-03-01 07:26:11 +00:00
Andree Buschmann
4c38572997 Remove WPS related variable which is read but not set or changed. Closes FS#11396.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29139 a1c6a512-1295-4272-9138-f99709370657
2011-01-25 21:40:55 +00:00
Mustapha Senhaji
ccad6d0daf Few whitespace fixes by Michael Hohmuth FS#11885
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29082 a1c6a512-1295-4272-9138-f99709370657
2011-01-18 00:37:17 +00:00
Jonathan Gordon
605e2d0e90 New Touchscreen region type... 'mute' which un/mutes volume without pausing playback
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29046 a1c6a512-1295-4272-9138-f99709370657
2011-01-13 10:56:23 +00:00
Thomas Martitz
974b95a39d Oops, unintended change slipped in.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28786 a1c6a512-1295-4272-9138-f99709370657
2010-12-10 18:44:11 +00:00
Thomas Martitz
f5a461d182 Android: Rework notification and change icon sizes to better meet the systems' standard.
The notification now announces the new track on track change, and the the area in the scrolled down notification area shows track infos (title, artist, album).

Someone should check if it looks good on hdpi and ldpi screens as I can't verify it right now (emulator crashes).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28785 a1c6a512-1295-4272-9138-f99709370657
2010-12-10 18:41:09 +00:00
Thomas Martitz
49f1ec8e8a Add support multimedia keys/buttons to the core, and adapt Rockbox on android for it (multimedia buttons are found on wired headsets and the lock screen in cyanogenmod).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28421 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 15:32:57 +00:00
Jonathan Gordon
9928e3418f Another major skin backend update/hopefully bugfix:
Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers)
Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load)

the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is.

This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
2010-09-14 11:56:50 +00:00
Jonathan Gordon
4caa8326ab 2 new touch region options... "settings_inc" and "settings_dec" which will increase or decrease most of the available settings. To use it put the config name of the setting as the next param after settings_inc... i.e %T(0, 0, 32, 32, settings_inc, repeat)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28009 a1c6a512-1295-4272-9138-f99709370657
2010-09-06 13:33:49 +00:00
Jonathan Gordon
489962dc4e Fix FS#11526 - %Vf(<hex>) was acceptable on grey remotes with colour main
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27768 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:15:03 +00:00
Jonathan Gordon
a547fc1b35 Fix FS#11527 - remote wps/sbs doesnt update correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27767 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 13:56:48 +00:00
Jonathan Gordon
f0611f8781 Force touchscreen targets into 3x3 grid mode when entering the wps/radio if the skin hasnt set any regions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27692 a1c6a512-1295-4272-9138-f99709370657
2010-08-04 12:00:18 +00:00
Jonathan Gordon
75556fd57f Fix FS#10926 - h300 wps wouldnt be updated correctly when the backlight turns off because the remote is being naughty
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27666 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 14:12:44 +00:00
Jonathan Gordon
ee4f8a9a6b Allow viewport labels to be mostly free text instead of only one character. If this is useful the same will be done for images
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27665 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 12:50:23 +00:00
Bertrik Sikken
76f4c02dc5 Various minor clean-ups for mrobe
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27639 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 13:41:06 +00:00
Jonathan Gordon
2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:37:48 +00:00
Rafaël Carré
7d4414ebd8 AB_REPEAT_ENABLE was never defined to 2
There's only 2 possibilities: defined or undefined

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27483 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 18:13:53 +00:00
Jonathan Gordon
c201772940 Fix the hotkey touch region in the wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27009 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 12:14:16 +00:00
Jonathan Gordon
a398c2846a Touchregion support for the Base Skin and FM Skins. display obviously needs to be in stylus mode for this to work. Just about all screens should be mostly useable if your sbs has the next/prev/select/cancel/menu regions defined.
Plenty of room to add new action abilities if they are wanted.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27004 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 06:04:19 +00:00
Jonathan Gordon
eada0907ff fix ffwd/rewind on touchscreen targets using regions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26991 a1c6a512-1295-4272-9138-f99709370657
2010-06-20 13:17:24 +00:00
Jonathan Gordon
9a7a542de2 first step of making touch regions usable in all skins, not just the WPS.. no user viewable changes just yet
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26854 a1c6a512-1295-4272-9138-f99709370657
2010-06-15 08:38:23 +00:00