| 271 | } |
| 272 | |
| 273 | double rect() const |
| 274 | { |
| 275 | double t2 = t + 1 - pulseWidth; |
| 276 | t2 -= bitwise_or_zero(t2); |
| 277 | |
| 278 | double y = -2 * pulseWidth; |
| 279 | if (t < pulseWidth) |
| 280 | { |
| 281 | y += 2; |
| 282 | } |
| 283 | |
| 284 | y += blep(t, freqInSecondsPerSample) - blep(t2, freqInSecondsPerSample); |
| 285 | |
| 286 | return amplitude * y; |
| 287 | } |
| 288 | |
| 289 | double saw() const |
| 290 | { |
nothing calls this directly
no test coverage detected