123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef __AUDIOCUSTOM_H__
- #define __AUDIOCUSTOM_H__
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "audiostream.h"
- // used to hook stream pipeline
- typedef struct audiocustom_t audiocustom_t;
- typedef apr_status_t (*audiocustom_on_read_frame)(void *cust, audioframe_t *frm, void *user_data);
- typedef apr_status_t (*audiocustom_on_write_frame)(void *cust, const audioframe_t *frm, void *user_data);
- struct audiocustom_t
- {
- audiostream_t base;
- audiocustom_on_read_frame on_read;
- audiocustom_on_write_frame on_write;
- void *user_data;
- };
- apr_status_t audiocustom_create(apr_pool_t *pool,
- audioengine_t *engine,
- audiocustom_on_read_frame on_read,
- audiocustom_on_write_frame on_write,
- void *user_data,
- audiocustom_t **p_audiocust);
- apr_status_t audiocustom_destroy(audiocustom_t *audiocust);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__AUDIOCUSTOM_H__
|