Lines Matching refs:capture

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