summaryrefslogtreecommitdiff
path: root/apps/plugin.h
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/plugin.h
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/plugin.h')
-rw-r--r--apps/plugin.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index bd95331143..6ca0488e06 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -155,12 +155,12 @@ int plugin_open(const char *plugin, const char *parameter);
155#define PLUGIN_MAGIC 0x526F634B /* RocK */ 155#define PLUGIN_MAGIC 0x526F634B /* RocK */
156 156
157/* increase this every time the api struct changes */ 157/* increase this every time the api struct changes */
158#define PLUGIN_API_VERSION 244 158#define PLUGIN_API_VERSION 245
159 159
160/* update this to latest version if a change to the api struct breaks 160/* update this to latest version if a change to the api struct breaks
161 backwards compatibility (and please take the opportunity to sort in any 161 backwards compatibility (and please take the opportunity to sort in any
162 new function which are "waiting" at the end of the function table) */ 162 new function which are "waiting" at the end of the function table) */
163#define PLUGIN_MIN_API_VERSION 244 163#define PLUGIN_MIN_API_VERSION 245
164 164
165/* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */ 165/* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */
166 166
@@ -400,6 +400,7 @@ struct plugin_api {
400 int (*get_action)(int context, int timeout); 400 int (*get_action)(int context, int timeout);
401#ifdef HAVE_TOUCHSCREEN 401#ifdef HAVE_TOUCHSCREEN
402 int (*action_get_touchscreen_press)(short *x, short *y); 402 int (*action_get_touchscreen_press)(short *x, short *y);
403 int (*action_get_touchscreen_press_in_vp)(short *x1, short *y1, struct viewport *vp);
403#endif 404#endif
404 bool (*action_userabort)(int timeout); 405 bool (*action_userabort)(int timeout);
405 406
@@ -462,6 +463,7 @@ struct plugin_api {
462 bool (*file_exists)(const char *path); 463 bool (*file_exists)(const char *path);
463 char* (*strip_extension)(char* buffer, int buffer_size, const char *filename); 464 char* (*strip_extension)(char* buffer, int buffer_size, const char *filename);
464 uint32_t (*crc_32)(const void *src, uint32_t len, uint32_t crc32); 465 uint32_t (*crc_32)(const void *src, uint32_t len, uint32_t crc32);
466 uint32_t (*crc_32r)(const void *src, uint32_t len, uint32_t crc32);
465 467
466 int (*filetype_get_attr)(const char* file); 468 int (*filetype_get_attr)(const char* file);
467 469
@@ -667,6 +669,7 @@ struct plugin_api {
667 unsigned int band_setting); 669 unsigned int band_setting);
668#endif /* AUDIOHW_HAVE_EQ */ 670#endif /* AUDIOHW_HAVE_EQ */
669#if defined (HAVE_PITCHCONTROL) 671#if defined (HAVE_PITCHCONTROL)
672 int32_t (*sound_get_pitch)(void);
670 void (*sound_set_pitch)(int32_t pitch); 673 void (*sound_set_pitch)(int32_t pitch);
671#endif 674#endif
672 const unsigned long *audio_master_sampr_list; 675 const unsigned long *audio_master_sampr_list;
@@ -701,7 +704,10 @@ struct plugin_api {
701 void (*dsp_eq_enable)(bool enable); 704 void (*dsp_eq_enable)(bool enable);
702 void (*dsp_dither_enable)(bool enable); 705 void (*dsp_dither_enable)(bool enable);
703#ifdef HAVE_PITCHCONTROL 706#ifdef HAVE_PITCHCONTROL
707 int32_t (*dsp_get_timestretch)(void);
704 void (*dsp_set_timestretch)(int32_t percent); 708 void (*dsp_set_timestretch)(int32_t percent);
709 void (*dsp_timestretch_enable)(bool enabled);
710 bool (*dsp_timestretch_available)(void);
705#endif 711#endif
706 intptr_t (*dsp_configure)(struct dsp_config *dsp, 712 intptr_t (*dsp_configure)(struct dsp_config *dsp,
707 unsigned int setting, intptr_t value); 713 unsigned int setting, intptr_t value);
@@ -727,6 +733,7 @@ struct plugin_api {
727 void (*mixer_set_frequency)(unsigned int samplerate); 733 void (*mixer_set_frequency)(unsigned int samplerate);
728 unsigned int (*mixer_get_frequency)(void); 734 unsigned int (*mixer_get_frequency)(void);
729 void (*pcmbuf_fade)(bool fade, bool in); 735 void (*pcmbuf_fade)(bool fade, bool in);
736 void (*pcmbuf_set_low_latency)(bool state);
730 void (*system_sound_play)(enum system_sound sound); 737 void (*system_sound_play)(enum system_sound sound);
731 void (*keyclick_click)(bool rawbutton, int action); 738 void (*keyclick_click)(bool rawbutton, int action);
732 739
@@ -793,6 +800,9 @@ struct plugin_api {
793 struct mp3entry* (*audio_current_track)(void); 800 struct mp3entry* (*audio_current_track)(void);
794 void (*audio_flush_and_reload_tracks)(void); 801 void (*audio_flush_and_reload_tracks)(void);
795 int (*audio_get_file_pos)(void); 802 int (*audio_get_file_pos)(void);
803#ifdef PLUGIN_USE_IRAM
804 void (*audio_hard_stop)(void);
805#endif
796 806
797 /* menu */ 807 /* menu */
798 struct menu_table *(*root_menu_get_options)(int *nb_options); 808 struct menu_table *(*root_menu_get_options)(int *nb_options);
@@ -853,6 +863,7 @@ struct plugin_api {
853#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 863#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
854 int * (*__errno)(void); 864 int * (*__errno)(void);
855#endif 865#endif
866 void (*led)(bool on);
856 void (*srand)(unsigned int seed); 867 void (*srand)(unsigned int seed);
857 int (*rand)(void); 868 int (*rand)(void);
858 void (*qsort)(void *base, size_t nmemb, size_t size, 869 void (*qsort)(void *base, size_t nmemb, size_t size,
@@ -907,9 +918,6 @@ struct plugin_api {
907 bool (*detect_flashed_ramimage)(void); 918 bool (*detect_flashed_ramimage)(void);
908 bool (*detect_flashed_romimage)(void); 919 bool (*detect_flashed_romimage)(void);
909#endif 920#endif
910
911 void (*led)(bool on);
912
913 /*plugin*/ 921 /*plugin*/
914 int (*plugin_open)(const char *path, const char *parameter); 922 int (*plugin_open)(const char *path, const char *parameter);
915 void* (*plugin_get_buffer)(size_t *buffer_size); 923 void* (*plugin_get_buffer)(size_t *buffer_size);
@@ -917,11 +925,6 @@ struct plugin_api {
917 void (*plugin_release_audio_buffer)(void); 925 void (*plugin_release_audio_buffer)(void);
918 void (*plugin_tsr)(bool (*exit_callback)(bool reenter)); 926 void (*plugin_tsr)(bool (*exit_callback)(bool reenter));
919 char* (*plugin_get_current_filename)(void); 927 char* (*plugin_get_current_filename)(void);
920#ifdef PLUGIN_USE_IRAM
921 void (*audio_hard_stop)(void);
922#endif
923 uint32_t (*crc_32r)(const void *src, uint32_t len, uint32_t crc32);
924
925 /* new stuff at the end, sort into place next time 928 /* new stuff at the end, sort into place next time
926 the API gets incompatible */ 929 the API gets incompatible */
927 930