diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-09-23 09:23:32 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-09-23 09:23:32 +0000 |
commit | 2041fed03aad460e73dcab5510ee83d1ba3775cd (patch) | |
tree | 1b7ab97af55e8419042969af3e79b2f3b3446175 /apps/codecs | |
parent | 5c903724fbc930d57d4e07a719d4abfd65dec593 (diff) | |
download | rockbox-2041fed03aad460e73dcab5510ee83d1ba3775cd.tar.gz rockbox-2041fed03aad460e73dcab5510ee83d1ba3775cd.zip |
Opening function brace style police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18574 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/mpa.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index f998412de1..7732622383 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c | |||
@@ -203,9 +203,9 @@ static const unsigned char * const mad_synth_thread_name = "mp3dec"; | |||
203 | static struct thread_entry *mad_synth_thread_p; | 203 | static struct thread_entry *mad_synth_thread_p; |
204 | 204 | ||
205 | 205 | ||
206 | static void mad_synth_thread(void){ | 206 | static void mad_synth_thread(void) |
207 | 207 | { | |
208 | while(1){ | 208 | while(1) { |
209 | ci->semaphore_release(&synth_done_sem); | 209 | ci->semaphore_release(&synth_done_sem); |
210 | ci->semaphore_wait(&synth_pending_sem); | 210 | ci->semaphore_wait(&synth_pending_sem); |
211 | 211 | ||
@@ -218,19 +218,22 @@ static void mad_synth_thread(void){ | |||
218 | 218 | ||
219 | /* wait for the synth thread to go idle which indicates a PCM frame has been | 219 | /* wait for the synth thread to go idle which indicates a PCM frame has been |
220 | * synthesized */ | 220 | * synthesized */ |
221 | static inline void mad_synth_thread_wait_pcm(void){ | 221 | static inline void mad_synth_thread_wait_pcm(void) |
222 | { | ||
222 | ci->semaphore_wait(&synth_done_sem); | 223 | ci->semaphore_wait(&synth_done_sem); |
223 | } | 224 | } |
224 | 225 | ||
225 | /* increment the done semaphore - used after a wait for idle to preserve the | 226 | /* increment the done semaphore - used after a wait for idle to preserve the |
226 | * semaphore count */ | 227 | * semaphore count */ |
227 | static inline void mad_synth_thread_unwait_pcm(void){ | 228 | static inline void mad_synth_thread_unwait_pcm(void) |
229 | { | ||
228 | ci->semaphore_release(&synth_done_sem); | 230 | ci->semaphore_release(&synth_done_sem); |
229 | } | 231 | } |
230 | 232 | ||
231 | /* after synth thread has gone idle - switch decoded frames and commence | 233 | /* after synth thread has gone idle - switch decoded frames and commence |
232 | * synthesis on it */ | 234 | * synthesis on it */ |
233 | static void mad_synth_thread_ready(void){ | 235 | static void mad_synth_thread_ready(void) |
236 | { | ||
234 | mad_fixed_t (*temp)[2][36][32]; | 237 | mad_fixed_t (*temp)[2][36][32]; |
235 | 238 | ||
236 | /*circular buffer that holds 2 frames' samples*/ | 239 | /*circular buffer that holds 2 frames' samples*/ |
@@ -241,7 +244,8 @@ static void mad_synth_thread_ready(void){ | |||
241 | ci->semaphore_release(&synth_pending_sem); | 244 | ci->semaphore_release(&synth_pending_sem); |
242 | } | 245 | } |
243 | 246 | ||
244 | static bool mad_synth_thread_create(void){ | 247 | static bool mad_synth_thread_create(void) |
248 | { | ||
245 | ci->semaphore_init(&synth_done_sem, 1, 0); | 249 | ci->semaphore_init(&synth_done_sem, 1, 0); |
246 | ci->semaphore_init(&synth_pending_sem, 1, 0); | 250 | ci->semaphore_init(&synth_pending_sem, 1, 0); |
247 | 251 | ||
@@ -258,7 +262,8 @@ static bool mad_synth_thread_create(void){ | |||
258 | return true; | 262 | return true; |
259 | } | 263 | } |
260 | 264 | ||
261 | static void mad_synth_thread_quit(void){ | 265 | static void mad_synth_thread_quit(void) |
266 | { | ||
262 | /*mop up COP thread*/ | 267 | /*mop up COP thread*/ |
263 | die=1; | 268 | die=1; |
264 | ci->semaphore_release(&synth_pending_sem); | 269 | ci->semaphore_release(&synth_pending_sem); |
@@ -266,19 +271,28 @@ static void mad_synth_thread_quit(void){ | |||
266 | invalidate_icache(); | 271 | invalidate_icache(); |
267 | } | 272 | } |
268 | #else | 273 | #else |
269 | static inline void mad_synth_thread_ready(void){ | 274 | static inline void mad_synth_thread_ready(void) |
275 | { | ||
270 | mad_synth_frame(&synth, &frame); | 276 | mad_synth_frame(&synth, &frame); |
271 | } | 277 | } |
272 | static inline bool mad_synth_thread_create(void){ | 278 | |
279 | static inline bool mad_synth_thread_create(void) | ||
280 | { | ||
273 | return true; | 281 | return true; |
274 | } | 282 | } |
275 | static inline void mad_synth_thread_quit(void){ | 283 | |
284 | static inline void mad_synth_thread_quit(void) | ||
285 | { | ||
276 | } | 286 | } |
277 | static inline void mad_synth_thread_wait_pcm(void){ | 287 | |
288 | static inline void mad_synth_thread_wait_pcm(void) | ||
289 | { | ||
278 | } | 290 | } |
279 | static inline void mad_synth_thread_unwait_pcm(void){ | 291 | |
292 | static inline void mad_synth_thread_unwait_pcm(void) | ||
293 | { | ||
280 | } | 294 | } |
281 | #endif | 295 | #endif /* MPA_SYNTH_ON_COP */ |
282 | 296 | ||
283 | /* this is the codec entry point */ | 297 | /* this is the codec entry point */ |
284 | enum codec_status codec_main(void) | 298 | enum codec_status codec_main(void) |