D | shared_mem_test.cpp | 78 unsigned long phi; in Test01() local 87 phi = 0; in Test01() 88 Generate(smpBuf, BUF_SZ, amplitude, phi, dPhi); // fill buffer in Test01() 134 void AudioTrackTest::Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, lon… in Generate() argument 138 buffer[i0] = ComputeSine( amplitude, phi); in Generate() 139 phi += dPhi; in Generate() 149 short AudioTrackTest::ComputeSine(long amplitude, long phi) in ComputeSine() argument 155 sample = (amplitude*sin1024[(phi>>22) & 0x3ff]) >> 15; in ComputeSine() 157 l0 = (phi>>12) & 0x3ff; // 2^20 * x / (2*pi) in ComputeSine() 158 l1 = (amplitude*sin1024[((phi>>22) + 256) & 0x3ff]) >> 15; // 2^15*cosine in ComputeSine() [all …]
|