diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2008-03-19 13:55:53 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2008-03-19 13:55:53 +0000 |
| commit | fd052ec753cade16675e211ced0a2be19c0d545f (patch) | |
| tree | 094375afe1644abe2a312bb7feee885dcbdb64c0 /apps/dsp.c | |
| parent | 178df1cfcfa529c58ad37922d6d934e1e0328fc5 (diff) | |
| download | rockbox-fd052ec753cade16675e211ced0a2be19c0d545f.zip rockbox-fd052ec753cade16675e211ced0a2be19c0d545f.tar.gz rockbox-fd052ec753cade16675e211ced0a2be19c0d545f.tar.bz2 rockbox-fd052ec753cade16675e211ced0a2be19c0d545f.tar.xz | |
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
Diffstat (limited to 'apps/dsp.c')
| -rw-r--r-- | apps/dsp.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) |