X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=check_wav.h;h=e6188c5243db16d82c524fc47f4066c8f9aec9df;hp=6a9577658f9743f116a7ec314387131e1522505e;hb=HEAD;hpb=0eb69b6d45c54deda1724b2db2202cf4057b0309 diff --git a/check_wav.h b/check_wav.h index 6a957765..e6188c52 100644 --- a/check_wav.h +++ b/check_wav.h @@ -1,3 +1,7 @@ +/* Copyright (C) 2012 Andre Noll , see file COPYING. */ + +/** \file check_wav.h Detect, process and cut a wav header. */ + struct check_wav_context; /** @@ -21,26 +25,23 @@ struct wav_params { int sample_format_given; }; -/** - * Copy the wav parameters. - * - * \param dst Usually a pointer to struct wav_params. - * \param src Usually a pointer to some args_info struct. - * - * This can not be implemented as a function since the type of the structure - * pointed to by \a src depends on the application. - */ -#define COPY_WAV_PARMS(dst, src) \ - (dst)->channels_arg = (src)->channels_arg; \ - (dst)->channels_given = (src)->channels_given; \ - (dst)->sample_rate_arg = (src)->sample_rate_arg; \ - (dst)->sample_rate_given = (src)->sample_rate_given; \ - (dst)->sample_format_arg = (src)->sample_format_arg; \ - (dst)->sample_format_given = (src)->sample_format_given; +#define LLS_COPY_WAV_PARMS(_dst, _pfx, _lpr) \ + (_dst)->channels_given = lls_opt_given(lls_opt_result( \ + _pfx ## _OPT_CHANNELS, (_lpr))); \ + (_dst)->sample_rate_given = lls_opt_given(lls_opt_result( \ + _pfx ## _OPT_SAMPLE_RATE, (_lpr))); \ + (_dst)->sample_format_given = lls_opt_given(lls_opt_result( \ + _pfx ## _OPT_SAMPLE_FORMAT, (_lpr))); \ + (_dst)->channels_arg = lls_uint32_val(0, lls_opt_result( \ + _pfx ## _OPT_CHANNELS, (_lpr))); \ + (_dst)->sample_rate_arg = lls_uint32_val(0, lls_opt_result( \ + _pfx ## _OPT_SAMPLE_RATE, (_lpr))); \ + (_dst)->sample_format_arg = lls_uint32_val(0, lls_opt_result( \ + _pfx ## _OPT_SAMPLE_FORMAT, (_lpr))); struct check_wav_context *check_wav_init(struct btr_node *parent, struct btr_node *child, struct wav_params *params, struct btr_node **cw_btrn); -void check_wav_pre_select(struct sched *s, struct check_wav_context *cwc); -int check_wav_post_select(struct check_wav_context *cwc); +void check_wav_pre_monitor(struct sched *s, struct check_wav_context *cwc); +int check_wav_post_monitor(struct check_wav_context *cwc); void check_wav_shutdown(struct check_wav_context *cwc);