mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
add resampler to speech handles
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12141 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -983,9 +983,8 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
||||
file_sample_len = samples;
|
||||
if (conference->fnode->type == NODE_TYPE_SPEECH) {
|
||||
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_BLOCKING;
|
||||
uint32_t rate = conference->rate;
|
||||
|
||||
if (switch_core_speech_read_tts(conference->fnode->sh, file_frame, &file_data_len, &rate, &flags) == SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_core_speech_read_tts(conference->fnode->sh, file_frame, &file_data_len, &flags) == SWITCH_STATUS_SUCCESS) {
|
||||
file_sample_len = file_data_len / 2;
|
||||
} else {
|
||||
file_sample_len = file_data_len = 0;
|
||||
@@ -1997,9 +1996,8 @@ static void conference_loop_output(conference_member_t *member)
|
||||
} else { /* send the node frame instead of the conference frame to the call leg */
|
||||
if (member->fnode->type == NODE_TYPE_SPEECH) {
|
||||
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_BLOCKING;
|
||||
uint32_t rate = member->conference->rate;
|
||||
|
||||
if (switch_core_speech_read_tts(member->fnode->sh, file_frame, &file_data_len, &rate, &flags) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
if (switch_core_speech_read_tts(member->fnode->sh, file_frame, &file_data_len, &flags) == SWITCH_STATUS_SUCCESS) {
|
||||
file_sample_len = file_data_len / 2;
|
||||
} else {
|
||||
file_sample_len = file_data_len = 0;
|
||||
|
||||
@@ -256,7 +256,7 @@ static void cepstral_speech_flush_tts(switch_speech_handle_t *sh)
|
||||
swift_port_stop(cepstral->port, SWIFT_ASYNC_ANY, SWIFT_EVENT_NOW);
|
||||
}
|
||||
|
||||
static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh, void *data, size_t *datalen, uint32_t *rate, switch_speech_flag_t *flags)
|
||||
static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh, void *data, size_t *datalen, switch_speech_flag_t *flags)
|
||||
{
|
||||
cepstral_t *cepstral;
|
||||
size_t desired = *datalen;
|
||||
|
||||
Reference in New Issue
Block a user