summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-08-19 22:20:56 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2021-11-10 22:38:37 -0500
commitcf009b4cbb1eec083ab17ce370df090979eaf68e (patch)
tree19c2346a0e92878ef078879b77e262bf3380ec72 /apps/plugins/lib
parent67fb558c8997f47440b176fe5553246486b1a838 (diff)
downloadrockbox-cf009b4cbb1eec083ab17ce370df090979eaf68e.tar.gz
rockbox-cf009b4cbb1eec083ab17ce370df090979eaf68e.zip
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
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/arg_helper.c4
-rw-r--r--apps/plugins/lib/arg_helper.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/lib/arg_helper.c b/apps/plugins/lib/arg_helper.c
index d402300900..3ea5ba714d 100644
--- a/apps/plugins/lib/arg_helper.c
+++ b/apps/plugins/lib/arg_helper.c
@@ -28,7 +28,9 @@
28 28
29#define SWCHAR '-' 29#define SWCHAR '-'
30#define DECSEPCHAR '.' 30#define DECSEPCHAR '.'
31 31#ifdef PLUGIN
32 #define strchr rb->strchr
33#endif
32int string_parse(const char **parameter, char* buf, size_t buf_sz) 34int string_parse(const char **parameter, char* buf, size_t buf_sz)
33{ 35{
34/* fills buf with a string upto buf_sz, null terminates the buffer 36/* fills buf with a string upto buf_sz, null terminates the buffer
diff --git a/apps/plugins/lib/arg_helper.h b/apps/plugins/lib/arg_helper.h
index c7b14f7f7a..2cf94ba1dd 100644
--- a/apps/plugins/lib/arg_helper.h
+++ b/apps/plugins/lib/arg_helper.h
@@ -26,7 +26,7 @@
26#define ARGPARSE_MAX_FRAC_DIGITS 9 /* Uses 30 bits max (0.999999999) */ 26#define ARGPARSE_MAX_FRAC_DIGITS 9 /* Uses 30 bits max (0.999999999) */
27 27
28#define ARGP_EXP(a, b) (a ##E## b) 28#define ARGP_EXP(a, b) (a ##E## b)
29#define ARGP_FRAC_DEC_MULTIPLIER(n) AP_EXP(1,n) /*1x10^n*/ 29#define ARGP_FRAC_DEC_MULTIPLIER(n) ARGP_EXP(1,n) /*1x10^n*/
30#define ARGPARSE_FRAC_DEC_MULTIPLIER \ 30#define ARGPARSE_FRAC_DEC_MULTIPLIER \
31 (long)ARGP_FRAC_DEC_MULTIPLIER(ARGPARSE_MAX_FRAC_DIGITS) 31 (long)ARGP_FRAC_DEC_MULTIPLIER(ARGPARSE_MAX_FRAC_DIGITS)
32 32