search for: bitpersample

Displaying 1 result from an estimated 1 matches for "bitpersample".

Did you mean: bitspersample
2014 Nov 30
4
awk vs. mawk
...BEGIN { - samplerate = '$1'; + $AWK ' + BEGIN { + tone = 1000; + duration = 1; + samplerate = '$1'; + pi = 4 * atan2(1,1); - tone = 1000; - duration = 1; - bitspersample = 24; + bitspersample = 24; + amplitude = 2^bitpersample - 1; - samplemidpoint = 1; - for (sps = 0 ; sps < bitspersample - 1 ; sps++) { - samplemidpoint *= 2; + for (s = 0; s < duration * samplerate; s++) { + sample = sin(2 * pi * tone * s / samplerate); + sample = int(amplitude * sample); + for (b = 0; b < bitspersample...