SphinxBase 5prealpha
|
generic live audio interface for recording and playback More...
#include <sphinx_config.h>
#include <sphinxbase/sphinxbase_export.h>
#include <sphinxbase/prim_type.h>
Go to the source code of this file.
Macros | |
#define | DEFAULT_SAMPLES_PER_SEC 16000 |
#define | AD_OK 0 |
#define | AD_EOF -1 |
#define | AD_ERR_GEN -1 |
#define | AD_ERR_NOT_OPEN -2 |
#define | AD_ERR_WAVE -3 |
Typedefs | |
typedef struct ad_rec_s | ad_rec_t |
Functions | |
SPHINXBASE_EXPORT ad_rec_t * | ad_open_dev (const char *dev, int32 samples_per_sec) |
Open a specific audio device for recording. | |
SPHINXBASE_EXPORT ad_rec_t * | ad_open_sps (int32 samples_per_sec) |
Open the default audio device with a given sampling rate. | |
SPHINXBASE_EXPORT ad_rec_t * | ad_open (void) |
Open the default audio device. | |
SPHINXBASE_EXPORT int32 | ad_start_rec (ad_rec_t *) |
SPHINXBASE_EXPORT int32 | ad_stop_rec (ad_rec_t *) |
SPHINXBASE_EXPORT int32 | ad_close (ad_rec_t *) |
SPHINXBASE_EXPORT int32 | ad_read (ad_rec_t *, int16 *buf, int32 max) |
generic live audio interface for recording and playback
Definition in file ad.h.
SPHINXBASE_EXPORT ad_rec_t * ad_open | ( | void | ) |
Open the default audio device.
Definition at line 228 of file ad_alsa.c.
References ad_open(), and ad_open_sps().
Referenced by ad_open().
SPHINXBASE_EXPORT ad_rec_t * ad_open_dev | ( | const char * | dev, |
int32 | samples_per_sec | ||
) |
Open a specific audio device for recording.
The device is opened in non-blocking mode and placed in idle state.
dev | Device name (platform-specific) |
samples_per_sec | Samples per second |
Definition at line 187 of file ad_alsa.c.
References ad_open_dev().
Referenced by ad_open_dev(), and ad_open_sps().
SPHINXBASE_EXPORT ad_rec_t * ad_open_sps | ( | int32 | samples_per_sec | ) |
Open the default audio device with a given sampling rate.
samples_per_sec | Samples per second |
Definition at line 222 of file ad_alsa.c.
References ad_open_dev(), and ad_open_sps().
Referenced by ad_open(), and ad_open_sps().
SPHINXBASE_EXPORT int32 ad_read | ( | ad_rec_t * | handle, |
int16 * | buf, | ||
int32 | max | ||
) |