diff options
author | Stepan Moskovchenko <stevenm@rockbox.org> | 2006-05-03 19:32:22 +0000 |
---|---|---|
committer | Stepan Moskovchenko <stevenm@rockbox.org> | 2006-05-03 19:32:22 +0000 |
commit | 28b5afd05a075cce1f46e5cc85c7e2caae3fc6ee (patch) | |
tree | d7285c0d7afb20145a0a9918b17827ed59a1cc9b /apps/plugins/midiplay.c | |
parent | 7f1d21480127c9246d2aa7a329f74fd8754b1e42 (diff) | |
download | rockbox-28b5afd05a075cce1f46e5cc85c7e2caae3fc6ee.tar.gz rockbox-28b5afd05a075cce1f46e5cc85c7e2caae3fc6ee.zip |
Optimize synth code by pre-computing the volume scaling for each note.
Scaling is now calculated once per MIDI event at the most, instead of
once per sample. Increase voice ramping speed, increase number of
active voices a little.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9870 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midiplay.c')
-rw-r--r-- | apps/plugins/midiplay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/midiplay.c b/apps/plugins/midiplay.c index 8c15af3f2b..d420508473 100644 --- a/apps/plugins/midiplay.c +++ b/apps/plugins/midiplay.c | |||
@@ -22,7 +22,7 @@ PLUGIN_HEADER | |||
22 | 22 | ||
23 | #define FRACTSIZE 10 | 23 | #define FRACTSIZE 10 |
24 | #define SAMPLE_RATE 22050 // 44100 22050 11025 | 24 | #define SAMPLE_RATE 22050 // 44100 22050 11025 |
25 | #define MAX_VOICES 12 // Note: 24 midi channels is the minimum general midi | 25 | #define MAX_VOICES 13 // Note: 24 midi channels is the minimum general midi |
26 | // spec implementation | 26 | // spec implementation |
27 | #define BUF_SIZE 512 | 27 | #define BUF_SIZE 512 |
28 | #define NBUF 2 | 28 | #define NBUF 2 |