aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_jingle.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 22:51:48 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 22:51:48 +0000
commit4b2fc9d3e738dbb2e7dd297de2f35e571e350691 (patch)
treee611f1c508d4cbd9720858d06c92a4cfaa25dccb /channels/chan_jingle.c
parentfed34a6362c74a4f65bae5fb89bcae3f58db5f27 (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 'channels/chan_jingle.c')
-rw-r--r--channels/chan_jingle.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c
index e332159db..16d906c91 100644
--- a/channels/chan_jingle.c
+++ b/channels/chan_jingle.c
@@ -198,7 +198,7 @@ static int jingle_get_codec(struct ast_channel *chan);
static const struct ast_channel_tech jingle_tech = {
.type = "Jingle",
.description = "Jingle Channel Driver",
- .capabilities = ((AST_FORMAT_MAX_AUDIO << 1) - 1),
+ .capabilities = AST_FORMAT_AUDIO_MASK,
.requester = jingle_request,
.send_digit_begin = jingle_digit_begin,
.send_digit_end = jingle_digit_end,
@@ -340,10 +340,7 @@ static int jingle_accept_call(struct jingle *client, struct jingle_pvt *p)
continue;
if (alreadysent & pref_codec)
continue;
- if (pref_codec <= AST_FORMAT_MAX_AUDIO)
- add_codec_to_answer(p, pref_codec, dcodecs);
- else
- add_codec_to_answer(p, pref_codec, dcodecs);
+ add_codec_to_answer(p, pref_codec, dcodecs);
alreadysent |= pref_codec;
}
payload_red = iks_new("payload-type");