|
|
|
|
|
|
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
} else if (ph < 0xFFFFFFFF - pulse_width/2) { |
|
|
} else if (ph < 0xFFFFFFFF - pulse_width/2) { |
|
|
uint32_t n = 0x7FFFFFFF - (((ph - pulse_width/2) >> 16) * fall); |
|
|
uint32_t n = 0x7FFFFFFF - (((ph - pulse_width/2) >> 16) * fall); |
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
|
|
|
|
|
|
*bp++ = (((int32_t)n >> 16) * magnitude) >> 16; |
|
|
} else { |
|
|
} else { |
|
|
uint32_t n = ((ph + pulse_width/2) >> 16) * rise + 0x80000000; |
|
|
uint32_t n = ((ph + pulse_width/2) >> 16) * rise + 0x80000000; |
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
|
|
|
|
|
|
*bp++ = (((int32_t)n >> 16) * magnitude) >> 16; |
|
|
} |
|
|
} |
|
|
ph += inc; |
|
|
ph += inc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
} else if (ph < 0xFFFFFFFF - halfwidth) { |
|
|
} else if (ph < 0xFFFFFFFF - halfwidth) { |
|
|
n = 0x7FFFFFFF - (((ph - halfwidth) >> 16) * fall); |
|
|
n = 0x7FFFFFFF - (((ph - halfwidth) >> 16) * fall); |
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
|
|
|
|
|
|
*bp++ = (((int32_t)n >> 16) * magnitude) >> 16; |
|
|
} else { |
|
|
} else { |
|
|
n = ((ph + halfwidth) >> 16) * rise + 0x80000000; |
|
|
n = ((ph + halfwidth) >> 16) * rise + 0x80000000; |
|
|
*bp++ = ((n >> 16) * magnitude) >> 16; |
|
|
|
|
|
|
|
|
*bp++ = (((int32_t)n >> 16) * magnitude) >> 16; |
|
|
} |
|
|
} |
|
|
ph += inc; |
|
|
ph += inc; |
|
|
} |
|
|
} |