mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-13 02:27:48 +00:00
gsmopen: indent
This commit is contained in:
parent
f97b9ce40c
commit
eb26a9e126
@ -76,7 +76,6 @@
|
|||||||
#endif //WIN32
|
#endif //WIN32
|
||||||
//#include <libteletone.h>
|
//#include <libteletone.h>
|
||||||
|
|
||||||
|
|
||||||
//#include "celliax_spandsp.h"
|
//#include "celliax_spandsp.h"
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -587,7 +586,6 @@ int gsmopen_serial_call(private_t *tech_pvt, char *dstr);
|
|||||||
int gsmopen_serial_call_AT(private_t *tech_pvt, char *dstr);
|
int gsmopen_serial_call_AT(private_t *tech_pvt, char *dstr);
|
||||||
int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text);
|
int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text);
|
||||||
|
|
||||||
|
|
||||||
void gsmopen_store_boost(char *s, double *boost);
|
void gsmopen_store_boost(char *s, double *boost);
|
||||||
int gsmopen_sound_boost(void *data, int samples_num, double boost);
|
int gsmopen_sound_boost(void *data, int samples_num, double boost);
|
||||||
int sms_incoming(private_t *tech_pvt);
|
int sms_incoming(private_t *tech_pvt);
|
||||||
|
@ -2468,7 +2468,6 @@ int gsmopen_senddigit(private_t *tech_pvt, char digit)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
|
int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
|
||||||
{
|
{
|
||||||
//char *idest = data;
|
//char *idest = data;
|
||||||
|
@ -717,17 +717,37 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||||||
}
|
}
|
||||||
// if ((samples = tech_pvt->serialPort_serial_audio->Read((char *) tech_pvt->read_frame.data, 320)) >0)
|
// if ((samples = tech_pvt->serialPort_serial_audio->Read((char *) tech_pvt->read_frame.data, 320)) >0)
|
||||||
|
|
||||||
if ((samples = tech_pvt->serialPort_serial_audio->Read(buffer2, 640)) >= 320) {
|
if ((samples = tech_pvt->serialPort_serial_audio->Read(buffer2, 640)) >= 320) {
|
||||||
|
tech_pvt->buffer2_full = 0;
|
||||||
|
|
||||||
|
if (samples >= 640) {
|
||||||
|
DEBUGA_GSMOPEN("samples=%d\n", GSMOPEN_P_LOG, samples);
|
||||||
|
memcpy(tech_pvt->buffer2, buffer2 + 320, 320);
|
||||||
|
tech_pvt->buffer2_full = 1;
|
||||||
|
}
|
||||||
|
samples = 320;
|
||||||
|
|
||||||
|
memcpy(tech_pvt->read_frame.data, buffer2, 320);
|
||||||
|
tech_pvt->read_frame.datalen = samples;
|
||||||
|
tech_pvt->read_frame.samples = samples / 2;
|
||||||
|
|
||||||
|
tech_pvt->read_frame.timestamp = tech_pvt->timer_read.samplecount;
|
||||||
|
|
||||||
|
*frame = &tech_pvt->read_frame;
|
||||||
|
|
||||||
|
//if ((samples2 = tech_pvt->serialPort_serial_audio->Read((char *) tech_pvt->read_frame.data, 320)) >0){
|
||||||
|
// WARNINGA("samples2=%d\n", GSMOPEN_P_LOG, samples2);
|
||||||
|
//}
|
||||||
|
//status = SWITCH_STATUS_SUCCESS;
|
||||||
|
switch_set_flag(tech_pvt, TFLAG_VOICE);
|
||||||
|
} else {
|
||||||
|
DEBUGA_GSMOPEN("MINGA samples=%d\n", GSMOPEN_P_LOG, samples);
|
||||||
|
if (tech_pvt->buffer2_full) {
|
||||||
|
memcpy(tech_pvt->read_frame.data, tech_pvt->buffer2, 320);
|
||||||
tech_pvt->buffer2_full = 0;
|
tech_pvt->buffer2_full = 0;
|
||||||
|
|
||||||
if (samples >= 640) {
|
|
||||||
DEBUGA_GSMOPEN("samples=%d\n", GSMOPEN_P_LOG, samples);
|
|
||||||
memcpy(tech_pvt->buffer2, buffer2 + 320, 320);
|
|
||||||
tech_pvt->buffer2_full = 1;
|
|
||||||
}
|
|
||||||
samples = 320;
|
samples = 320;
|
||||||
|
DEBUGA_GSMOPEN("samples=%d FROM BUFFER\n", GSMOPEN_P_LOG, samples);
|
||||||
|
|
||||||
memcpy(tech_pvt->read_frame.data, buffer2, 320);
|
|
||||||
tech_pvt->read_frame.datalen = samples;
|
tech_pvt->read_frame.datalen = samples;
|
||||||
tech_pvt->read_frame.samples = samples / 2;
|
tech_pvt->read_frame.samples = samples / 2;
|
||||||
|
|
||||||
@ -740,29 +760,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||||||
//}
|
//}
|
||||||
//status = SWITCH_STATUS_SUCCESS;
|
//status = SWITCH_STATUS_SUCCESS;
|
||||||
switch_set_flag(tech_pvt, TFLAG_VOICE);
|
switch_set_flag(tech_pvt, TFLAG_VOICE);
|
||||||
} else {
|
|
||||||
DEBUGA_GSMOPEN("MINGA samples=%d\n", GSMOPEN_P_LOG, samples);
|
|
||||||
if (tech_pvt->buffer2_full) {
|
|
||||||
memcpy(tech_pvt->read_frame.data, tech_pvt->buffer2, 320);
|
|
||||||
tech_pvt->buffer2_full = 0;
|
|
||||||
samples = 320;
|
|
||||||
DEBUGA_GSMOPEN("samples=%d FROM BUFFER\n", GSMOPEN_P_LOG, samples);
|
|
||||||
|
|
||||||
tech_pvt->read_frame.datalen = samples;
|
|
||||||
tech_pvt->read_frame.samples = samples / 2;
|
|
||||||
|
|
||||||
tech_pvt->read_frame.timestamp = tech_pvt->timer_read.samplecount;
|
|
||||||
|
|
||||||
*frame = &tech_pvt->read_frame;
|
|
||||||
|
|
||||||
//if ((samples2 = tech_pvt->serialPort_serial_audio->Read((char *) tech_pvt->read_frame.data, 320)) >0){
|
|
||||||
// WARNINGA("samples2=%d\n", GSMOPEN_P_LOG, samples2);
|
|
||||||
//}
|
|
||||||
//status = SWITCH_STATUS_SUCCESS;
|
|
||||||
switch_set_flag(tech_pvt, TFLAG_VOICE);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
//WARNINGA("samples=%d\n", GSMOPEN_P_LOG, samples);
|
//WARNINGA("samples=%d\n", GSMOPEN_P_LOG, samples);
|
||||||
if (samples != 320) {
|
if (samples != 320) {
|
||||||
DEBUGA_GSMOPEN("samples=%d\n", GSMOPEN_P_LOG, samples);
|
DEBUGA_GSMOPEN("samples=%d\n", GSMOPEN_P_LOG, samples);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user