summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugin.c25
-rw-r--r--apps/plugin.h36
2 files changed, 30 insertions, 31 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index b47dd951ea..c12a996408 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -572,8 +572,19 @@ static const struct plugin_api rockbox_api = {
572 dsp_process, 572 dsp_process,
573 dsp_input_count, 573 dsp_input_count,
574 dsp_output_count, 574 dsp_output_count,
575#endif /* CONFIG_CODEC == SWCODEC */
576 575
576 mixer_channel_status,
577 mixer_channel_get_buffer,
578 mixer_channel_calculate_peaks,
579 mixer_channel_play_data,
580 mixer_channel_play_pause,
581 mixer_channel_stop,
582 mixer_channel_set_amplitude,
583 mixer_channel_get_bytes_waiting,
584
585 system_sound_play,
586 keyclick_click,
587#endif
577 /* playback control */ 588 /* playback control */
578 playlist_amount, 589 playlist_amount,
579 playlist_resume, 590 playlist_resume,
@@ -778,18 +789,6 @@ static const struct plugin_api rockbox_api = {
778 789
779 /* new stuff at the end, sort into place next time 790 /* new stuff at the end, sort into place next time
780 the API gets incompatible */ 791 the API gets incompatible */
781#if CONFIG_CODEC == SWCODEC
782 mixer_channel_status,
783 mixer_channel_get_buffer,
784 mixer_channel_calculate_peaks,
785 mixer_channel_play_data,
786 mixer_channel_play_pause,
787 mixer_channel_stop,
788 mixer_channel_set_amplitude,
789 mixer_channel_get_bytes_waiting,
790 system_sound_play,
791 keyclick_click,
792#endif
793}; 792};
794 793
795int plugin_load(const char* plugin, const void* parameter) 794int plugin_load(const char* plugin, const void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index e9c0c64a00..a53df90d67 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -146,12 +146,12 @@ void* plugin_get_buffer(size_t *buffer_size);
146#define PLUGIN_MAGIC 0x526F634B /* RocK */ 146#define PLUGIN_MAGIC 0x526F634B /* RocK */
147 147
148/* increase this every time the api struct changes */ 148/* increase this every time the api struct changes */
149#define PLUGIN_API_VERSION 208 149#define PLUGIN_API_VERSION 209
150 150
151/* update this to latest version if a change to the api struct breaks 151/* update this to latest version if a change to the api struct breaks
152 backwards compatibility (and please take the opportunity to sort in any 152 backwards compatibility (and please take the opportunity to sort in any
153 new function which are "waiting" at the end of the function table) */ 153 new function which are "waiting" at the end of the function table) */
154#define PLUGIN_MIN_API_VERSION 205 154#define PLUGIN_MIN_API_VERSION 209
155 155
156/* plugin return codes */ 156/* plugin return codes */
157/* internal returns start at 0x100 to make exit(1..255) work */ 157/* internal returns start at 0x100 to make exit(1..255) work */
@@ -661,6 +661,22 @@ struct plugin_api {
661 const char *src[], int count); 661 const char *src[], int count);
662 int (*dsp_input_count)(struct dsp_config *dsp, int count); 662 int (*dsp_input_count)(struct dsp_config *dsp, int count);
663 int (*dsp_output_count)(struct dsp_config *dsp, int count); 663 int (*dsp_output_count)(struct dsp_config *dsp, int count);
664
665 enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel);
666 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
667 void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel,
668 int *left, int *right);
669 void (*mixer_channel_play_data)(enum pcm_mixer_channel channel,
670 pcm_play_callback_type get_more,
671 unsigned char *start, size_t size);
672 void (*mixer_channel_play_pause)(enum pcm_mixer_channel channel, bool play);
673 void (*mixer_channel_stop)(enum pcm_mixer_channel channel);
674 void (*mixer_channel_set_amplitude)(enum pcm_mixer_channel channel,
675 unsigned int amplitude);
676 size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel);
677
678 void (*system_sound_play)(enum system_sound sound);
679 void (*keyclick_click)(int button);
664#endif /* CONFIG_CODEC == SWCODC */ 680#endif /* CONFIG_CODEC == SWCODC */
665 681
666 /* playback control */ 682 /* playback control */
@@ -908,22 +924,6 @@ struct plugin_api {
908 924
909 /* new stuff at the end, sort into place next time 925 /* new stuff at the end, sort into place next time
910 the API gets incompatible */ 926 the API gets incompatible */
911#if CONFIG_CODEC == SWCODEC
912 enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel);
913 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
914 void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel,
915 int *left, int *right);
916 void (*mixer_channel_play_data)(enum pcm_mixer_channel channel,
917 pcm_play_callback_type get_more,
918 unsigned char *start, size_t size);
919 void (*mixer_channel_play_pause)(enum pcm_mixer_channel channel, bool play);
920 void (*mixer_channel_stop)(enum pcm_mixer_channel channel);
921 void (*mixer_channel_set_amplitude)(enum pcm_mixer_channel channel,
922 unsigned int amplitude);
923 size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel);
924 void (*system_sound_play)(enum system_sound sound);
925 void (*keyclick_click)(int button);
926#endif
927}; 927};
928 928
929/* plugin header */ 929/* plugin header */