summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-09-23 09:23:32 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-09-23 09:23:32 +0000
commit2041fed03aad460e73dcab5510ee83d1ba3775cd (patch)
tree1b7ab97af55e8419042969af3e79b2f3b3446175 /apps
parent5c903724fbc930d57d4e07a719d4abfd65dec593 (diff)
downloadrockbox-2041fed03aad460e73dcab5510ee83d1ba3775cd.zip
rockbox-2041fed03aad460e73dcab5510ee83d1ba3775cd.tar.gz
rockbox-2041fed03aad460e73dcab5510ee83d1ba3775cd.tar.bz2
rockbox-2041fed03aad460e73dcab5510ee83d1ba3775cd.tar.xz
Opening function brace style police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18574 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/mpa.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c
index f998412..7732622 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";
static struct thread_entry *mad_synth_thread_p;
-static void mad_synth_thread(void){
-
- while(1){
+static void mad_synth_thread(void)
+{
+ while(1) {
ci->semaphore_release(&synth_done_sem);
ci->semaphore_wait(&synth_pending_sem);
@@ -218,19 +218,22 @@ static void mad_synth_thread(void){
/* wait for the synth thread to go idle which indicates a PCM frame has been
* synthesized */
-static inline void mad_synth_thread_wait_pcm(void){
+static inline void mad_synth_thread_wait_pcm(void)
+{
ci->semaphore_wait(&synth_done_sem);
}
/* increment the done semaphore - used after a wait for idle to preserve the
* semaphore count */
-static inline void mad_synth_thread_unwait_pcm(void){
+static inline void mad_synth_thread_unwait_pcm(void)
+{
ci->semaphore_release(&synth_done_sem);
}
/* after synth thread has gone idle - switch decoded frames and commence
* synthesis on it */
-static void mad_synth_thread_ready(void){
+static void mad_synth_thread_ready(void)
+{
mad_fixed_t (*temp)[2][36][32];
/*circular buffer that holds 2 frames' samples*/
@@ -241,7 +244,8 @@ static void mad_synth_thread_ready(void){
ci->semaphore_release(&synth_pending_sem);
}
-static bool mad_synth_thread_create(void){
+static bool mad_synth_thread_create(void)
+{
ci->semaphore_init(&synth_done_sem, 1, 0);
ci->semaphore_init(&synth_pending_sem, 1, 0);
@@ -258,7 +262,8 @@ static bool mad_synth_thread_create(void){
return true;
}
-static void mad_synth_thread_quit(void){
+static void mad_synth_thread_quit(void)
+{
/*mop up COP thread*/
die=1;
ci->semaphore_release(&synth_pending_sem);
@@ -266,19 +271,28 @@ static void mad_synth_thread_quit(void){
invalidate_icache();
}
#else
-static inline void mad_synth_thread_ready(void){
+static inline void mad_synth_thread_ready(void)
+{
mad_synth_frame(&synth, &frame);
}
-static inline bool mad_synth_thread_create(void){
+
+static inline bool mad_synth_thread_create(void)
+{
return true;
}
-static inline void mad_synth_thread_quit(void){
+
+static inline void mad_synth_thread_quit(void)
+{
}
-static inline void mad_synth_thread_wait_pcm(void){
+
+static inline void mad_synth_thread_wait_pcm(void)
+{
}
-static inline void mad_synth_thread_unwait_pcm(void){
+
+static inline void mad_synth_thread_unwait_pcm(void)
+{
}
-#endif
+#endif /* MPA_SYNTH_ON_COP */
/* this is the codec entry point */
enum codec_status codec_main(void)