| 46 | } |
| 47 | |
| 48 | void Lissajous::Process(double time) |
| 49 | { |
| 50 | PROFILER(Lissajous); |
| 51 | |
| 52 | SyncBuffers(); |
| 53 | |
| 54 | int bufferSize = GetBuffer()->BufferSize(); |
| 55 | IAudioReceiver* target = GetTarget(); |
| 56 | if (target) |
| 57 | { |
| 58 | for (int ch = 0; ch < GetBuffer()->NumActiveChannels(); ++ch) |
| 59 | { |
| 60 | Add(target->GetBuffer()->GetChannel(ch), GetBuffer()->GetChannel(ch), bufferSize); |
| 61 | GetVizBuffer()->WriteChunk(GetBuffer()->GetChannel(ch), GetBuffer()->BufferSize(), ch); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | if (mEnabled) |
| 66 | { |
| 67 | mOnlyHasOneChannel = (GetBuffer()->NumActiveChannels() == 1); |
| 68 | int secondChannel = mOnlyHasOneChannel ? 0 : 1; |
| 69 | |
| 70 | for (int i = 0; i < bufferSize; ++i) |
| 71 | mLissajousPoints[(mOffset + i) % NUM_LISSAJOUS_POINTS].set(GetBuffer()->GetChannel(0)[i], GetBuffer()->GetChannel(secondChannel)[i]); |
| 72 | |
| 73 | mOffset += bufferSize; |
| 74 | mOffset %= NUM_LISSAJOUS_POINTS; |
| 75 | } |
| 76 | |
| 77 | GetBuffer()->Reset(); |
| 78 | } |
| 79 | |
| 80 | void Lissajous::DrawModule() |
| 81 | { |
nothing calls this directly
no test coverage detected