From c84461fb8f9404b2b32d90a649b63b669e1a6bb8 Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Tue, 3 Oct 2006 21:09:47 +0000 Subject: More adsr related nonsense, argh! Fix adsr related problem on some notes being stopped instead of looped. Ramping code still not quite right, but dont want to lose this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11117 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi/sequencer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/plugins/midi/sequencer.c') diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c index ebd5b76405..fdfd5d7620 100644 --- a/apps/plugins/midi/sequencer.c +++ b/apps/plugins/midi/sequencer.c @@ -119,12 +119,13 @@ long pitchTbl[] ICONST_ATTR={ 73297,73330,73363,73396,73429,73462,73495,73528 }; + void findDelta(struct SynthObject * so, int ch, int note) { struct GWaveform * wf = patchSet[chPat[ch]]->waveforms[patchSet[chPat[ch]]->noteTable[note]]; so->wf=wf; - unsigned long delta= 0; /* More percision- extra bit - not so off-key as before */ + unsigned int delta= 0; delta = (((gustable[note]<rootFreq)) * wf->sampRate / (SAMPLE_RATE)); delta = (delta * pitchTbl[chPW[ch]])>> 16; @@ -248,10 +249,11 @@ void pressNote(int ch, int note, int vol) } } } - +inline void stopVoice(struct SynthObject * so); void releaseNote(int ch, int note) { + if(ch==9) return; -- cgit v1.2.3