| 96 | } |
| 97 | |
| 98 | static inline sample_t triangleSample( const float _sample ) |
| 99 | { |
| 100 | const float ph = fraction( _sample ); |
| 101 | if( ph <= 0.25f ) |
| 102 | { |
| 103 | return ph * 4.0f; |
| 104 | } |
| 105 | else if( ph <= 0.75f ) |
| 106 | { |
| 107 | return 2.0f - ph * 4.0f; |
| 108 | } |
| 109 | return ph * 4.0f - 4.0f; |
| 110 | } |
| 111 | |
| 112 | static inline sample_t sawSample( const float _sample ) |
| 113 | { |
no test coverage detected