]> git.tuebingen.mpg.de Git - paraslash.git/commit
Move wav detection code to a separate file.
authorAndre Noll <maan@systemlinux.org>
Sun, 28 Oct 2012 13:01:01 +0000 (14:01 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 Nov 2012 13:08:55 +0000 (14:08 +0100)
commit1af65c31171b35e5a5e931e3a4467786e932e145
tree7e8dfc1f8b8e0b9a8602d4e33a8d6e98977129fd
parentd5dc1cb250dfb44d25293e1a01b4c2583df2352a
Move wav detection code to a separate file.

The logic to detect a wav header  and delete it from an input stream
is useful also for the upcoming resample filter, so let's make this
code reusable.

The first step for doing so is to remove the relevant parts from
write.c to check_wav.c and exports those functions which are called
from write.c to check_wav.h.

There is one problem though: The wav detector code needs to know
the arguments for the --channels, --sample_rate and --sample_format
options given to para_write, but the code would not be reusable if
check_wav.c depended on the gengetop args info struct of para_write.

Hence we introduce the public structure wav_params in check_wav.h
for this information, which is independent of gengetopt. A simple
convenience helper for copying the command line arguments from an
(arbitrary) args info structure to a struct wav_params is provided
as well.
check_wav.c [new file with mode: 0644]
check_wav.h [new file with mode: 0644]
configure.ac
error.h
write.c