46 int main (
int argc,
char *argv[])
56 EST_String(
"[input file0] [input file1] ...\n")+
57 "Summary; play waveform files on audio device\n"+
58 "use \"-\" to make input and output files stdin/out\n"+
61 "-p <string> audio device protocol. Ths supported types are\n" 63 "-command <string> command to play wave when protocol\n"+
65 "-basic HTML audio/basic format, if unheadered treat\n" 67 "-r* ESPS compatible way of selecting subrange of file.\n" 68 " The options -start, -end, -to and -from are \n" 70 "-quality <string> either [ high | low ]. \"high\" will ensure \n" 71 " that proper resampling is used. \"low\" means play \n" 72 " as fast as possible, with a minimum of processing\n\n" 73 "-server <string> play sound on machine (when protocol is\n" 75 "-audiodevice <string> use specified audiodevice if approrpriate\n" 77 "-scale <float> change the gain (volume) of the signal. 1.0 is default\n" 78 "-v verbose. Print file names when playing\n" 79 "-wait wait for a key to be pressed between each file\n",
87 for (p = files.
head(); p; )
90 cout <<
"playing " << files(p) << endl;
121 if (getc(stdin) ==
'a')
139 if (al.
val(
"-L", 0) ==
"true")
141 if (al.
val(
"-R", 0) ==
"true")
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
int override_val(const EST_String rkey, const EST_String rval)
add to end of list or overwrite. If rval is empty, do nothing
int ival(const EST_String &rkey, int m=1) const
int wave_extract_channel(EST_Wave &single, const EST_Wave &multi, int channel)
float fval(const EST_String &rkey, int m=1) const
void rescale(float gain, int normalize=0)
int main(int argc, char *argv[])
EST_String options_wave_input(void)
const V & val(const K &rkey, bool m=0) const
return value according to key (const)
int add_item(const K &rkey, const V &rval, int no_search=0)
add key-val pair to list
EST_read_status read_wave(EST_Wave &sig, const EST_String &in_file, EST_Option &al)
int present(const K &rkey) const
Returns true if key is present.
EST_String options_supported_audio(void)
void override_lib_ops(EST_Option &a_list, EST_Option &al)
int parse_command_line(int argc, char *argv[], const EST_String &usage, EST_StrList &files, EST_Option &al, int make_stdio=1)
int play_wave(EST_Wave &inwave, EST_Option &al)