forked from len0rd/rockbox
Opening function brace style police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18574 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5c903724fb
commit
2041fed03a
1 changed files with 28 additions and 14 deletions
|
@ -203,8 +203,8 @@ static const unsigned char * const mad_synth_thread_name = "mp3dec";
|
||||||
static struct thread_entry *mad_synth_thread_p;
|
static struct thread_entry *mad_synth_thread_p;
|
||||||
|
|
||||||
|
|
||||||
static void mad_synth_thread(void){
|
static void mad_synth_thread(void)
|
||||||
|
{
|
||||||
while(1) {
|
while(1) {
|
||||||
ci->semaphore_release(&synth_done_sem);
|
ci->semaphore_release(&synth_done_sem);
|
||||||
ci->semaphore_wait(&synth_pending_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
|
/* wait for the synth thread to go idle which indicates a PCM frame has been
|
||||||
* synthesized */
|
* 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);
|
ci->semaphore_wait(&synth_done_sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* increment the done semaphore - used after a wait for idle to preserve the
|
/* increment the done semaphore - used after a wait for idle to preserve the
|
||||||
* semaphore count */
|
* 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);
|
ci->semaphore_release(&synth_done_sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* after synth thread has gone idle - switch decoded frames and commence
|
/* after synth thread has gone idle - switch decoded frames and commence
|
||||||
* synthesis on it */
|
* synthesis on it */
|
||||||
static void mad_synth_thread_ready(void){
|
static void mad_synth_thread_ready(void)
|
||||||
|
{
|
||||||
mad_fixed_t (*temp)[2][36][32];
|
mad_fixed_t (*temp)[2][36][32];
|
||||||
|
|
||||||
/*circular buffer that holds 2 frames' samples*/
|
/*circular buffer that holds 2 frames' samples*/
|
||||||
|
@ -241,7 +244,8 @@ static void mad_synth_thread_ready(void){
|
||||||
ci->semaphore_release(&synth_pending_sem);
|
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_done_sem, 1, 0);
|
||||||
ci->semaphore_init(&synth_pending_sem, 1, 0);
|
ci->semaphore_init(&synth_pending_sem, 1, 0);
|
||||||
|
|
||||||
|
@ -258,7 +262,8 @@ static bool mad_synth_thread_create(void){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mad_synth_thread_quit(void){
|
static void mad_synth_thread_quit(void)
|
||||||
|
{
|
||||||
/*mop up COP thread*/
|
/*mop up COP thread*/
|
||||||
die=1;
|
die=1;
|
||||||
ci->semaphore_release(&synth_pending_sem);
|
ci->semaphore_release(&synth_pending_sem);
|
||||||
|
@ -266,19 +271,28 @@ static void mad_synth_thread_quit(void){
|
||||||
invalidate_icache();
|
invalidate_icache();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void mad_synth_thread_ready(void){
|
static inline void mad_synth_thread_ready(void)
|
||||||
|
{
|
||||||
mad_synth_frame(&synth, &frame);
|
mad_synth_frame(&synth, &frame);
|
||||||
}
|
}
|
||||||
static inline bool mad_synth_thread_create(void){
|
|
||||||
|
static inline bool mad_synth_thread_create(void)
|
||||||
|
{
|
||||||
return true;
|
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 */
|
/* this is the codec entry point */
|
||||||
enum codec_status codec_main(void)
|
enum codec_status codec_main(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue