summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-12-14 23:15:45 +0100
committerThomas Martitz <kugel@rockbox.org>2013-12-14 23:15:45 +0100
commit1fc19042f72e9171b79c5a847cbce0c8939888c5 (patch)
tree4a5edc88e4533a7cfa66a5fd539433bea2689d2d
parent50eb528bc1f9d2f7b7260eff8b85a5ed5b96e679 (diff)
downloadrockbox-1fc1904.tar.gz
rockbox-1fc1904.tar.bz2
rockbox-1fc1904.zip
Bump plugin api and sort.
Change-Id: I8b8ab58abbd40726326b8b47bd6bbb07580b5ce4
-rw-r--r--apps/plugin.c7
-rw-r--r--apps/plugin.h12
2 files changed, 6 insertions, 13 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 62f9dd7558..18c49f4c27 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -588,6 +588,8 @@ static const struct plugin_api rockbox_api = {
mixer_channel_set_amplitude,
mixer_channel_get_bytes_waiting,
mixer_channel_set_buffer_hook,
+ mixer_set_frequency,
+ mixer_get_frequency,
system_sound_play,
keyclick_click,
@@ -797,11 +799,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_set_frequency,
- mixer_get_frequency,
-#endif
};
int plugin_load(const char* plugin, const void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index 15f7e96946..af673b3afe 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -156,12 +156,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 224
+#define PLUGIN_API_VERSION 225
/* 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 223
+#define PLUGIN_MIN_API_VERSION 225
/* plugin return codes */
/* internal returns start at 0x100 to make exit(1..255) work */
@@ -716,7 +716,8 @@ struct plugin_api {
size_t (*mixer_channel_get_bytes_waiting)(enum pcm_mixer_channel channel);
void (*mixer_channel_set_buffer_hook)(enum pcm_mixer_channel channel,
chan_buffer_hook_fn_type fn);
-
+ void (*mixer_set_frequency)(unsigned int samplerate);
+ unsigned int (*mixer_get_frequency)(void);
void (*system_sound_play)(enum system_sound sound);
void (*keyclick_click)(bool rawbutton, int action);
#endif /* CONFIG_CODEC == SWCODC */
@@ -970,11 +971,6 @@ struct plugin_api {
/* new stuff at the end, sort into place next time
the API gets incompatible */
-
-#if CONFIG_CODEC == SWCODEC
- void (*mixer_set_frequency)(unsigned int samplerate);
- unsigned int (*mixer_get_frequency)(void);
-#endif
};
/* plugin header */