From a67fe28b585e481925cb7b5af6cb7829f300a01b Mon Sep 17 00:00:00 2001 From: jethead71 Date: Thu, 21 Jul 2011 22:25:09 +0000 Subject: [PATCH] is_codec_thread() is not needed anymore since PCM buffer calls other than volume level are no longer made by the voice thread. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30189 a1c6a512-1295-4272-9138-f99709370657 --- apps/codec_thread.c | 6 ------ apps/codec_thread.h | 1 - apps/pcmbuf.c | 15 ++++----------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/apps/codec_thread.c b/apps/codec_thread.c index a7bff746d..945f0b060 100644 --- a/apps/codec_thread.c +++ b/apps/codec_thread.c @@ -636,12 +636,6 @@ void codec_thread_resume(void) thread_thaw(codec_thread_id); } -/* Is the current thread the codec thread? */ -bool is_codec_thread(void) -{ - return thread_self() == codec_thread_id; -} - #ifdef HAVE_PRIORITY_SCHEDULING /* Obtain codec thread's current priority */ int codec_thread_get_priority(void) diff --git a/apps/codec_thread.h b/apps/codec_thread.h index acd7e556e..14551dcf4 100644 --- a/apps/codec_thread.h +++ b/apps/codec_thread.h @@ -36,7 +36,6 @@ void codec_thread_do_callback(void (*fn)(void), void codec_init_codec_api(void); void make_codec_thread(void); void codec_thread_resume(void); -bool is_codec_thread(void); #ifdef HAVE_PRIORITY_SCHEDULING int codec_thread_get_priority(void); int codec_thread_set_priority(int priority); diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 946eb1602..2e8bc3f47 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -332,17 +332,10 @@ static bool prepare_insert(size_t length) /* Maintain the buffer level above the watermark */ if (playing) { - /* Only codec thread initiates boost - voice boosts the cpu when playing - a clip */ -#ifndef SIMULATOR - if (is_codec_thread()) -#endif /* SIMULATOR */ - { - /* boost cpu if necessary */ - if (pcmbuf_unplayed_bytes < pcmbuf_watermark) - trigger_cpu_boost(); - boost_codec_thread(pcmbuf_unplayed_bytes*10/pcmbuf_size); - } + /* boost cpu if necessary */ + if (pcmbuf_unplayed_bytes < pcmbuf_watermark) + trigger_cpu_boost(); + boost_codec_thread(pcmbuf_unplayed_bytes*10/pcmbuf_size); #ifdef HAVE_CROSSFADE /* Disable crossfade if < .5s of audio */ -- 2.11.4.GIT