From fd052ec753cade16675e211ced0a2be19c0d545f Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Wed, 19 Mar 2008 13:55:53 +0000 Subject: Commit FS#8750. Add ARM assembler for the dsp-functions channels_process_sound_chan_mono(), channels_process_sound_chan_karaoke(), sample_output_mono() and sample_output_stereo(). By measurement the speed up is ~75% for the first three functions and ~40% for sample_output_stereo(). Additionally avoid calling yield() to often in dsp.c -- it is now limited to once per tick. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16717 a1c6a512-1295-4272-9138-f99709370657 --- apps/dsp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/dsp.c') diff --git a/apps/dsp.c b/apps/dsp.c index 3c2d7f6..5bbbe08 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -1112,6 +1112,7 @@ int dsp_callback(int msg, intptr_t param) int dsp_process(struct dsp_config *dsp, char *dst, const char *src[], int count) { int32_t *tmp[2]; + long last_yield = current_tick; int written = 0; int samples; @@ -1159,7 +1160,13 @@ int dsp_process(struct dsp_config *dsp, char *dst, const char *src[], int count) written += samples; dst += samples * sizeof (int16_t) * 2; - yield(); + + /* yield at least once each tick */ + if (current_tick > last_yield) + { + yield(); + last_yield = current_tick; + } } #if defined(CPU_COLDFIRE) -- cgit v1.1