Lines Matching refs:device
63 void play_sample(FILE *file, unsigned int card, unsigned int device, unsigned int channels,
80 unsigned int device = 0;
88 fprintf(stderr, "Usage: %s file.wav [-D card] [-d device] [-p period_size]"
134 device = atoi(*argv);
155 play_sample(file, card, device, chunk_fmt.num_channels, chunk_fmt.sample_rate,
172 fprintf(stderr, "%s is %u%s, device only supports >= %u%s\n", param_name, value,
179 fprintf(stderr, "%s is %u%s, device only supports <= %u%s\n", param_name, value,
187 int sample_is_playable(unsigned int card, unsigned int device, unsigned int channels,
194 params = pcm_params_get(card, device, PCM_OUT);
196 fprintf(stderr, "Unable to open PCM device %u.\n", device);
211 void play_sample(FILE *file, unsigned int card, unsigned int device, unsigned int channels,
234 if (!sample_is_playable(card, device, channels, rate, bits, period_size, period_count)) {
238 pcm = pcm_open(card, device, PCM_OUT, &config);
240 fprintf(stderr, "Unable to open PCM device %u (%s)\n",
241 device, pcm_get_error(pcm));