diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-06 22:51:48 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-06 22:51:48 +0000 |
commit | 4b2fc9d3e738dbb2e7dd297de2f35e571e350691 (patch) | |
tree | e611f1c508d4cbd9720858d06c92a4cfaa25dccb /main/translate.c | |
parent | fed34a6362c74a4f65bae5fb89bcae3f58db5f27 (diff) |
Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits.
- Add a native slin16 type, so that 16kHz codecs can translate without losing resolution.
(This doesn't affect anything immediately, until another codec has wb support.)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/translate.c')
-rw-r--r-- | main/translate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/translate.c b/main/translate.c index 535257afa..09722a427 100644 --- a/main/translate.c +++ b/main/translate.c @@ -806,7 +806,7 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src known audio formats to determine whether there exists a translation path from the source format to the destination format. */ - for (x = 1; src_audio && x < AST_FORMAT_MAX_AUDIO; x <<= 1) { + for (x = 1; src_audio && (x & AST_FORMAT_AUDIO_MASK); x <<= 1) { /* if this is not a desired format, nothing to do */ if (!dest & x) continue; @@ -832,7 +832,7 @@ unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src known video formats to determine whether there exists a translation path from the source format to the destination format. */ - for (; src_video && x < AST_FORMAT_MAX_VIDEO; x <<= 1) { + for (; src_video && (x & AST_FORMAT_VIDEO_MASK); x <<= 1) { /* if this is not a desired format, nothing to do */ if (!dest & x) continue; |