1
0
Fork 0
forked from len0rd/rockbox

Make synthVoice return int instead of short, gives a nice speed up also add a comment

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14988 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2007-10-05 11:15:04 +00:00
parent bd4aea3769
commit 8219f2801a
2 changed files with 5 additions and 3 deletions

View file

@ -255,8 +255,8 @@ inline void stopVoice(struct SynthObject * so)
so->decay = 0; so->decay = 0;
} }
signed short int synthVoice(struct SynthObject * so) ICODE_ATTR; int synthVoice(struct SynthObject * so) ICODE_ATTR;
signed short int synthVoice(struct SynthObject * so) int synthVoice(struct SynthObject * so)
{ {
struct GWaveform * wf; struct GWaveform * wf;
register int s; register int s;

View file

@ -17,7 +17,7 @@
* *
****************************************************************************/ ****************************************************************************/
int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig); int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig);
signed short int synthVoice(struct SynthObject * so); int synthVoice(struct SynthObject * so);
void setPoint(struct SynthObject * so, int pt); void setPoint(struct SynthObject * so, int pt);
static inline void synthSample(int * mixL, int * mixR) static inline void synthSample(int * mixL, int * mixR)
@ -48,6 +48,8 @@ static inline void synthSample(int * mixL, int * mixR)
voicept++; voicept++;
} }
/* if max voices is an even number gcc is smart enough to not
include this loop */
for(i=MAX_VOICES%2; i > 0; i--) for(i=MAX_VOICES%2; i > 0; i--)
{ {
if(voicept->isUsed==1) if(voicept->isUsed==1)