Lines Matching defs:count

166 static void playbackv(char **filenames, unsigned int count);
167 static void capturev(char **filenames, unsigned int count);
169 static void begin_voc(int fd, size_t count);
171 static void begin_wave(int fd, size_t count);
173 static void begin_au(int fd, size_t count);
179 void (*start) (int fd, size_t count);
298 unsigned int count;
316 count = snd_pcm_info_get_subdevices_count(pcminfo);
318 snd_pcm_info_get_subdevices_avail(pcminfo), count);
319 for (idx = 0; idx < (int)count; idx++) {
445 static ssize_t xwrite(int fd, const void *buf, size_t count)
450 while (offset < count) {
451 written = write(fd, (char *)buf + offset, count - offset);
951 static ssize_t safe_read(int fd, void *buf, size_t count)
955 while (count > 0 && !in_aborting) {
956 if ((res = read(fd, buf, count)) == 0)
960 count -= res;
1398 error(_("Channels count non available"));
2089 static uint8_t *remap_data(uint8_t *data, size_t count)
2101 chunk_bytes = count * bits_per_frame / 8;
2109 tmp_size = count;
2114 for (i = 0; i < count; i++) {
2125 static uint8_t **remap_datav(uint8_t **data, size_t count ATTRIBUTE_UNUSED)
2145 #define remap_data(data, count) (data)
2146 #define remap_datav(data, count) (data)
2153 static ssize_t pcm_write(uint8_t *data, size_t count)
2158 if (count < chunk_size) {
2159 snd_pcm_format_set_silence(hwparams.format, data + count * bits_per_frame / 8, (chunk_size - count) * hwparams.channels);
2160 count = chunk_size;
2162 data = remap_data(data, count);
2163 while (count > 0 && !in_aborting) {
2167 r = writei_func(handle, data, count);
2170 if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
2185 count -= r;
2192 static ssize_t pcm_writev(uint8_t **data, unsigned int channels, size_t count)
2197 if (count != chunk_size) {
2199 size_t offset = count;
2200 size_t remaining = chunk_size - count;
2203 count = chunk_size;
2205 data = remap_datav(data, count);
2206 while (count > 0 && !in_aborting) {
2215 r = writen_func(handle, bufs, count);
2218 if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
2235 count -= r;
2249 size_t count = rcount;
2251 if (count != chunk_size) {
2252 count = chunk_size;
2255 while (count > 0) {
2261 r = readi_func(handle, data, count);
2264 if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
2279 count -= r;
2291 size_t count = rcount;
2293 if (count != chunk_size) {
2294 count = chunk_size;
2297 while (count > 0) {
2308 r = readn_func(handle, bufs, count);
2311 if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
2328 count -= r;
2339 static ssize_t voc_pcm_write(uint8_t *data, size_t count)
2341 ssize_t result = count, r;
2344 while (count > 0 && !in_aborting) {
2345 size = count;
2350 count -= size;
2507 case 3: /* a silence block, no data, only a count */
2632 /* calculate the data count to read from/to dsp */
2635 off_t count;
2639 count = pbrec_count;
2641 count = snd_pcm_format_size(hwparams.format, sampleslimit * hwparams.channels);
2643 count = snd_pcm_format_size(hwparams.format, hwparams.rate * hwparams.channels);
2644 count *= (off_t)timelimit;
2646 return count < pbrec_count ? count : pbrec_count;
2883 static void playback_go(int fd, size_t loaded, off_t count, int rtype, char *name)
2892 while (loaded > chunk_bytes && written < count && !in_aborting) {
2902 while (written < count && !in_aborting) {
2904 c = count - written;
3257 off_t count, rest; /* number of bytes to capture */
3264 count = calc_count();
3265 if (count == 0)
3266 count = LLONG_MAX;
3273 if (count < LLONG_MAX)
3274 count += count % 2;
3276 count -= count % 2;
3286 if (count > fmt_rec_table[file_type].max_filesize)
3287 count = fmt_rec_table[file_type].max_filesize;
3315 rest = count;
3341 count -= c;
3366 } while ((file_type == FORMAT_RAW && !timelimit && !sampleslimit) || count > 0);
3369 static void playbackv_go(int* fds, unsigned int channels, size_t loaded, off_t count, int rtype, char **names)
3388 while (count > 0 && !in_aborting) {
3390 size_t expected = count / channels;
3414 count -= r;
3423 static void capturev_go(int* fds, unsigned int channels, off_t count, int rtype, char **names)
3439 while (count > 0 && !in_aborting) {
3441 c = count;
3455 count -= r;
3460 static void playbackv(char **names, unsigned int count)
3470 if (count == 1 && channels > 1) {
3482 } else if (count != channels) {
3513 static void capturev(char **names, unsigned int count)
3523 if (count == 1) {
3535 } else if (count != channels) {