Lines Matching refs:chn
39 unsigned int chn; in generate_sine() local
50 for (chn = 0; chn < channels; chn++) { in generate_sine()
51 if ((areas[chn].first % 8) != 0) { in generate_sine()
52 printf("areas[%u].first == %u, aborting...\n", chn, areas[chn].first); in generate_sine()
55 samples[chn] = /*(signed short *)*/(((unsigned char *)areas[chn].addr) + (areas[chn].first / 8)); in generate_sine()
56 if ((areas[chn].step % 16) != 0) { in generate_sine()
57 printf("areas[%u].step == %u, aborting...\n", chn, areas[chn].step); in generate_sine()
60 steps[chn] = areas[chn].step / 8; in generate_sine()
61 samples[chn] += offset * steps[chn]; in generate_sine()
77 for (chn = 0; chn < channels; chn++) { in generate_sine()
81 *(samples[chn] + phys_bps - 1 - i) = (res >> i * 8) & 0xff; in generate_sine()
84 *(samples[chn] + i) = (res >> i * 8) & 0xff; in generate_sine()
86 samples[chn] += steps[chn]; in generate_sine()
787 unsigned int chn; in main() local
910 for (chn = 0; chn < channels; chn++) { in main()
911 areas[chn].addr = samples; in main()
912 areas[chn].first = chn * snd_pcm_format_physical_width(format); in main()
913 areas[chn].step = channels * snd_pcm_format_physical_width(format); in main()