]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
stereo: fix mod_flite, mod_ssml, mod_unimrcp compile errors
authorChris Rienzo <chris@rienzo.com>
Thu, 12 Jun 2014 21:41:52 +0000 (17:41 -0400)
committerChris Rienzo <chris@rienzo.com>
Thu, 12 Jun 2014 21:41:52 +0000 (17:41 -0400)
src/mod/asr_tts/mod_flite/mod_flite.c
src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
src/mod/formats/mod_ssml/mod_ssml.c

index c9cb69f6f626b5029f46658fe5adfcdd9a38099a..b21b86b8412848dabf9365971398d97388313a5e 100644 (file)
@@ -72,7 +72,7 @@ typedef struct flite_data flite_t;
 #define free_wave(w) if (w) {delete_wave(w) ; w = NULL; }
 #define FLITE_BLOCK_SIZE 1024 * 32
 
-static switch_status_t flite_speech_open(switch_speech_handle_t *sh, const char *voice_name, int rate, switch_speech_flag_t *flags)
+static switch_status_t flite_speech_open(switch_speech_handle_t *sh, const char *voice_name, int rate, int channels, switch_speech_flag_t *flags)
 {
        flite_t *flite = switch_core_alloc(sh->memory_pool, sizeof(*flite));
 
index b0c4d98150d903edbd6edd0ffbb5686c2195bb8c..db50ef3056a6b9422146fc8e64bc4bb9a2bb7bc0 100644 (file)
@@ -378,7 +378,7 @@ static switch_status_t synth_load(switch_loadable_module_interface_t *module_int
 static switch_status_t synth_shutdown();
 
 /* synthesizer's interface for FreeSWITCH */
-static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char *voice_name, int rate, switch_speech_flag_t *flags);
+static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char *voice_name, int rate, int channels, switch_speech_flag_t *flags);
 static switch_status_t synth_speech_close(switch_speech_handle_t *sh, switch_speech_flag_t *flags);
 static switch_status_t synth_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags);
 static switch_status_t synth_speech_read_tts(switch_speech_handle_t *sh, void *data, switch_size_t *datalen, switch_speech_flag_t *flags);
@@ -1571,10 +1571,11 @@ static switch_status_t speech_channel_set_state_unlocked(speech_channel_t *schan
  * @param sh the FreeSWITCH speech handle
  * @param voice_name the voice to use
  * @param rate the sampling rate requested
+ * @param channels the number of channels requested
  * @param flags other options
  * @return SWITCH_STATUS_SUCCESS if successful, otherwise SWITCH_STATUS_FALSE
  */
-static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char *voice_name, int rate, switch_speech_flag_t *flags)
+static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char *voice_name, int rate, int channels, switch_speech_flag_t *flags)
 {
        switch_status_t status = SWITCH_STATUS_SUCCESS;
        speech_channel_t *schannel = NULL;
index be0857c482159c3f0e907e9b4e5e29ef52d00abe..f99b50c1a3160c9fba902b87d659f3f6f55296c2 100644 (file)
@@ -938,7 +938,7 @@ static switch_status_t tts_file_open(switch_file_handle_t *handle, const char *p
 
        memset(context, 0, sizeof(*context));
        context->flags = SWITCH_SPEECH_FLAG_NONE;
-       if ((status = switch_core_speech_open(&context->sh, module, voice, handle->samplerate, handle->interval, &context->flags, NULL)) == SWITCH_STATUS_SUCCESS) {
+       if ((status = switch_core_speech_open(&context->sh, module, voice, handle->samplerate, handle->interval, handle->channels, &context->flags, NULL)) == SWITCH_STATUS_SUCCESS) {
                if ((status = switch_core_speech_feed_tts(&context->sh, document, &context->flags)) == SWITCH_STATUS_SUCCESS) {
                        handle->channels = 1;
                        handle->samples = 0;