const char * UsageLines [] = {
"Usage: swsample (upsample factor) (downsample factor)",
"Reads two-byte samples from standard input.",
"Writes resampled version to standard output.",
"The two factors must be integers > 0.",
"The samples are not changed, simply repeated 0 or more times per",
"the specified ratio. Filtering may be needed after upsampling.",
"May 16, 2011. Newest is at gopher -p users/julianbr sdf.org",
};
const int NumUsageLines = sizeof (UsageLines)/sizeof (UsageLines [0] );
#include <stdio.h>
#define SampleSize 2
void Sample (unsigned long int up, unsigned long int down)
{
unsigned long int remainder;
unsigned char sample [SampleSize];