123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef __AUDIORESAMPLE_H__
- #define __AUDIORESAMPLE_H__
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "audiostream.h"
- typedef struct audioresample_t audioresample_t;
- struct audioresample_t
- {
- audiostream_t base;
- int upstream_rate;
- int downstream_rate;
- int quality; // 0 - 10 (best)
- void *read_state;
- void *write_state;
- unsigned int upstream_psize;
- unsigned int downstream_psize;
- audioframe_t read_resampled_frame;
- audioframe_t write_resampled_frame;
- };
- // 16bit pcm data
- apr_status_t audioresample_create(apr_pool_t *pool,
- audioengine_t *engine,
- int upstream_rate,
- int downstream_rate,
- int quality,
- audioresample_t **p_resample);
- void audioresample_destroy(audioresample_t *resample);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__AUDIORESAMPLE_H__
|