Osamu Shigematsu wrote:

> Hello, all.
> 
> I would like to normalize (maxmize) and trim silent part from input audio
> data. I'm going to add both routine into get_audio.c (I don't use
> libsndfile).

This is not really possible when the input is a pipe or stdin;
for files, you need to scan the entire file for max. amplitude,
and determine the length of silence at the beginning and end
of the sound file. Perhaps it is useful to add command line
options like:

    -nlevel <integer>  (input sound will be normalized to
                        this value; default is 0, which means no
                        normalization)
    -sthr <integer>    (threshold for cutting silence from the
                        beginning and end of input; samples
                        with smaller absolute value than "sthr"
                        are considered to be silence. Default
                        is 0 (disable cutting silence).)

  Pipes and stdin are allowed only when both switches are 0
  (the default), which means that these features are disabled.
  The allowed range for these values is 0-32767.

Such command line flags would be useful to include.

> Does anybody know how to do that or such sound libraries?
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to