106 #include <sphinx_config.h>
108 #if defined (__CYGWIN__)
109 #include <w32api/windows.h>
110 #include <w32api/mmsystem.h>
111 #elif (defined(WIN32) && !defined(GNUWINCE)) || defined(_WIN32_WCE)
113 #include <mmsystem.h>
114 #elif defined(AD_BACKEND_ALSA)
115 #include <alsa/asoundlib.h>
119 #include <sphinxbase/sphinxbase_export.h>
131 #define AD_SAMPLE_SIZE (sizeof(int16))
132 #define DEFAULT_SAMPLES_PER_SEC 16000
137 #define AD_ERR_GEN -1
138 #define AD_ERR_NOT_OPEN -2
139 #define AD_ERR_WAVE -3
142 #if (defined(WIN32) || defined(AD_BACKEND_WIN32)) && !defined(GNUWINCE)
158 #if (defined(WIN32) || defined(AD_BACKEND_WIN32)) && !defined(GNUWINCE)
160 #define DEFAULT_DEVICE (char*)DEV_MAPPER
165 typedef struct ad_rec_s {
179 #elif defined(AD_BACKEND_OSS)
181 #define DEFAULT_DEVICE "/dev/dsp"
195 #elif defined(AD_BACKEND_ESD)
197 #define DEFAULT_DEVICE NULL
205 #elif defined(AD_BACKEND_ALSA)
207 #define DEFAULT_DEVICE "default"
215 #elif defined(AD_BACKEND_S60)
217 typedef struct ad_rec_s {
225 ad_rec_t *ad_open_sps_bufsize (int32 samples_per_sec, int32 bufsize_msec);
229 #define DEFAULT_DEVICE NULL
251 int32 samples_per_sec
259 int32 samples_per_sec
270 #if defined(WIN32) && !defined(GNUWINCE)
276 ad_rec_t *ad_open_sps_bufsize (int32 samples_per_sec, int32 bufsize_msec);
301 int32 ad_read (
ad_rec_t *, int16 *buf, int32 max);
306 #if defined(WIN32) && !defined(GNUWINCE)
330 ad_play_t *ad_open_play_sps (int32 samples_per_sec);
364 unsigned char *inbuf,