summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-07-08 22:31:15 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-07-08 22:31:15 +0000
commit5663e1cd0afc62e212c43c8fb374c791d554fb1b (patch)
tree488e7cc83aaf2ee61184fad46a3b4891a95b0f13 /apps/plugin.h
parentf1a5a25dac4c61bf178ee5361998d205bb71b2d1 (diff)
downloadrockbox-5663e1cd0afc62e212c43c8fb374c791d554fb1b.tar.gz
rockbox-5663e1cd0afc62e212c43c8fb374c791d554fb1b.zip
Have mpegplayer use the mixer (the playback channel, since it's mutually exclusive to audio playback) so the clicks and skip beep can be used according to user settings. Introduce some system sound functions to make easier playing event sounds from various places and convert files calling 'beep_play' to use 'system_sound_play' and 'keyclick_click'. Event sound could be become themeable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30130 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 77c8e831d4..e9c0c64a00 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -146,7 +146,7 @@ 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 207 149#define PLUGIN_API_VERSION 208
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
@@ -913,6 +913,16 @@ struct plugin_api {
913 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count); 913 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
914 void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel, 914 void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel,
915 int *left, int *right); 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);
916#endif 926#endif
917}; 927};
918 928