[asterisk-commits] file: trunk r74560 - /trunk/res/res_speech.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 11 11:10:04 CDT 2007
Author: file
Date: Wed Jul 11 11:10:03 2007
New Revision: 74560
URL: http://svn.digium.com/view/asterisk?view=rev&rev=74560
Log:
Can't forget to remember what format is in use for writing.
Modified:
trunk/res/res_speech.c
Modified: trunk/res/res_speech.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_speech.c?view=diff&rev=74560&r1=74559&r2=74560
==============================================================================
--- trunk/res/res_speech.c (original)
+++ trunk/res/res_speech.c Wed Jul 11 11:10:03 2007
@@ -168,6 +168,10 @@
if (!(engine = find_engine(engine_name)))
return NULL;
+ /* Make sure the requested format fits */
+ if (!(engine->formats & format))
+ return NULL;
+
/* Allocate our own speech structure, and try to allocate a structure from the engine too */
if (!(new_speech = ast_calloc(1, sizeof(*new_speech))))
return NULL;
@@ -180,6 +184,9 @@
/* Copy over our engine pointer */
new_speech->engine = engine;
+
+ /* Can't forget the format audio is going to be in */
+ new_speech->format = format;
/* We are not ready to accept audio yet */
ast_speech_change_state(new_speech, AST_SPEECH_STATE_NOT_READY);
More information about the asterisk-commits
mailing list