41 #include "EST_audio.h"
42 #include "EST_cmd_line_options.h"
44 int main (
int argc,
char *argv[])
54 EST_String(
"[input file0] [input file1] ...\n")+
55 "Summary; play waveform files on audio device\n"+
56 "use \"-\" to make input and output files stdin/out\n"+
59 "-p <string> audio device protocol. Ths supported types are\n"
60 " "+options_supported_audio()+
"\n"
61 "-command <string> command to play wave when protocol\n"+
63 "-basic HTML audio/basic format, if unheadered treat\n"
65 "-r* ESPS compatible way of selecting subrange of file.\n"
66 " The options -start, -end, -to and -from are \n"
68 "-quality <string> either [ high | low ]. \"high\" will ensure \n"
69 " that proper resampling is used. \"low\" means play \n"
70 " as fast as possible, with a minimum of processing\n\n"
71 "-server <string> play sound on machine (when protocol is\n"
73 "-audiodevice <string> use specified audiodevice if approrpriate\n"
75 "-scale <float> change the gain (volume) of the signal. 1.0 is default\n"
76 "-v verbose. Print file names when playing\n"
77 "-wait wait for a key to be pressed between each file\n",
85 for (p = files.head(); p; )
88 cout <<
"playing " << files(p) << endl;
90 if (read_wave(sig, files(p), al) != format_ok)
97 wave_extract_channel(tmp,sig,al.
ival(
"-c"));
114 play_wave(*toplay, al);
117 if (al.
present(
"-wait") && p->next())
119 if (getc(stdin) ==
'a')
137 if (al.
val(
"-L", 0) ==
"true")
139 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
float fval(const EST_String &rkey, int m=1) const
void rescale(float gain, int normalize=0)
const int present(const K &rkey) const
Returns true if key is present.
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