From f27e928f0588f5cbf85ac8202cef912efcc51a9c Mon Sep 17 00:00:00 2001 From: dvossel Date: Tue, 22 Feb 2011 23:04:49 +0000 Subject: Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff -Functional changes 1. Dynamic global format list build by codecs defined in codecs.conf 2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf 3. Negotiation of SILK attributes in chan_sip. 4. SPEEX 32khz with translation 5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c 6. Various changes to RTP code required to properly handle the dynamic format list and formats with attributes. 7. ConfBridge now dynamically jumps to the best possible sample rate. This allows for conferences to take advantage of HD audio (Which sounds awesome) 8. Audiohooks are no longer limited to 8khz audio, and most effects have been updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT. 9. codec_resample now uses its own code rather than depending on libresample. -Organizational changes Global format list is moved from frame.c to format.c Various format specific functions moved from frame.c to format.c Review: https://reviewboard.asterisk.org/r/1104/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@308582 f38db490-d61c-443f-a65b-d21fe96a405b --- funcs/func_pitchshift.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'funcs/func_pitchshift.c') diff --git a/funcs/func_pitchshift.c b/funcs/func_pitchshift.c index 36fa2f6c4..b14894712 100644 --- a/funcs/func_pitchshift.c +++ b/funcs/func_pitchshift.c @@ -170,8 +170,7 @@ static int pitchshift_cb(struct ast_audiohook *audiohook, struct ast_channel *ch } if ((audiohook->status == AST_AUDIOHOOK_STATUS_DONE) || (f->frametype != AST_FRAME_VOICE) || - ((f->subclass.format.id != AST_FORMAT_SLINEAR) && - (f->subclass.format.id != AST_FORMAT_SLINEAR16))) { + !(ast_format_is_slinear(&f->subclass.format))) { return -1; } @@ -209,7 +208,7 @@ static int pitchshift_helper(struct ast_channel *chan, const char *cmd, char *da return 0; } - ast_audiohook_init(&shift->audiohook, AST_AUDIOHOOK_TYPE_MANIPULATE, "pitch_shift"); + ast_audiohook_init(&shift->audiohook, AST_AUDIOHOOK_TYPE_MANIPULATE, "pitch_shift", AST_AUDIOHOOK_MANIPULATE_ALL_RATES); shift->audiohook.manipulate_callback = pitchshift_cb; datastore->data = shift; new = 1; -- cgit v1.2.3