Commit graph

46 commits

Author SHA1 Message Date
William Wilgus
cf009b4cbb pitchscreen make it a plugin
full commandline parsing
    -has pitch, speed, time_stretch
 /* pitch_screen
 *  accepts args -q, -g, -p=, -s=, -k=; (= sign is optional)
 * -q silences output splash
 * -g runs the gui (Runs immediately)
 * -p100 would set pitch to 100%
 * -s=90 sets speed to 90% if timestrech is enabled
 * -k=true -k1 enables time stretch -k0 -kf-kn disables
*/

Change-Id: I900c4b5d184e12ddbe47509f66fdf3e55193a520
2021-11-10 22:38:37 -05:00
Solomon Peachy
7f638e54ee RFC: Fix a couple more dangling stack-allocated viewports
They could end up getting referenced after the stack has been popped.

Change-Id: I12abbf3f436ecfde76a37f2623a044915800d2b2
2021-07-07 15:19:43 +00:00
William Wilgus
40e98a2e49 Whitespace cleanup on fb_viewport Rewrite
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-10-26 12:38:22 -04:00
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device

[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr

while remote lcds may compile (and work in the sim) its not been tested on targets

[FIXED] backdrops need work to be screen agnostic

[FIXED] screen statusbar is not being combined into the main viewport correctly yet

[FIXED] screen elements are displayed incorrectly  after switch to void*

[FIXED] core didn't restore proper viewport on splash etc.

[NEEDS TESTING] remote lcd garbled data

[FIXED] osd lib garbled screen on bmp_part

[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport

[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer

[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing

[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage

[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags

Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26 12:28:48 -04:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
1d893a05c6 pitchscreen: Fix compile on HWCODEC players.
Change-Id: Iffb7018e935e017baf84ddc8e742270f82b996ab
2019-02-04 03:58:52 +01:00
Solomon Peachy
fd9d4a889b Add speech feedback in pitchscreen
Patch by Igor Poretsky

Change-Id: I8828cefdb3346a25071fba0afff2c9d3bca440a1
2019-02-03 20:09:59 -05:00
Michael Sevakis
56f17c4164 Make rbcodec/dsp includes more specific.
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29 17:31:30 -04: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
038fc8a66e Fix the %cs tag for the pitchscreen and playlist viewer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29997 a1c6a512-1295-4272-9138-f99709370657
2011-06-13 07:33:20 +00:00
Thomas Martitz
4888d41b09 Pitchscreen: Small fix for the right touchscreen button.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29179 a1c6a512-1295-4272-9138-f99709370657
2011-02-01 15:01:44 +00:00
Thomas Martitz
3804befc13 Ugh, remove debug output.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29167 a1c6a512-1295-4272-9138-f99709370657
2011-01-29 15:37:09 +00:00
Thomas Martitz
5e3d8f961c Improve sometimes glitchy touchscreen handling in the pitchscreen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29166 a1c6a512-1295-4272-9138-f99709370657
2011-01-29 15:34:36 +00:00
Thomas Martitz
c2f4e03b9e Make pitchscreen absolute point mode compatible.
It's very similar to how it's controlled in the grid mode (in fact, it resembles this mode and they're compatible).
We could've forced the grid mode, but the viewport layout needed fixing for the addional icons anyway, and this way it doesn't
break with an ui viewport.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28361 a1c6a512-1295-4272-9138-f99709370657
2010-10-25 21:20:04 +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
44cacbe595 Correct a small misaligned brace.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23198 a1c6a512-1295-4272-9138-f99709370657
2009-10-15 21:35:10 +00:00
Thomas Martitz
4004c75fee Use the center align viewport flag to draw top and bottom text centered.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23197 a1c6a512-1295-4272-9138-f99709370657
2009-10-15 21:30:19 +00:00
Thomas Martitz
9c45cf2f46 Pitchscreen: Don't clear the whole display, but only the parent viewport.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23196 a1c6a512-1295-4272-9138-f99709370657
2009-10-15 21:13:58 +00:00
Nils Wallménius
46a0db45dd Slight const police and avoid copying a lang string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23065 a1c6a512-1295-4272-9138-f99709370657
2009-10-10 09:57:03 +00:00
Thomas Martitz
85ece84b1c Remove various ABS() definitions with a single one using typeof (if using gcc) to avoid multiple evaluations of the input expressions. Speex still uses its own as I didn't want to change this imported code too much.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22129 a1c6a512-1295-4272-9138-f99709370657
2009-08-03 01:38:58 +00:00
Alexander Levin
23ea8a53a1 Slightly reduce the bin size by using ushort instead of int in arrays
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21840 a1c6a512-1295-4272-9138-f99709370657
2009-07-13 14:48:02 +00:00
Alexander Levin
f448fa4655 Correctly compute the array size regardless of the element type
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21839 a1c6a512-1295-4272-9138-f99709370657
2009-07-13 14:20:39 +00:00
Alexander Levin
76e6291780 Unify semitone and cent macros and make the formula a bit more obvious
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21814 a1c6a512-1295-4272-9138-f99709370657
2009-07-12 17:14:01 +00:00
Alexander Levin
cc7c665d9b Improvements to the pitch screen UI (FS#10359 by David Johnston)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21781 a1c6a512-1295-4272-9138-f99709370657
2009-07-11 16:46:19 +00:00
Steve Bavin
f96f623090 Oops.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21470 a1c6a512-1295-4272-9138-f99709370657
2009-06-22 19:51:02 +00:00
Steve Bavin
40d9b218e5 Allow use of timestretch with semitones in the pitchscreen. Rename variables to clarify the meaning of 'speed'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21468 a1c6a512-1295-4272-9138-f99709370657
2009-06-22 18:52:14 +00:00
Steve Bavin
cbbf032c1b Display speed as relative to real-time, not timestretch amount.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21375 a1c6a512-1295-4272-9138-f99709370657
2009-06-20 10:36:07 +00:00
Alexander Levin
02a3740596 Slightly rearrange statements. No functional change but RAM and binary are reduced.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21350 a1c6a512-1295-4272-9138-f99709370657
2009-06-19 11:23:02 +00:00
Steve Bavin
d6ad019af3 Renamed routines and changed comments for clarity.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21309 a1c6a512-1295-4272-9138-f99709370657
2009-06-16 07:10:05 +00:00
Steve Bavin
fb2380790e FS#8894 - Add time stretching feature to all SWCODEC targets - the current algorithm is best for spoken word.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21258 a1c6a512-1295-4272-9138-f99709370657
2009-06-12 07:20:50 +00:00
Bertrik Sikken
ab222c1705 Simplify some redundant boolean expressions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21013 a1c6a512-1295-4272-9138-f99709370657
2009-05-21 14:15:24 +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
30a2713b6e Clean up some more #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20243 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 18:37:32 +00:00
Thomas Martitz
dd13730112 Minor quickscreen and pitchscreen fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19924 a1c6a512-1295-4272-9138-f99709370657
2009-02-05 00:14:52 +00:00
Thomas Martitz
76ba8ec890 Some cleanup (such as #include cleanup, clearer variable names) in pitchscreen. Also, don't update the full display all the time, but only the necessary parts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19871 a1c6a512-1295-4272-9138-f99709370657
2009-01-28 20:14:01 +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
Jonathan Gordon
e8f7ad1b28 yes... i'm just trying to boost my ohloh score!
(also minor code policing again)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18716 a1c6a512-1295-4272-9138-f99709370657
2008-10-05 13:45:21 +00:00
Jonathan Gordon
6a81923e6e bit of code police
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18715 a1c6a512-1295-4272-9138-f99709370657
2008-10-05 13:13:55 +00:00
Jonathan Gordon
1da2f0112e Accept FS#9231 - viewportify the pitch screen by Thomas Martitz.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18714 a1c6a512-1295-4272-9138-f99709370657
2008-10-05 13:01:54 +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
Peter D'Hoye
205f3df781 Remove a viewport ambiguity by changing the screens width/heigth members into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 20:45:21 +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
Bertrik Sikken
7835a20347 Prototype declaration strictness fixes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17424 a1c6a512-1295-4272-9138-f99709370657
2008-05-08 20:37:26 +00:00
Nicolas Pennequin
357ffb3c46 Convert the whole codebase to UTF-8, except docs/COMMITTERS and tools/creative.c, which need checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17369 a1c6a512-1295-4272-9138-f99709370657
2008-05-05 10:32:46 +00:00
Jonathan Gordon
8e57ede59f move the pitchscreen out of screens.c.. no functional changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17365 a1c6a512-1295-4272-9138-f99709370657
2008-05-05 07:07:19 +00:00