mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@89071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user