Lines Matching refs:rate
299 long rate, channels, period_size, buffer_size; in test_pcm_time() local
340 rate = conf_get_long(pcm_cfg, "rate", NULL, 48000); in test_pcm_time()
345 samples = malloc((rate * channels * snd_pcm_format_physical_width(format)) / 8); in test_pcm_time()
348 snd_pcm_format_set_silence(format, samples, rate * channels); in test_pcm_time()
389 samples = realloc(samples, (rate * channels * in test_pcm_time()
393 snd_pcm_format_set_silence(format, samples, rate * channels); in test_pcm_time()
406 rrate = rate; in test_pcm_time()
409 snprintf(msg, sizeof(msg), "snd_pcm_hw_params_set_rate %ld: %s", rate, snd_strerror(err)); in test_pcm_time()
412 if (rrate != rate) { in test_pcm_time()
413 snprintf(msg, sizeof(msg), "rate mismatch %ld != %u", rate, rrate); in test_pcm_time()
466 (long)rate, (long)channels, in test_pcm_time()
476 frames = snd_pcm_writei(handle, samples, rate); in test_pcm_time()
479 "Write failed: expected %ld, wrote %li", rate, frames); in test_pcm_time()
482 if (frames < rate) { in test_pcm_time()
484 "expected %ld, wrote %li", rate, frames); in test_pcm_time()
488 frames = snd_pcm_readi(handle, samples, rate); in test_pcm_time()
491 "expected %ld, wrote %li", rate, frames); in test_pcm_time()
494 if (frames < rate) { in test_pcm_time()
496 "expected %ld, wrote %li", rate, frames); in test_pcm_time()