| 69 | } |
| 70 | |
| 71 | void AudioChannel::sumFrom(const AudioChannel * sourceChannel) |
| 72 | { |
| 73 | bool isSafe = sourceChannel && sourceChannel->length() >= length(); |
| 74 | ASSERT(isSafe); |
| 75 | |
| 76 | if (!isSafe) return; |
| 77 | |
| 78 | if (sourceChannel->isSilent()) return; |
| 79 | if (isSilent()) |
| 80 | { |
| 81 | copyFrom(sourceChannel); |
| 82 | } |
| 83 | else |
| 84 | { |
| 85 | VectorMath::vadd(data(), 1, sourceChannel->data(), 1, mutableData(), 1, length()); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | float AudioChannel::maxAbsValue() const |
| 90 | { |