diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-28 18:03:57 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-28 18:03:57 +0000 |
commit | 950e4373b5188668278fca658ab15eaa2e5f7a57 (patch) | |
tree | bd052bfd1d0d8c1143a21900f08a493c267a5c46 /include | |
parent | 3bae4f9508f5c0cfc345e1c56b8a3fee434ceeb7 (diff) |
more slinfactory structure definition to inside implementation module
make read/write/hold work on samples, not bytes
add an API call to find out how many samples are available in a slinfactory
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38418 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/slinfactory.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/include/asterisk/slinfactory.h b/include/asterisk/slinfactory.h index e7403032c..be2e96e58 100644 --- a/include/asterisk/slinfactory.h +++ b/include/asterisk/slinfactory.h @@ -27,27 +27,17 @@ #include <unistd.h> #include <string.h> - #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif -struct ast_slinfactory { - struct ast_frame *queue; - struct ast_trans_pvt *trans; - short hold[1280]; - short *offset; - size_t holdlen; - int size; - int format; -}; +struct ast_slinfactory; void ast_slinfactory_init(struct ast_slinfactory *sf); void ast_slinfactory_destroy(struct ast_slinfactory *sf); int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f); -int ast_slinfactory_read(struct ast_slinfactory *sf, short *buf, size_t bytes); - - +int ast_slinfactory_read(struct ast_slinfactory *sf, short *buf, size_t samples); +unsigned int ast_slinfactory_available(const struct ast_slinfactory *sf); #if defined(__cplusplus) || defined(c_plusplus) } |