47#include "EST_Option.h"
49#include "EST_io_aux.h"
65#define au_serverrate 16000
67bool esd_supported = TRUE;
69static int endian_int = 1;
70#define ESD_BIG_ENDIAN (((char *)&endian_int)[0] == 0)
81 server = display.
before(
":");
101 case 1: format=ESD_MONO;
104 case 2: format=ESD_STEREO;
108 cerr <<
"EST: " << inwave.
num_channels() <<
" channel data not supported\n";
112 format |= ESD_BITS16 | ESD_STREAM | ESD_PLAY;
116 int esd = esd_play_stream( format, sample_rate,
121 const char *data = (
const char *)(inwave.values().
memory());
123 while(n > 0 && (nw = write(esd, data+tot, n)) >0)
131 cerr <<
"ESD: error writing - " << strerror(errno) <<
"\n";
144 cerr <<
"ESD: record not written yet\n";
149int esd_supported = FALSE;
155 cerr <<
"ESD playback not supported" << endl;
164 cerr <<
"ESD record not supported" << endl;
static const EST_String Empty
Constant empty string.
EST_String before(int pos, int len=0) const
Part before position.
int contains(const char *s, int pos=-1) const
Does it contain this substring?
const V & val(const K &rkey, bool m=0) const
return value according to key (const)
const int present(const K &rkey) const
Returns true if key is present.
int num_channels() const
return the number of channels in the waveform
int sample_rate() const
return the sampling rate (frequency)
int num_samples() const
return the number of samples in the waveform