| 184 | } |
| 185 | |
| 186 | void CtrlrMidiInputComparatorSingle::updateCache (const CtrlrMidiMessageType t, CtrlrMidiMapIterator &it) |
| 187 | { |
| 188 | CtrlrCacheDataSingle c((*it).first, (*it).second); |
| 189 | Array<CtrlrCacheDataSingle> &cache = getCache(t); |
| 190 | |
| 191 | if (cache.contains (c)) |
| 192 | { |
| 193 | if (cache.indexOf (c) == 0) |
| 194 | return; |
| 195 | else |
| 196 | { |
| 197 | cache.swap (cache.indexOf(c), 0); |
| 198 | } |
| 199 | } |
| 200 | else |
| 201 | { |
| 202 | cache.insert (0, c); |
| 203 | cache.resize (cacheSize); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | void CtrlrMidiInputComparatorSingle::updateCacheSysEx (CtrlrMultiMidiMapIterator &it) |
| 208 | { |