It's rather difficult to compare my AEG code to what AO uses (many fundamental differences in timing and channel flag handling) but here's what I'm doing:

if (kanal.AEG.poziom < 0)
  // przejscie do Decay 1 / Decay 2
  kanal.AEG.poziom = 0;
  if (kanal.AEG.poziom >= D2AEGP)
    FazaAEG (kanal, AEG_DECAY2);
    FazaAEG (kanal, AEG_DECAY1);

This is for the case when the current phase is ATTACK. As you see, I'm switching directly to Decay 2 if DL (I call it D2AEGP) permits it.
AFAIR this is what I observed on hardware. The switch to Release however will need at least one more sample, there is no direct route even if both Decay values are set to immediate.

As for slot assigments - sometime ago I belive I mentioned that AO seems to start playing with channel numbers in 0x2F range (rather then zero, like my player). Haven't really tested it since and it was alpha stage back then...
I still say you handle the key-on/off thing wrong (as in: hardware does it different way) and that could be the problem with the driver. This shouldn't have such effect though, I'd be rather expecting "ghost" (repeats) or incompletly defined sounds to appear - since you allow the channel to be keyed on in situations where it should not be possible.
But then again this doesn't seem to be happening so far, I guess nobody is trying to pull such dirty tricks on AICA smile

EDIT: Seems like the board doesn't like non-latin letters much. Fixed. And some nasty typos too.

Last edited by Deunan Knute; 04/23/08 09:30 AM.