Lines Matching full:capture
173 /* loopback test where we play sine wave and capture the same sine wave */
193 /* start capture */ in test_loopback()
194 err = pthread_create(&capture_id, NULL, (void *) bat->capture.fct, bat); in test_loopback()
196 fprintf(bat->err, _("Cannot create capture thread: %d\n"), err); in test_loopback()
220 /* now stop and wait for capture to finish */ in test_loopback()
224 fprintf(bat->err, _("Cannot join capture thread: %d\n"), err); in test_loopback()
229 /* check if capture thread is canceled or not */ in test_loopback()
231 fprintf(bat->log, _("Capture canceled.\n")); in test_loopback()
235 /* check capture status */ in test_loopback()
237 fprintf(bat->err, _("Exit capture thread fail: %d\n"), in test_loopback()
241 fprintf(bat->log, _("Capture completed.\n")); in test_loopback()
279 /* single ended capture only test */
286 /* start capture */ in test_capture()
287 err = pthread_create(&capture_id, NULL, (void *) bat->capture.fct, bat); in test_capture()
289 fprintf(bat->err, _("Cannot create capture thread: %d\n"), err); in test_capture()
293 /* TODO: stop capture */ in test_capture()
295 /* wait for capture to complete */ in test_capture()
298 fprintf(bat->err, _("Cannot join capture thread: %d\n"), err); in test_capture()
305 fprintf(bat->err, _("Exit capture thread fail: %d\n"), in test_capture()
309 fprintf(bat->log, _("Capture completed.\n")); in test_capture()
319 " -D pcm device for both playback and capture\n" in usage()
321 " -C pcm device for capture\n" in usage()
325 " -n frames to playback or capture\n" in usage()
328 " -p total number of periods to play/capture\n" in usage()
366 bat->capture.device = NULL; in set_defaults()
375 bat->capture.fct = &record_tinyalsa; in set_defaults()
379 bat->capture.fct = &record_alsa; in set_defaults()
382 bat->capture.mode = MODE_LOOPBACK; in set_defaults()
420 bat->capture.mode = MODE_ANALYZE_ONLY; in parse_arguments()
441 if (bat->capture.device == NULL) in parse_arguments()
442 bat->capture.device = optarg; in parse_arguments()
445 if (bat->capture.mode == MODE_SINGLE) in parse_arguments()
446 bat->capture.mode = MODE_LOOPBACK; in parse_arguments()
455 bat->capture.mode = MODE_SINGLE; in parse_arguments()
456 bat->capture.device = optarg; in parse_arguments()
504 if ((bat->local == true) && (bat->capture.file == NULL)) { in validate_options()
516 /* check single ended is in either playback or capture - not both */ in validate_options()
518 && (bat->capture.mode == MODE_SINGLE)) { in validate_options()
558 /* Determine duration of playback and/or capture */ in bat_init()
565 /* Set default playback and capture devices */ in bat_init()
566 if (bat->playback.device == NULL && bat->capture.device == NULL) in bat_init()
567 bat->playback.device = bat->capture.device = DEFAULT_DEV_NAME; in bat_init()
569 /* Determine capture file */ in bat_init()
571 bat->capture.file = bat->playback.file; in bat_init()
582 bat->capture.file = strdup(name); in bat_init()
583 if (bat->capture.file == NULL) in bat_init()
688 /* Xrun error in playback or capture, in main()
706 /* single line playback thread: playback only, no capture */ in main()
712 /* single line capture thread: capture only, no playback */ in main()
713 if (bat.capture.mode == MODE_SINGLE) { in main()
718 if (bat.capture.mode == MODE_ANALYZE_ONLY && bat.capturefile) { in main()
719 bat.capture.file = strdup(bat.capturefile); in main()
722 bat.capture.file); in main()
723 fprintf(bat.log, _("Skipping playback and capture\n")); in main()
727 /* loopback thread: playback and capture in a loop */ in main()
744 free(bat.capture.file); in main()