123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef __AUDIOWAVFILE_H__
- #define __AUDIOWAVFILE_H__
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "audiofile.h"
- // note: can only read *.wav format with g711 and pcm8 codec id.
- typedef struct audiowavfile_t audiowavfile_t;
- struct audiowavfile_t
- {
- audiofile_t base;
- int clock;
- int samplebit;
- int codec_pt;
- };
- #define AUDIO_FILE_CODEC_ALAW 8
- #define AUDIO_FILE_CODEC_MULAW 0
- #define AUDIO_FILE_CODEC_PCM8 102
- #define AUDIO_FILE_CODEC_PCM16 103
- apr_status_t audiowavfile_create(apr_pool_t *pool,
- audioengine_t *engine,
- const char *file,
- int opt,
- int clock, // 8k or 16k
- int codec_pt, // one of AUDIO_FILE_CODEC_xxx
- audiowavfile_t **p_file);
- void audiowavfile_destroy(audiowavfile_t *file);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__AUDIOWAVFILE_H__
|