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 b47dd95..c12a996 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -572,8 +572,19 @@ static const struct plugin_api rockbox_api = {
dsp_process,
dsp_input_count,
dsp_output_count,
-#endif /* CONFIG_CODEC == SWCODEC */
+ mixer_channel_status,
+ mixer_channel_get_buffer,
+ mixer_channel_calculate_peaks,
+ mixer_channel_play_data,
+ mixer_channel_play_pause,
+ mixer_channel_stop,
+ mixer_channel_set_amplitude,
+ mixer_channel_get_bytes_waiting,
+
+ system_sound_play,
+ keyclick_click,
+#endif
/* playback control */
playlist_amount,
playlist_resume,
@@ -778,18 +789,6 @@ static const struct plugin_api rockbox_api = {
/* new stuff at the end, sort into place next time
the API gets incompatible */
-#if CONFIG_CODEC == SWCODEC
- mixer_channel_status,
- mixer_channel_get_buffer,
- mixer_channel_calculate_peaks,
- mixer_channel_play_data,
- mixer_channel_play_pause,
- mixer_channel_stop,
- mixer_channel_set_amplitude,
- mixer_channel_get_bytes_waiting,
- system_sound_play,
- keyclick_click,
-#endif
};
int plugin_load(const char* plugin, const void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index e9c0c64..a53df90 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -146,12 +146,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 208
+#define PLUGIN_API_VERSION 209
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define PLUGIN_MIN_API_VERSION 205
+#define PLUGIN_MIN_API_VERSION 209
/* plugin return codes */
/* internal returns start at 0x100 to make exit(1..255) work */
@@ -661,6 +661,22 @@ struct plugin_api {
const char *src[], int count);
int (*dsp_input_count)(struct dsp_config *dsp, int count);
int (*dsp_output_count)(struct dsp_config *dsp, int count);
+
+ enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel);
+ void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
+ void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel,
+ int *left, int *right);
+ void (*mixer_channel_play_data)(enum pcm_mixer_channel channel,
+ pcm_play_callback_type get_more,
+ unsigned char *start, size_t size);
+ void (*mixer_channel_play_pause)(enum pcm_mixer_channel channel, bool play);
+ void (*mixer_channel_stop)(enum pcm_mixer_channel channel);
+ void (*mixer_channel_set_amplitude)(enum pcm_mixer_channel channel,
+ unsigned int amplitude);
+ size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel);
+
+ void (*system_sound_play)(enum system_sound sound);
+ void (*keyclick_click)(int button);
#endif /* CONFIG_CODEC == SWCODC */
/* playback control */
@@ -908,22 +924,6 @@ struct plugin_api {
/* new stuff at the end, sort into place next time
the API gets incompatible */
-#if CONFIG_CODEC == SWCODEC
- enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel);
- void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
- void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel,
- int *left, int *right);
- void (*mixer_channel_play_data)(enum pcm_mixer_channel channel,
- pcm_play_callback_type get_more,
- unsigned char *start, size_t size);
- void (*mixer_channel_play_pause)(enum pcm_mixer_channel channel, bool play);
- void (*mixer_channel_stop)(enum pcm_mixer_channel channel);
- void (*mixer_channel_set_amplitude)(enum pcm_mixer_channel channel,
- unsigned int amplitude);
- size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel);
- void (*system_sound_play)(enum system_sound sound);
- void (*keyclick_click)(int button);
-#endif
};
/* plugin header */