ref: 063fd456b2db1518c3bd58bd378a8dedb8bc0a57
dir: /TODO/
People are encouraged to pick some of these and implement it. Send all patches to cbagwell@users.sourceforge.net, or post them on the patches tracker at http://sf.net/projects/sox/. 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. o Update all read routines to be like WAV handler and only return data in multiples of sample_size*channels. This will prevent corrupt files from causing sox to go into an infinite loop trying to read just a couple more bytes. o Make "mix" an alias of "avg" since that's 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 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 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 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 that's 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 Add MP3 support to WAV handler. Can copy most work from mp3.c. o Implement speex (http://www.speex.org). o Modify .dat handler to support stereo data... Probably should remove time offset column since it's 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 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 a FIFO/buffer to audio drivers to prevent losing audio data. Perhaps mpg123 could be used as an example. 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 WAV handler is not using word alignment for at least the main data chunk (expect for GSM). 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. o SJB: [11/25/99] (Re. resample effect): Note that upsampling usually doesn't require interpolation, therefore is faster and more accurate than downsampling. Downsampling by an integer factor is also simple, since it just involves decimation if the input is already lowpass-filtered to the output Nyquist freqency. Get the idea? :) Also, the original algorithm has apparently been updated, and might usefully be updated in SoX too. o WAV handler needs to handle (ignore if nothing else) non-audio chunks (except LIST which is already handled), especially at the end of the file. o Effects option-parsers should fail if extraneous characters or arguments are present. e.g. vol 3mW, speed 2 3, etc. should all fail.