Hi

If this

    // calculate the next sample: phase ranges from 0 -> 1, but sin()
    // expects its input in radians. Just multiply by 2 PI to convert it!
    // We also multiply by volume so its not extremely loud.
    output[pos] = sin( self->phase * 2 * PI ) * volume;

Sends a sine wave to output (this is the standard sin math function, right?) then what would send a square wave? What would send noise?

Thanks -Phil
-- 
Philippe "xaccrocheur" Coatmeur
http://bitbucket.org/xaccrocheur / https://github.com/xaccrocheur
http://opensimo.org/play/