Lines Matching refs:cache
134 * @param cache tempo info and current tempo
136 public static long tick2microsecond(Sequence seq, long tick, TempoCache cache) {
142 if (cache == null) {
143 cache = new TempoCache(seq);
148 long[] ticks = cache.ticks;
149 int[] tempos = cache.tempos; // in MPQ
153 int snapshotIndex = cache.snapshotIndex;
154 int snapshotMicro = cache.snapshotMicro;
178 cache.snapshotIndex = snapshotIndex;
179 cache.snapshotMicro = snapshotMicro;
185 * returns tempo at the given time in cache.getCurrTempoMPQ
187 public static long microsecond2tick(Sequence seq, long micros, TempoCache cache) {
194 if (cache != null) {
195 cache.currTempo = (int) cache.getTempoMPQAt(tick);
200 if (cache == null) {
201 cache = new TempoCache(seq);
203 long[] ticks = cache.ticks;
204 int[] tempos = cache.tempos; // in MPQ
228 cache.currTempo = tempos[i - 1];