| 64 | } |
| 65 | |
| 66 | FxPtr FxEngine::removeFx(int index) { |
| 67 | if (!mEffects.has(index)) { |
| 68 | return FxPtr(); |
| 69 | } |
| 70 | |
| 71 | FxPtr removedFx; |
| 72 | bool ok = mEffects.get(index, &removedFx); |
| 73 | if (!ok) { |
| 74 | return FxPtr(); |
| 75 | } |
| 76 | |
| 77 | if (mCurrId == index) { |
| 78 | // If we're removing the current effect, switch to the next one |
| 79 | mEffects.next(mCurrId, &mCurrId, true); |
| 80 | mDurationSet = true; |
| 81 | mDuration = 0; // Instant transition |
| 82 | } |
| 83 | |
| 84 | return removedFx; |
| 85 | } |
| 86 | |
| 87 | FxPtr FxEngine::getFx(int id) { |
| 88 | if (mEffects.has(id)) { |