gsmopen: windows now works
This commit is contained in:
parent
d9338ee28c
commit
eaa37c3e41
|
@ -642,7 +642,7 @@ int alarm_event(private_t * tech_pvt, int alarm_code, const char *alarm_message)
|
|||
int dump_event_full(private_t * tech_pvt, int is_alarm, int alarm_code, const char *alarm_message);
|
||||
|
||||
|
||||
int gsmopen_serial_init_audio_port(private_t * tech_pvt, speed_t controldevice_audio_speed);
|
||||
int gsmopen_serial_init_audio_port(private_t * tech_pvt, int controldevice_audio_speed);
|
||||
int serial_audio_init(private_t * tech_pvt);
|
||||
int serial_audio_shutdown(private_t * tech_pvt);
|
||||
|
||||
|
|
|
@ -55,12 +55,12 @@ int gettimeofday(struct timeval *tv, struct sk_timezone *tz)
|
|||
/***************/
|
||||
#endif /* WIN32 */
|
||||
|
||||
int gsmopen_serial_init(private_t * tech_pvt, speed_t controldevice_speed)
|
||||
int gsmopen_serial_init(private_t * tech_pvt, int controldevice_speed)
|
||||
{
|
||||
|
||||
tech_pvt->serialPort_serial_control = new ctb::SerialPort();
|
||||
|
||||
if( tech_pvt->serialPort_serial_control->Open( "/dev/ttyUSB3", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
|
||||
if( tech_pvt->serialPort_serial_control->Open( "COM9", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
|
||||
ERRORA("port SUCCESS open\n", GSMOPEN_P_LOG);
|
||||
} else {
|
||||
ERRORA("port NOT open\n", GSMOPEN_P_LOG);
|
||||
|
@ -3574,11 +3574,11 @@ int gsmopen_serial_getstatus_AT(private_t * tech_pvt)
|
|||
}
|
||||
|
||||
|
||||
int gsmopen_serial_init_audio_port(private_t * tech_pvt, speed_t controldevice_audio_speed)
|
||||
int gsmopen_serial_init_audio_port(private_t * tech_pvt, int controldevice_audio_speed)
|
||||
{
|
||||
tech_pvt->serialPort_serial_audio = new ctb::SerialPort();
|
||||
|
||||
if( tech_pvt->serialPort_serial_audio->Open( "/dev/ttyUSB2", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
|
||||
if( tech_pvt->serialPort_serial_audio->Open( "COM8", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
|
||||
ERRORA("port SUCCESS open\n", GSMOPEN_P_LOG);
|
||||
} else {
|
||||
ERRORA("port NOT open\n", GSMOPEN_P_LOG);
|
||||
|
|
|
@ -44,7 +44,7 @@ INSTALLDIR = $(WXWIN)
|
|||
|
||||
### Variables: ###
|
||||
|
||||
CTB_LIB_CXXFLAGS = /MT$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
|
||||
CTB_LIB_CXXFLAGS = /MD$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
|
||||
$(______DEBUG) /Fd..\lib\ctb$(LIBFLAG)$(GPIBFLAG)-0.16.pdb \
|
||||
$(__OPTIMIZE_FLAG) /I..\include /GR /EHsc $(CPPFLAGS) $(CXXFLAGS)
|
||||
CTB_LIB_OBJECTS = \
|
||||
|
@ -56,7 +56,7 @@ CTB_LIB_OBJECTS = \
|
|||
$(OUTPUT)\ctb_lib_serport.obj \
|
||||
$(OUTPUT)\ctb_lib_timer.obj \
|
||||
$(____GPIBSRC_FILENAMES_OBJECTS)
|
||||
CTB_DLL_CXXFLAGS = /MT$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
|
||||
CTB_DLL_CXXFLAGS = /MD$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
|
||||
$(______DEBUG) /Fd..\lib\ctb$(LIBFLAG)$(GPIBFLAG)-0.16.pdb \
|
||||
$(__OPTIMIZE_FLAG) /I..\include /GR /EHsc $(CPPFLAGS) $(CXXFLAGS)
|
||||
CTB_DLL_OBJECTS = \
|
||||
|
@ -68,7 +68,7 @@ CTB_DLL_OBJECTS = \
|
|||
$(OUTPUT)\ctb_dll_serport.obj \
|
||||
$(OUTPUT)\ctb_dll_timer.obj \
|
||||
$(____GPIBSRC_FILENAMES_1_OBJECTS)
|
||||
CTBTEST_CXXFLAGS = /MT$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
|
||||
CTBTEST_CXXFLAGS = /MD$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
|
||||
$(______DEBUG) /Fd$(OUTPUT)\ctbtest.pdb /DGPIB=$(GPIB) $(__OPTIMIZE_FLAG) \
|
||||
/I..\include /GR /EHsc $(CPPFLAGS) $(CXXFLAGS)
|
||||
CTBTEST_OBJECTS = \
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""gsmlib\gsmlib-1.10-patched-12ubuntu1";"$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
|
||||
AdditionalIncludeDirectories=""libctb-0.16\include";"$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
|
||||
PreprocessorDefinitions="NO_ALSA"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
|
@ -56,9 +56,9 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions=" gsmlib.lib "..\..\..\..\w32\library\debug\freeswitchcore.lib" "..\..\..\..\libs\libteletone\Debug\libteletone.lib" ksuser.lib "..\..\..\..\libs\win32\apr\debug\libapr-1.lib"
rpcrt4.lib "..\..\..\..\debug\libtiff.lib" "..\..\..\..\libs\spandsp\src\debug\spandsp.lib""
|
||||
AdditionalOptions=" ctbd-0.16.lib "..\..\..\..\w32\library\debug\freeswitchcore.lib" "..\..\..\..\libs\libteletone\Debug\libteletone.lib" ksuser.lib "..\..\..\..\libs\win32\apr\debug\libapr-1.lib"
rpcrt4.lib "..\..\..\..\debug\libtiff.lib" "..\..\..\..\libs\spandsp\src\debug\spandsp.lib""
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""gsmlib/gsmlib-1.10-patched-12ubuntu1/win32/Debug/""
|
||||
AdditionalLibraryDirectories=""libctb-0.16\lib""
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
/>
|
||||
|
|
|
@ -919,7 +919,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||
*frame = &tech_pvt->read_frame;
|
||||
#ifdef BIGENDIAN
|
||||
if (switch_test_flag(tech_pvt, TFLAG_LINEAR)) {
|
||||
switch_swap_linear((*frame)->data, (int) (*frame)->datalen / 2);
|
||||
switch_swap_linear((int16_t *)(*frame)->data, (int) (*frame)->datalen / 2);
|
||||
}
|
||||
#endif
|
||||
//WARNINGA("HERE\n", GSMOPEN_P_LOG);
|
||||
|
|
Loading…
Reference in New Issue