diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-07-08 22:31:15 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-07-08 22:31:15 +0000 |
commit | 5663e1cd0afc62e212c43c8fb374c791d554fb1b (patch) | |
tree | 488e7cc83aaf2ee61184fad46a3b4891a95b0f13 /apps/misc.h | |
parent | f1a5a25dac4c61bf178ee5361998d205bb71b2d1 (diff) | |
download | rockbox-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/misc.h')
-rw-r--r-- | apps/misc.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/apps/misc.h b/apps/misc.h index c3c52d13e0..7ea5360db5 100644 --- a/apps/misc.h +++ b/apps/misc.h | |||
@@ -100,9 +100,6 @@ int clamp_value_wrap(int value, int max, int min); | |||
100 | #endif | 100 | #endif |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | void beep_play(unsigned int frequency, unsigned int duration, | ||
104 | unsigned int amplitude); | ||
105 | |||
106 | enum current_activity { | 103 | enum current_activity { |
107 | ACTIVITY_UNKNOWN = 0, | 104 | ACTIVITY_UNKNOWN = 0, |
108 | ACTIVITY_MAINMENU, | 105 | ACTIVITY_MAINMENU, |
@@ -118,6 +115,25 @@ enum current_activity { | |||
118 | ACTIVITY_PITCHSCREEN, | 115 | ACTIVITY_PITCHSCREEN, |
119 | ACTIVITY_OPTIONSELECT | 116 | ACTIVITY_OPTIONSELECT |
120 | }; | 117 | }; |
118 | |||
119 | #if CONFIG_CODEC == SWCODEC | ||
120 | void beep_play(unsigned int frequency, unsigned int duration, | ||
121 | unsigned int amplitude); | ||
122 | |||
123 | enum system_sound | ||
124 | { | ||
125 | SOUND_KEYCLICK = 0, | ||
126 | SOUND_TRACK_SKIP, | ||
127 | SOUND_TRACK_NO_MORE, | ||
128 | }; | ||
129 | |||
130 | /* Play a standard sound */ | ||
131 | void system_sound_play(enum system_sound sound); | ||
132 | |||
133 | /* Produce keyclick based upon button and global settings */ | ||
134 | void keyclick_click(int button); | ||
135 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
136 | |||
121 | void push_current_activity(enum current_activity screen); | 137 | void push_current_activity(enum current_activity screen); |
122 | void pop_current_activity(void); | 138 | void pop_current_activity(void); |
123 | enum current_activity get_current_activity(void); | 139 | enum current_activity get_current_activity(void); |