if (snd_pcm_nonblock(pad->handle, 1))
PARA_ERROR_LOG("failed to set nonblock mode\n");
tv_add(now, &(struct timeval ){0, 100 * 1000}, &pad->next_chunk);
- return period_size * pad->bytes_per_frame;
+ return 1;
}
static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
struct writer *writer; /* FIXME: Should better be only the number. */
/** Writer-specific data. */
void *private_data;
- /** Send that many bytes in one go. */
- int chunk_bytes;
/** Pointer to the group this node belongs to. */
struct writer_node_group *wng;
/** The writer-specific configuration of this node. */
unsigned num_writers;
/** Array of pointers to the corresponding writer nodes. */
struct writer_node *writer_nodes;
- /** The maximum of the chunk_bytes values of the writer nodes in this group. */
- int max_chunk_bytes;
/** Non-zero if an error or end of file was encountered by the feeding task. */
int *input_error;
/** Current output buffer. */
ret = wn->writer->open(wn);
if (ret < 0)
goto err_out;
- wn->chunk_bytes = ret;
- g->max_chunk_bytes = PARA_MAX(g->max_chunk_bytes, ret);
}
sprintf(g->task.status, "%s", "writer node group");
register_task(&g->task);