Lines Matching refs:areas
30 static void generate_sine(const snd_pcm_channel_area_t *areas, in generate_sine() argument
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()
250 snd_pcm_channel_area_t *areas) in write_loop() argument
257 generate_sine(areas, 0, period_size, &phase); in write_loop()
297 snd_pcm_channel_area_t *areas) in write_and_poll_loop() argument
340 generate_sine(areas, 0, period_size, &phase); in write_and_poll_loop()
386 snd_pcm_channel_area_t *areas; member
395 snd_pcm_channel_area_t *areas = data->areas; in async_callback() local
401 generate_sine(areas, 0, period_size, &data->phase); in async_callback()
417 snd_pcm_channel_area_t *areas) in async_loop() argument
424 data.areas = areas; in async_loop()
432 generate_sine(areas, 0, period_size, &data.phase); in async_loop()
538 snd_pcm_channel_area_t *areas ATTRIBUTE_UNUSED) in async_direct_loop()
548 data.areas = NULL; /* we do not require the global areas for direct write */ in async_direct_loop()
596 snd_pcm_channel_area_t *areas ATTRIBUTE_UNUSED) in direct_loop()
682 snd_pcm_channel_area_t *areas) in direct_write_loop() argument
689 generate_sine(areas, 0, period_size, &phase); in direct_write_loop()
718 snd_pcm_channel_area_t *areas);
788 snd_pcm_channel_area_t *areas; in main() local
905 areas = calloc(channels, sizeof(snd_pcm_channel_area_t)); in main()
906 if (areas == NULL) { 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()
916 err = transfer_methods[method].transfer_loop(handle, samples, areas); in main()
920 free(areas); in main()