summaryrefslogtreecommitdiff
path: root/apps/pcmbuf.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-08-28 19:55:30 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-08-28 19:55:30 +0000
commit65d43a2d223f39f5f4f6d7394052aecd6263a9e0 (patch)
treee046b4249cccda737f4665697d2f05e6c113cbd8 /apps/pcmbuf.c
parentd7170b7542f9a593377f2f36e3d1f933681af718 (diff)
downloadrockbox-65d43a2d223f39f5f4f6d7394052aecd6263a9e0.tar.gz
rockbox-65d43a2d223f39f5f4f6d7394052aecd6263a9e0.zip
Define empty macros for cpu boosting on targets with no such a feature.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7412 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r--apps/pcmbuf.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index bf5269a32e..1bcfb25f5e 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -61,9 +61,6 @@ static int crossfade_pos;
61static int crossfade_amount; 61static int crossfade_amount;
62static int crossfade_rem; 62static int crossfade_rem;
63 63
64
65static bool boost_mode;
66
67/* Crossfade modes. If CFM_CROSSFADE is selected, normal 64/* Crossfade modes. If CFM_CROSSFADE is selected, normal
68 * crossfader will activate. Selecting CFM_FLUSH is a special 65 * crossfader will activate. Selecting CFM_FLUSH is a special
69 * operation that only overwrites the pcm buffer without crossfading. 66 * operation that only overwrites the pcm buffer without crossfading.
@@ -93,6 +90,9 @@ void (*pcmbuf_watermark_event)(int bytes_left);
93static int last_chunksize; 90static int last_chunksize;
94static long mixpos = 0; 91static long mixpos = 0;
95 92
93#ifdef HAVE_ADJUSTABLE_CPU_FREQ
94static bool boost_mode;
95
96void pcmbuf_boost(bool state) 96void pcmbuf_boost(bool state)
97{ 97{
98 static bool boost_state = false; 98 static bool boost_state = false;
@@ -101,13 +101,19 @@ void pcmbuf_boost(bool state)
101 return ; 101 return ;
102 102
103 if (state != boost_state) { 103 if (state != boost_state) {
104#ifdef HAVE_ADJUSTABLE_CPU_FREQ
105 cpu_boost(state); 104 cpu_boost(state);
106#endif
107 boost_state = state; 105 boost_state = state;
108 } 106 }
109} 107}
110 108
109void pcmbuf_set_boost_mode(bool state)
110{
111 if (state)
112 pcmbuf_boost(true);
113 boost_mode = state;
114}
115#endif
116
111int pcmbuf_num_used_buffers(void) 117int pcmbuf_num_used_buffers(void)
112{ 118{
113 return (pcmbuf_write_index - pcmbuf_read_index) & NUM_PCM_BUFFERS_MASK; 119 return (pcmbuf_write_index - pcmbuf_read_index) & NUM_PCM_BUFFERS_MASK;
@@ -191,13 +197,6 @@ void pcmbuf_watermark_callback(int bytes_left)
191 crossfade_active = false; 197 crossfade_active = false;
192} 198}
193 199
194void pcmbuf_set_boost_mode(bool state)
195{
196 if (state)
197 pcmbuf_boost(true);
198 boost_mode = state;
199}
200
201void pcmbuf_add_event(void (*event_handler)(void)) 200void pcmbuf_add_event(void (*event_handler)(void))
202{ 201{
203 pcmbuf_event_handler = event_handler; 202 pcmbuf_event_handler = event_handler;