Lines Matching defs:phi
78 unsigned long phi;
87 phi = 0;
88 Generate(smpBuf, BUF_SZ, amplitude, phi, dPhi); // fill buffer
134 void AudioTrackTest::Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, long dPhi)
142 buffer[i0] = ComputeSine( amplitude, phi);
143 phi += dPhi;
153 short AudioTrackTest::ComputeSine(long amplitude, long phi)
159 sample = (amplitude*sin1024[(phi>>22) & 0x3ff]) >> 15;
161 l0 = (phi>>12) & 0x3ff; // 2^20 * x / (2*pi)
162 l1 = (amplitude*sin1024[((phi>>22) + 256) & 0x3ff]) >> 15; // 2^15*cosine
177 double phi = 0;
182 d0 = 32768. * sin(phi);
183 phi += dPhi;