shithub: sox

ref: e16e2544cc2987a7931961fa48e145d69e9e9ff8
dir: /TODO/

View raw version
People are encouraged to pick some of these and implement it.  Send
all patches to cbagwell@users.sourceforge.net.

  o Make "mix" an alias of "avg" since thats closer to what it
    really is.  For 2->2 mixes, make a 2 option L->L and R->R
    shortcut.  Similar 4 option for 4->4.

  o In avg effect, going from 1->2 should have a 2 number shortcut
    so that you don't have to put 100% in each channel.  Similar
    for 2->4.

  o Remove FFT code from stat effect and use new FFT.c code.
    Ideally, FFT needs to become LGPL license instead of
    GPL so that it can be used as apart of LGPL libst.

  o Modify noiseprof and noisered so that they can read
    and write from stdin/out.  This would allow to run
    them in scripts without intermediate files required.

  o Several effects have to process a "window" of data at
    one time and sox doesn't always pass that amount in.
    Make some common routines to buffer up a window of data
    instead of requiring each effect to reimplement this.

  o VOX format says its reading/writing SIGN2 data when its
    really OKI ADPCM.

  o Add an interface to libst so that applications can query
    what size/encoding/rate/channels a given format handles.
    Then applications could modify parameters before an error
    occurs.  This would allow stripping out override logic
    in various formats.

  o Silence effect could clip silence from end of file.
    Easiest way is to create a tmp file and store only
    periods of silence so that it can be flowed/drained
    out if non-silence is detected.

  o Effects engine should not have a global "flow" period
    followed by a global "drain" period.  Each effect should
    track which it needs to invoke.  Until thats done you
    won't be able to stack two effects that both make use
    of drain (ie. can't run the "reverse" effect twice
    on the same command line and have a good output file).

  o Have sox.c auto remove an resample effects when rates are the same
    (allows scripts to be dumper).

  o Add MP3 support to WAV handler. Can copy most work from mp3.c.

  o Document how the synth effect is meant to be used (with nul file
    handler).

  o Implement FLAC (http://flac.sf.net) and speex (http://www.speex.org).
  
  o Support 24-bit formats... Difficult because sometimes that means
    24-bits in a 32-bit integer and sometimes it means packed 24-bits
    (read 3-bytes at a time).

  o Modify .dat handler to support stereo data... Probably should remove
    time offset column since its not real useful (could be added by
    a simple post-processor).  Also, should store information in
    header related to original data so that it can be converted back
    to similar percision easier.  Another idea is to normalize the
    data relative to original percision to reduce value ranges
    (might result in a smaller text file since percision will
    be smaller).

  o Detect support for -D_FILE_OFFSET_BITS=64 and -D_LARGEFILE_SOURCE
    and auto add to CFLAGS so that large files can be accessed.

  o Don't force -no-cygwin under cygwin since it now contains
    support for /dev/dsp. Some people might want to use that
    to play audio files under windows.

  o Add command line options that specify a specific endian
    (as apposed to -x which just reverses it from current
    machines endian).  This would be useful for cdr.c
    since some formats like to keep the data in little-endien
    (CDDA?).

  o Add alias -1 (for -b), -2 (for -w), -4 (for -d).

  o Add a fifo/buffer to audio drivers to prevent losing audio data.
    Perhaps mpg123 could be used as an example.

  o Add new PRC format in to auto.c

  o Still passing some options using CFLAGS instead of stconfig.h.

  o Lots of effects are using "double" to prevent overflow of
    st_sample_t math.  With ststdint.h we now have a portable way
    of detecting uint64_t...  Use that when possible to speed up
    math (won't have to convert back and forth from int to float).

  o Make a global version of MIN/MAX instead of sprinkled min/max/MIN/MAX

  o Make a global version of clip() instead of sprinked in all files.

  o Fix conversions to and from st_sample_t to floats.  Currently,
    its an approximation because it doesn't account from negative
    side having 1 more value then positive side.  That means instead
    of -1:1 range, its more like -0.999:1 or -1:0.9999.

  o Add command line option to override comment string.

  o WAV handler is not using world alignment for at least the
    main data chunk (expect for GSM).

  o Add support for .TXT format as Cooledit supports.  Not really fit for
    graphing since it is only a stream of ascii sample values but some
    program appear to like it.  Also has a much nicer header.
    http://lab.chass.utoronto.ca/damion/audio/coolwav.htm

  o Keep sox from using "fail" on errors.  Sox was supposed to be
    a sound library called "ST" but libraries shouldn't exit a program,
    they should return error codes for users to handle.  Initial support
    for this has been added.  Needs to be completed.

SOX includes skeleton format files to assist you in supporting new 
formats, sound effect loops, and special-purpose programs.
The full skeleton format, skel.c, helps you write a driver 
for a new format which has data structures.  Skeleff.c is
a starting point for writing a sound effect loop.  Sox.c is
a good starting point for new programs.  (Someone finally
did this and told me what was wrong...)

In handlers.c, note that many formats set up the header and then
use the raw driver for reading and writing.