struct private_alsa_write_data {
/** The alsa handle */
snd_pcm_t *handle;
- /** Determined and set by alsa_open(). */
+ /** Determined and set by alsa_init(). */
int bytes_per_frame;
/** The approximate maximum buffer duration in us. */
unsigned buffer_time;
return 1;
}
-/* Open an instance of the alsa writer. */
-static void alsa_open(__a_unused struct writer_node *wn)
-{
-}
-
static void alsa_write_pre_select(struct sched *s, struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
struct alsa_write_args_info dummy;
alsa_cmdline_parser_init(&dummy);
- w->open = alsa_open;
w->close = alsa_close;
w->pre_select = alsa_write_pre_select;
w->post_select = alsa_write_post_select;
return result;
}
-static void file_write_open(__a_unused struct writer_node *wn)
-{
-}
-
static int prepare_output_file(struct writer_node *wn)
{
struct file_write_args_info *conf = wn->conf;
struct file_write_args_info dummy;
file_cmdline_parser_init(&dummy);
- w->open = file_write_open;
w->pre_select = file_write_pre_select;
w->post_select = file_write_post_select;
w->parse_config_or_die = file_write_parse_config_or_die;
btr_remove_node(btrn);
}
-static void oss_open(__a_unused struct writer_node *wn)
-{
-}
-
__malloc static void *oss_parse_config_or_die(const char *options)
{
struct oss_write_args_info *conf = para_calloc(sizeof(*conf));
struct oss_write_args_info dummy;
oss_cmdline_parser_init(&dummy);
- w->open = oss_open;
w->close = oss_close;
w->pre_select = oss_pre_select;
w->post_select = oss_post_select;
#define ENDIAN_FLAGS 0
#endif
-static void osx_write_open(__a_unused struct writer_node *wn)
-{
-}
-
static int core_audio_init(struct writer_node *wn)
{
struct private_osx_write_data *powd = para_calloc(sizeof(*powd));
struct osx_write_args_info dummy;
osx_cmdline_parser_init(&dummy);
- w->open = osx_write_open;
w->close = osx_write_close;
w->pre_select = osx_write_pre_select;
w->post_select = osx_write_post_select;
* This should free whatever was allocated by \ref parse_config_or_die().
*/
void (*free_config)(void *config);
- /**
- * Open one instance of this writer.
- *
- * Perform any preparations needed to write the incoming stream.
- * Usually this function just allocates its private data structure and
- * stores a pointer to that structure in the ->private data of the
- * given parameter. This function must either succeed or terminate the
- * process.
- */
- void (*open)(struct writer_node *);
/**
* Prepare the fd sets for select.
*
.handler = w->execute, .context = wn));
strcpy(wn->task.status, name);
free(name);
- w->open(wn);
wn->task.post_select = w->post_select;
wn->task.pre_select = w->pre_select;
register_task(&wn->task);