and it's details:
Would be interesting to see more...
Не читал, но осуждаю! Opinions on this personal blog don't necessarily reflect those of my employer.
synchronized void updateAudio(int tstates, int value) { tstates = tstates - audiotstates; audiotstates += tstates; float time = tstates; synchronized (beeper) { if (time + timeRem > spf) { level += ((spf - timeRem) / spf) * value; time -= spf - timeRem; lastLevel = (lastLevel + level) >>> 1; beeper[bufp++] = lastLevel; } else { timeRem += time; level += (time / spf) * value; return; } while (time > spf) { lastLevel = (lastLevel + value) >>> 1; beeper[bufp++] = lastLevel; time -= spf; } } // calculamos el nivel de sonido de la parte residual de la muestra // para el prуximo cambio de estado level = (int) (value * (time / spf)); timeRem = time; }