Lines Matching defs:format
16 static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */
40 int format_bits = snd_pcm_format_width(format);
43 int phys_bps = snd_pcm_format_physical_width(format) / 8;
44 int big_endian = snd_pcm_format_big_endian(format) == 1;
45 int to_unsigned = snd_pcm_format_unsigned(format) == 1;
46 int is_float = (format == SND_PCM_FORMAT_FLOAT_LE ||
47 format == SND_PCM_FORMAT_FLOAT_BE);
78 /* Generate data in native endian format */
115 /* set the interleaved read/write format */
121 /* set the sample format */
122 err = snd_pcm_hw_params_set_format(handle, params, format);
124 printf("Sample format not available for playback: %s\n", snd_strerror(err));
745 "-o,--format sample format\n"
775 {"format", 1, NULL, 'o'},
838 for (format = 0; format < SND_PCM_FORMAT_LAST; format++) {
839 const char *format_name = snd_pcm_format_name(format);
844 if (format == SND_PCM_FORMAT_LAST)
845 format = SND_PCM_FORMAT_S16;
846 if (!snd_pcm_format_linear(format) &&
847 !(format == SND_PCM_FORMAT_FLOAT_LE ||
848 format == SND_PCM_FORMAT_FLOAT_BE)) {
849 printf("Invalid (non-linear/float) format %s\n",
878 printf("Stream parameters are %iHz, %s, %i channels\n", rate, snd_pcm_format_name(format), channels);
899 samples = malloc((period_size * channels * snd_pcm_format_physical_width(format)) / 8);
912 areas[chn].first = chn * snd_pcm_format_physical_width(format);
913 areas[chn].step = channels * snd_pcm_format_physical_width(format);