mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
Merge branch 'master' into v1.2.stable
Conflicts: libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c
This commit is contained in:
commit
9b341fd8fd
5
.gitignore
vendored
5
.gitignore
vendored
@ -171,6 +171,8 @@ BuildLog.htm
|
||||
Win32/
|
||||
win32/
|
||||
!/libs/win32/
|
||||
!/libs/speex/win32/
|
||||
!/src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/win32/
|
||||
*.suo
|
||||
*.sdf
|
||||
x64/
|
||||
@ -182,3 +184,6 @@ ipch/
|
||||
/w32/Setup/obj
|
||||
*dSYM*
|
||||
/libs/xmlrpc-c/lib/expat/xmltok/nametab.h
|
||||
|
||||
/UpgradeLog.*
|
||||
/_UpgradeReport_Files/
|
||||
|
@ -434,7 +434,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16khz", "libs\win32\Sound_F
|
||||
{87A1FE3D-F410-4C8E-9591-8C625985BC70} = {87A1FE3D-F410-4C8E-9591-8C625985BC70}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khzsound", "libs\win32\Dowload 32khz Sounds.2008.vcproj", "{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khzsound", "libs\win32\Download 32khz Sounds.2008.vcproj", "{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz", "libs\win32\Sound_Files\32khz.2008.vcproj", "{464AAB78-5489-4916-BE51-BF8D61822311}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
@ -579,7 +579,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "libs\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "libs\spandsp\src\msvc\make_modem_filter.2008.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Dowload 32khz music.2008.vcproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Download 32khz music.2008.vcproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 8khz music", "libs\win32\Download 8khz music.2008.vcproj", "{4F5C9D55-98EF-4256-8311-32D7BD360406}"
|
||||
EndProject
|
||||
|
5925
Freeswitch.2008.sln
5925
Freeswitch.2008.sln
File diff suppressed because it is too large
Load Diff
@ -168,7 +168,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "8khz", "libs\win32\Sound_Fi
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16khz", "libs\win32\Sound_Files\16khz.2010.vcxproj", "{7EB71250-F002-4ED8-92CA-CA218114537A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khzsound", "libs\win32\Dowload 32khz Sounds.2010.vcxproj", "{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khzsound", "libs\win32\Download 32khz Sounds.2010.vcxproj", "{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz", "libs\win32\Sound_Files\32khz.2010.vcxproj", "{464AAB78-5489-4916-BE51-BF8D61822311}"
|
||||
EndProject
|
||||
@ -245,7 +245,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spy", "src\mod\applicat
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skypopen", "src\mod\endpoints\mod_skypopen\mod_skypopen.2010.vcxproj", "{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Dowload 32khz music.2010.vcxproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Download 32khz music.2010.vcxproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 8khz music", "libs\win32\Download 8khz music.2010.vcxproj", "{4F5C9D55-98EF-4256-8311-32D7BD360406}"
|
||||
EndProject
|
||||
|
@ -338,7 +338,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "8khz", "libs\win32\Sound_Fi
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16khz", "libs\win32\Sound_Files\16khz.2010.vcxproj", "{7EB71250-F002-4ED8-92CA-CA218114537A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khzsound", "libs\win32\Dowload 32khz Sounds.2010.vcxproj", "{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khzsound", "libs\win32\Download 32khz Sounds.2010.vcxproj", "{6E49F6C2-ADDA-4BFB-81FE-AB9AF51B455F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz", "libs\win32\Sound_Files\32khz.2010.vcxproj", "{464AAB78-5489-4916-BE51-BF8D61822311}"
|
||||
EndProject
|
||||
@ -416,7 +416,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skel", "src\mod\applica
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skypopen", "src\mod\endpoints\mod_skypopen\mod_skypopen.2010.vcxproj", "{C6E78A4C-DB1E-47F4-9B63-4DC27D86343F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Dowload 32khz music.2010.vcxproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 32khz music", "libs\win32\Download 32khz music.2010.vcxproj", "{1F0A8A77-E661-418F-BB92-82172AE43803}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download 8khz music", "libs\win32\Download 8khz music.2010.vcxproj", "{4F5C9D55-98EF-4256-8311-32D7BD360406}"
|
||||
EndProject
|
||||
@ -1058,22 +1058,22 @@ Global
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|x64.Build.0 = Release|x64
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|x64 Setup.ActiveCfg = Release|x64
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|x86 Setup.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|Win32.ActiveCfg = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64.ActiveCfg = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64.Build.0 = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64.Build.0 = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64 Setup.ActiveCfg = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64 Setup.Build.0 = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x86 Setup.ActiveCfg = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64.Build.0 = Debug|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64.Build.0 = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64 Setup.ActiveCfg = Debug|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x86 Setup.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.Build.0 = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64.ActiveCfg = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64.Build.0 = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64.Build.0 = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64 Setup.ActiveCfg = Release|x64
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x86 Setup.ActiveCfg = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|Win32.ActiveCfg = Release|x64
|
||||
|
3958
Freeswitch.2012.sln
Normal file
3958
Freeswitch.2012.sln
Normal file
File diff suppressed because it is too large
Load Diff
20
Makefile.am
20
Makefile.am
@ -3,8 +3,8 @@ SUBDIRS = . src
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
NAME = freeswitch
|
||||
|
||||
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
|
||||
AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS)
|
||||
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(SWITCH_ANSI_CFLAGS)
|
||||
AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -Ilibs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip -Ilibs/sofia-sip/libsofia-sip-ua/su
|
||||
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
|
||||
|
||||
DEFAULT_SOUNDS=en-us-callie-8000
|
||||
@ -159,11 +159,11 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/libzrtp/third_party/bgaes
|
||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/libzrtp/third_party/bnlib
|
||||
CORE_CFLAGS += -isystem $(switch_srcdir)/libs/libzrtp/include
|
||||
ZRTP_LDFLAGS = -L$(switch_srcdir)/libs/libzrtp/third_party/bnlib
|
||||
ZRTP_LDFLAGS += -L$(switch_srcdir)/libs/libzrtp/projects/gnu/build
|
||||
ZRTP_LDFLAGS += -L$(switch_srcdir)/libs/libzrtp
|
||||
ZRTP_LIBS = -lbn -lzrtp
|
||||
libfreeswitch_la_LDFLAGS += $(ZRTP_LDFLAGS)
|
||||
libfreeswitch_la_LIBADD += $(ZRTP_LIBS)
|
||||
CORE_LIBS += libs/libzrtp/projects/gnu/build/libzrtp.a
|
||||
CORE_LIBS += libs/libzrtp/libzrtp.a
|
||||
LIBS += libs/libzrtp/third_party/bnlib/libbn.a
|
||||
endif
|
||||
|
||||
@ -441,8 +441,16 @@ src/include/switch_version.h: src/include/switch_version.h.in Makefile build/pri
|
||||
libs/libedit/src/.libs/libedit.a:
|
||||
cd libs/libedit && $(MAKE)
|
||||
|
||||
libs/libzrtp/projects/gnu/build/libzrtp.a:
|
||||
cd libs/libzrtp/projects/gnu && $(MAKE)
|
||||
libs/libzrtp/libzrtp.a:
|
||||
cd libs/libzrtp && $(MAKE)
|
||||
|
||||
libs/sofia-sip/Makefile:
|
||||
cd libs/sofia-sip && sh ./configure.gnu --prefix=$(prefix)
|
||||
|
||||
libs/sofia-sip/libsofia-sip-ua/sdp/.libs/libsdp.a libs/sofia-sip/libsofia-sip-ua/su/.libs/libsu.a: libs/sofia-sip/.update libs/sofia-sip/Makefile
|
||||
@cd libs/sofia-sip && $(MAKE) noop
|
||||
@cd libs/sofia-sip && $(MAKE) SOFIA_CFLAGS="$(SWITCH_AM_CFLAGS)"
|
||||
@$(TOUCH_TARGET)
|
||||
|
||||
libs/curl/Makefile:
|
||||
cd libs/curl && sh ./configure.gnu --prefix=$(prefix)
|
||||
|
@ -347,7 +347,7 @@ bootstrap_apr() {
|
||||
}
|
||||
|
||||
bootstrap_libzrtp() {
|
||||
(cd ${LIBDIR}/libzrtp/projects/gnu && ./bootstrap.sh)
|
||||
(cd ${LIBDIR}/libzrtp && ./bootstrap.sh)
|
||||
}
|
||||
|
||||
# Libs automake automation function
|
||||
|
@ -48,6 +48,7 @@
|
||||
<!-- Applications -->
|
||||
<load module="mod_commands"/>
|
||||
<load module="mod_conference"/>
|
||||
<!-- load module="mod_curl" -->
|
||||
<load module="mod_db"/>
|
||||
<load module="mod_dptools"/>
|
||||
<load module="mod_expr"/>
|
||||
|
@ -26,6 +26,7 @@
|
||||
<api name="msg_get" value="vm_fsdb_msg_get" />
|
||||
<api name="msg_forward" value="vm_fsdb_msg_forward" />
|
||||
<api name="pref_greeting_set" value="vm_fsdb_pref_greeting_set" />
|
||||
<api name="pref_greeting_get" value="vm_fsdb_pref_greeting_get" />
|
||||
<api name="pref_recname_set" value="vm_fsdb_pref_recname_set" />
|
||||
<api name="pref_password_set" value="vm_fsdb_pref_password_set" />
|
||||
</apis>
|
||||
@ -57,11 +58,14 @@
|
||||
</menu>
|
||||
|
||||
<menu name="std_main_menu">
|
||||
<settings>
|
||||
<param name="Action-On-New-Message" value="new_msg:std_navigator" />
|
||||
</settings>
|
||||
<phrases>
|
||||
<phrase name="msg_count" value="message_count@mtvoicemail" />
|
||||
<phrase name="say_date" value="say_date_event@mtvoicemail" />
|
||||
<phrase name="say_msg_number" value="say_message_number@mtvoicemail" />
|
||||
<phrase name="menu_options" value="menu@mtvoicemail" />
|
||||
<phrase name="msg_count" value="message_count@voicemail_ivr" />
|
||||
<phrase name="say_date" value="say_date_event@voicemail_ivr" />
|
||||
<phrase name="say_msg_number" value="say_message_number@voicemail_ivr" />
|
||||
<phrase name="menu_options" value="menu@voicemail_ivr" />
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="new_msg:std_navigator" variable="VM-Key-Play-New-Messages" />
|
||||
@ -89,9 +93,8 @@
|
||||
<key dtmf="4" action="prev_msg" />
|
||||
<key dtmf="7" action="delete_msg" variable="VM-Key-Main-Delete-File" /> <!-- Same key for undelete if it already deleted -->
|
||||
<key dtmf="8" action="menu:std_forward" variable="VM-Key-Main-Forward" />
|
||||
<key dtmf="3" action="save_msg" variable="VM-Key-Main-Save-File" />
|
||||
<key dtmf="2" action="callback" variable="VM-Key-Main-Callback" />
|
||||
<key dtmf="5" action="menu:std_preference" />
|
||||
<key dtmf="2" action="save_msg" variable="VM-Key-Main-Save-File" />
|
||||
<key dtmf="5" action="callback" variable="VM-Key-Main-Callback" />
|
||||
<key dtmf="#" action="return" /> <!-- TODO Might Conflict with future fast-forward -->
|
||||
</keys>
|
||||
</menu>
|
||||
@ -105,7 +108,7 @@
|
||||
<key dtmf="2" action="menu:std_select_greeting_slot" variable="VM-Key-Choose-Greeting" />
|
||||
<key dtmf="3" action="menu:std_record_name" variable="VM-Key-Record-Name" />
|
||||
<key dtmf="6" action="menu:std_set_password" variable="VM-Key-Change-Password" />
|
||||
<key dtmf="#" action="return" variable="VM-Key-Main-Menu" />
|
||||
<key dtmf="0" action="return" variable="VM-Key-Main-Menu" />
|
||||
</keys>
|
||||
</menu>
|
||||
|
||||
@ -117,7 +120,7 @@
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
|
||||
<key dtmf="3" action="save" variable="VM-Key-Save-File" />
|
||||
<key dtmf="2" action="save" variable="VM-Key-Save-File" />
|
||||
<key dtmf="4" action="rerecord" variable="VM-Key-ReRecord-File" />
|
||||
<key dtmf="#" action="skip_instruction" />
|
||||
</keys>
|
||||
@ -132,7 +135,7 @@
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
|
||||
<key dtmf="3" action="save" variable="VM-Key-Save-File" />
|
||||
<key dtmf="2" action="save" variable="VM-Key-Save-File" />
|
||||
<key dtmf="4" action="rerecord" variable="VM-Key-ReRecord-File" />
|
||||
<key dtmf="#" action="skip_instruction" />
|
||||
</keys>
|
||||
@ -146,7 +149,7 @@
|
||||
</phrases>
|
||||
<keys>
|
||||
<key dtmf="1" action="listen" variable="VM-Key-Listen-File" />
|
||||
<key dtmf="3" action="save" variable="VM-Key-Save-File" />
|
||||
<key dtmf="2" action="save" variable="VM-Key-Save-File" />
|
||||
<key dtmf="4" action="rerecord" variable="VM-Key-ReRecord-File" />
|
||||
<key dtmf="#" action="skip_instruction" />
|
||||
</keys>
|
||||
|
@ -11,8 +11,8 @@
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="plurial_msg">
|
||||
<input pattern="^[01]:(.*):(.*)$" break_on_match="true">
|
||||
<macro name="plural_msg">
|
||||
<input pattern="^[1]:(.*):(.*)$" break_on_match="true">
|
||||
<match>
|
||||
<action function="play-file" data="$1"/>
|
||||
</match>
|
||||
@ -89,7 +89,7 @@
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="${VM-Total-New-Urgent-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-urgent-new.wav"/>
|
||||
<action function="phrase" phrase="plurial_msg@voicemail_ivr" data="${VM-Total-New-Urgent-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
<action function="phrase" phrase="plural_msg@voicemail_ivr" data="${VM-Total-New-Urgent-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input field="${VM-Total-New-Messages}" pattern="^(\d+)$">
|
||||
@ -97,7 +97,7 @@
|
||||
<action function="play-file" data="voicemail/vm-you_have.wav"/>
|
||||
<action function="say" data="${VM-Total-New-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-new.wav"/>
|
||||
<action function="phrase" phrase="plurial_msg@voicemail_ivr" data="${VM-Total-New-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
<action function="phrase" phrase="plural_msg@voicemail_ivr" data="${VM-Total-New-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</match>
|
||||
</input>
|
||||
<input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
|
||||
@ -105,16 +105,24 @@
|
||||
<action function="play-file" data="currency/and.wav"/>
|
||||
<action function="say" data="${VM-Total-Saved-Messages}" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-saved.wav"/>
|
||||
<action function="phrase" phrase="plurial_msg@voicemail_ivr" data="${VM-Total-Saved-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
<action function="phrase" phrase="plural_msg@voicemail_ivr" data="${VM-Total-Saved-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
</macro>
|
||||
|
||||
<macro name="menu">
|
||||
<input>
|
||||
<match>
|
||||
<input field="${VM-Total-New-Messages}" pattern="^(0)$">
|
||||
<nomatch>
|
||||
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Play-New-Messages}:voicemail/vm-listen_new.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
|
||||
<nomatch>
|
||||
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Play-Saved-Messages}:voicemail/vm-listen_saved.wav"/>
|
||||
</nomatch>
|
||||
</input>
|
||||
<input>
|
||||
<match>
|
||||
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Config-Menu}:voicemail/vm-advanced.wav"/>
|
||||
<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Terminator}:voicemail/vm-to_exit.wav"/>
|
||||
</match>
|
||||
@ -264,6 +272,7 @@
|
||||
<macro name="greeting_selected">
|
||||
<input pattern="^(\d+)$">
|
||||
<match>
|
||||
<action function="play-file" data="${VM-Preference-Greeting-File-Path}"/>
|
||||
<action function="play-file" data="voicemail/vm-greeting.wav"/>
|
||||
<action function="say" data="$1" method="pronounced" type="items"/>
|
||||
<action function="play-file" data="voicemail/vm-selected.wav"/>
|
||||
|
@ -231,6 +231,7 @@
|
||||
<X-PRE-PROCESS cmd="set" data="uk-ring=%(400,200,400,450);%(400,2000,400,450)"/>
|
||||
<X-PRE-PROCESS cmd="set" data="us-ring=%(2000,4000,440,480)"/>
|
||||
<X-PRE-PROCESS cmd="set" data="bong-ring=v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1400,0,350,440)"/>
|
||||
<X-PRE-PROCESS cmd="set" data="beep=%(1000,0,640)"/>
|
||||
<X-PRE-PROCESS cmd="set" data="sit=%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)"/>
|
||||
<!--
|
||||
Setting up your default sip provider is easy.
|
||||
|
@ -941,6 +941,8 @@ SAC_OPENSSL
|
||||
if test x$HAVE_OPENSSL = x1; then
|
||||
openssl_CFLAGS="$openssl_CFLAGS -DHAVE_OPENSSL";
|
||||
APR_ADDTO(SWITCH_AM_CFLAGS, -DHAVE_OPENSSL)
|
||||
AC_CHECK_LIB(ssl, SSL_CTX_set_tlsext_use_srtp, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS_SRTP, 1, HAVE_OPENSSL_DTLS_SRTP))
|
||||
AC_CHECK_LIB(ssl, DTLSv1_method, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS, 1, HAVE_OPENSSL_DTLS))
|
||||
fi
|
||||
|
||||
AX_CHECK_JAVA
|
||||
@ -1105,6 +1107,7 @@ AC_CONFIG_FILES([Makefile
|
||||
libs/xmlrpc-c/config.mk
|
||||
libs/xmlrpc-c/srcdir.mk
|
||||
libs/xmlrpc-c/stamp-h
|
||||
libs/sipcc/Makefile
|
||||
scripts/gentls_cert])
|
||||
|
||||
AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
|
||||
@ -1178,7 +1181,7 @@ AC_CONFIG_SUBDIRS([libs/libg722_1])
|
||||
AC_CONFIG_SUBDIRS([libs/silk])
|
||||
AC_CONFIG_SUBDIRS([libs/libcodec2])
|
||||
if test "x${enable_zrtp}" = "xyes"; then
|
||||
AC_CONFIG_SUBDIRS([libs/libzrtp/projects/gnu])
|
||||
AC_CONFIG_SUBDIRS([libs/libzrtp])
|
||||
fi
|
||||
AC_CONFIG_SUBDIRS([libs/libwebsockets])
|
||||
|
||||
|
1
debian/.gitignore
vendored
1
debian/.gitignore
vendored
@ -8,6 +8,7 @@
|
||||
/freeswitch-autotools.install
|
||||
/freeswitch-mod-*.install
|
||||
/freeswitch-conf-*.install
|
||||
/freeswitch-lang-*.install
|
||||
/freeswitch-music-*.install
|
||||
/freeswitch-sounds-*.install
|
||||
/*.lintian-overrides
|
||||
|
26
debian/AUTHORS
vendored
Normal file
26
debian/AUTHORS
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
This Debian packaging was written in 2012 by:
|
||||
|
||||
Travis Cross <tc@traviscross.com>
|
||||
|
||||
For copyright claims over this packaging and other software, see
|
||||
debian/copyright.
|
||||
|
||||
Current maintainer: Travis Cross <tc@traviscross.com>
|
||||
Bug reports: http://jira.freeswitch.org/ (assign to maintainer)
|
||||
Security related bug reports: [email to maintainer]
|
||||
|
||||
# Acknowledgments
|
||||
|
||||
Thanks-to: Anthony Minessale <anthm@freeswitch.org>
|
||||
Thanks-to: Michael Jerris <mike@jerris.com>
|
||||
# for creating a project worth packaging and for periodic tweaks
|
||||
|
||||
Thanks-to: Philip Hands <phil@hands.com>
|
||||
# for documenting our project's tangle of copyrights
|
||||
|
||||
Thanks-to: Steven Ayre <steveayre@gmail.com>
|
||||
# for assistance with various module dependencies
|
||||
|
||||
Thanks-to: William King <william.king@quentustech.com>
|
||||
# for moral support and small tweaks
|
||||
|
82
debian/bootstrap.sh
vendored
82
debian/bootstrap.sh
vendored
@ -4,6 +4,7 @@
|
||||
|
||||
mod_dir="../src/mod"
|
||||
conf_dir="../conf"
|
||||
lang_dir="../conf/vanilla/lang"
|
||||
fs_description="FreeSWITCH is a scalable open source cross-platform telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media."
|
||||
mod_build_depends="."
|
||||
supported_distros="squeeze wheezy sid"
|
||||
@ -35,12 +36,8 @@ avoid_mods=(
|
||||
xml_int/mod_xml_radius
|
||||
)
|
||||
avoid_mods_sid=(
|
||||
endpoints/mod_portaudio
|
||||
formats/mod_portaudio_stream
|
||||
)
|
||||
avoid_mods_wheezy=(
|
||||
endpoints/mod_portaudio
|
||||
formats/mod_portaudio_stream
|
||||
)
|
||||
avoid_mods_squeeze=(
|
||||
formats/mod_vlc
|
||||
@ -158,6 +155,16 @@ map_confs () {
|
||||
done
|
||||
}
|
||||
|
||||
map_langs () {
|
||||
local fs="$1"
|
||||
for x in $lang_dir/*; do
|
||||
test ! -d $x && continue
|
||||
lang=${x##*/} lang_dir=$x
|
||||
for f in $fs; do $f; done
|
||||
unset lang lang_dir
|
||||
done
|
||||
}
|
||||
|
||||
print_source_control () {
|
||||
cat <<EOF
|
||||
Source: freeswitch
|
||||
@ -223,6 +230,7 @@ Recommends:
|
||||
freeswitch-doc (= \${binary:Version}),
|
||||
freeswitch-mod-commands (= \${binary:Version}),
|
||||
freeswitch-init (= \${binary:Version}),
|
||||
freeswitch-lang (= \${binary:Version}),
|
||||
freeswitch-music (= \${binary:Version}),
|
||||
freeswitch-sounds (= \${binary:Version})
|
||||
Suggests:
|
||||
@ -254,6 +262,7 @@ Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
|
||||
freeswitch-mod-say-en (= \${binary:Version})
|
||||
Recommends:
|
||||
freeswitch-init (= \${binary:Version}),
|
||||
freeswitch-lang (= \${binary:Version}),
|
||||
freeswitch-meta-codecs (= \${binary:Version}),
|
||||
freeswitch-music (= \${binary:Version}),
|
||||
freeswitch-sounds (= \${binary:Version})
|
||||
@ -309,6 +318,7 @@ Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
|
||||
freeswitch-mod-say-en (= \${binary:Version}),
|
||||
Recommends:
|
||||
freeswitch-init (= \${binary:Version}),
|
||||
freeswitch-lang (= \${binary:Version}),
|
||||
freeswitch-music (= \${binary:Version}),
|
||||
freeswitch-sounds (= \${binary:Version}),
|
||||
freeswitch-conf-vanilla (= \${binary:Version}),
|
||||
@ -325,6 +335,7 @@ Architecture: any
|
||||
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
|
||||
Recommends:
|
||||
freeswitch-init (= \${binary:Version}),
|
||||
freeswitch-lang (= \${binary:Version}),
|
||||
freeswitch-meta-codecs (= \${binary:Version}),
|
||||
freeswitch-music (= \${binary:Version}),
|
||||
freeswitch-sounds (= \${binary:Version}),
|
||||
@ -369,6 +380,7 @@ Recommends:
|
||||
freeswitch-mod-vmd (= \${binary:Version}),
|
||||
freeswitch-mod-voicemail (= \${binary:Version}),
|
||||
freeswitch-mod-voicemail-ivr (= \${binary:Version}),
|
||||
freeswitch-mod-flite (= \${binary:Version}),
|
||||
freeswitch-mod-pocketsphinx (= \${binary:Version}),
|
||||
freeswitch-mod-tts-commandline (= \${binary:Version}),
|
||||
freeswitch-mod-dialplan-xml (= \${binary:Version}),
|
||||
@ -406,6 +418,7 @@ Architecture: any
|
||||
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
|
||||
Recommends:
|
||||
freeswitch-init (= \${binary:Version}),
|
||||
freeswitch-lang (= \${binary:Version}),
|
||||
freeswitch-meta-codecs (= \${binary:Version}),
|
||||
freeswitch-music (= \${binary:Version}),
|
||||
freeswitch-sounds (= \${binary:Version}),
|
||||
@ -454,6 +467,7 @@ Recommends:
|
||||
freeswitch-mod-vmd (= \${binary:Version}),
|
||||
freeswitch-mod-voicemail (= \${binary:Version}),
|
||||
freeswitch-mod-voicemail-ivr (= \${binary:Version}),
|
||||
freeswitch-mod-flite (= \${binary:Version}),
|
||||
freeswitch-mod-pocketsphinx (= \${binary:Version}),
|
||||
freeswitch-mod-tts-commandline (= \${binary:Version}),
|
||||
freeswitch-mod-dialplan-asterisk (= \${binary:Version}),
|
||||
@ -617,6 +631,18 @@ Description: FreeSWITCH systemd configuration
|
||||
|
||||
## misc
|
||||
|
||||
## languages
|
||||
|
||||
Package: freeswitch-lang
|
||||
Architecture: all
|
||||
Depends: \${misc:Depends},
|
||||
freeswitch-lang-en (= \${binary:Version})
|
||||
Description: Language files for FreeSWITCH
|
||||
$(debian_wrap "${fs_description}")
|
||||
.
|
||||
This is a metapackage which depends on the default language packages
|
||||
for FreeSWITCH.
|
||||
|
||||
## sounds
|
||||
|
||||
Package: freeswitch-music
|
||||
@ -762,6 +788,40 @@ conf/${conf} /usr/share/freeswitch/conf
|
||||
EOF
|
||||
}
|
||||
|
||||
print_lang_overrides () {
|
||||
print_common_overrides "$1"
|
||||
}
|
||||
|
||||
print_lang_control () {
|
||||
local lang_name="$(echo ${lang} | tr '[:lower:]' '[:upper:]')"
|
||||
case "${lang}" in
|
||||
de) lang_name="German" ;;
|
||||
en) lang_name="English" ;;
|
||||
es) lang_name="Spanish" ;;
|
||||
fr) lang_name="French" ;;
|
||||
he) lang_name="Hebrew" ;;
|
||||
pt) lang_name="Portuguese" ;;
|
||||
ru) lang_name="Russian" ;;
|
||||
esac
|
||||
cat <<EOF
|
||||
Package: freeswitch-lang-${lang//_/-}
|
||||
Architecture: all
|
||||
Depends: \${misc:Depends}
|
||||
Recommends: freeswitch-sounds-en-${lang} (= \${binary:Version})
|
||||
Description: ${lang_name} language files for FreeSWITCH
|
||||
$(debian_wrap "${fs_description}")
|
||||
.
|
||||
$(debian_wrap "This package includes the ${lang_name} language files for FreeSWITCH.")
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
print_lang_install () {
|
||||
cat <<EOF
|
||||
conf/vanilla/lang/${lang} /usr/share/freeswitch/lang
|
||||
EOF
|
||||
}
|
||||
|
||||
print_edit_warning () {
|
||||
echo "#### Do not edit! This file is auto-generated from debian/bootstrap.sh."; echo
|
||||
}
|
||||
@ -805,6 +865,17 @@ genconf () {
|
||||
test -f $f.tmpl && cat $f.tmpl >> $f
|
||||
}
|
||||
|
||||
genlang () {
|
||||
print_lang_control >> control
|
||||
local p=freeswitch-lang-${lang//_/-}
|
||||
local f=$p.install
|
||||
(print_edit_warning; print_lang_install) > $f
|
||||
test -f $f.tmpl && cat $f.tmpl >> $f
|
||||
local f=$p.lintian-overrides
|
||||
(print_edit_warning; print_lang_overrides "$p") > $f
|
||||
test -f $f.tmpl && cat $f.tmpl >> $f
|
||||
}
|
||||
|
||||
accumulate_build_depends () {
|
||||
local x=""
|
||||
if [ -n "$(eval echo \$build_depends_$codename)" ]; then
|
||||
@ -977,6 +1048,9 @@ echo "Generating debian/..." >&2
|
||||
echo "Generating debian/ (conf)..." >&2
|
||||
(echo "### conf"; echo) >> control
|
||||
map_confs 'genconf'
|
||||
echo "Generating debian/ (lang)..." >&2
|
||||
(echo "### lang"; echo) >> control
|
||||
map_langs 'genlang'
|
||||
echo "Generating debian/ (modules)..." >&2
|
||||
(echo "### modules"; echo) >> control
|
||||
print_edit_warning > modules_.conf
|
||||
|
@ -1,2 +1,2 @@
|
||||
# /etc/default/freeswitch
|
||||
DAEMON_OPTS=""
|
||||
DAEMON_OPTS="-rp -nonat"
|
||||
|
2
debian/freeswitch-sysvinit.freeswitch.init
vendored
2
debian/freeswitch-sysvinit.freeswitch.init
vendored
@ -16,7 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC=freeswitch
|
||||
NAME=freeswitch
|
||||
DAEMON=/usr/bin/freeswitch
|
||||
DAEMON_ARGS="-u freeswitch -g freeswitch -rp -nc -nonat"
|
||||
DAEMON_ARGS="-u freeswitch -g freeswitch -nc"
|
||||
USER=freeswitch
|
||||
GROUP=freeswitch
|
||||
RUNDIR=/var/run/$NAME
|
||||
|
2
debian/freeswitch.postinst
vendored
2
debian/freeswitch.postinst
vendored
@ -8,7 +8,7 @@ case "$1" in
|
||||
fi
|
||||
if ! getent passwd freeswitch >/dev/null; then
|
||||
useradd --system -g freeswitch -Gaudio \
|
||||
-d /var/run/freeswitch \
|
||||
-d /var/lib/freeswitch \
|
||||
-s /bin/false \
|
||||
-e '' \
|
||||
-c 'FreeSWITCH' \
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -6,7 +6,7 @@
|
||||
|
||||
FS_CC?=gcc
|
||||
FS_CXX?=g++
|
||||
FS_CFLAGS?=-ggdb3 -O2 -fPIC
|
||||
FS_CFLAGS?=-g3 -O2 -fPIC
|
||||
FS_CPPFLAGS?=
|
||||
FS_CXXFLAGS?=$(FS_CFLAGS)
|
||||
export PATH?=/usr/lib/ccache:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
7
debian/util.sh
vendored
7
debian/util.sh
vendored
@ -234,6 +234,7 @@ create_dsc () {
|
||||
-e '/\.stamp-build:/{:l2 n; /make/{s/$/ -j/; :l3 n; b l3}; b l2};' ;;
|
||||
esac
|
||||
git add debian/rules
|
||||
git rm -rf --ignore-unmatch libs/libg722_1 libs/ilbc
|
||||
dch -b -m -v "$dver" --force-distribution -D "$suite" "Nightly build."
|
||||
git add debian/changelog && git commit -m "nightly v$orig_ver"
|
||||
dpkg-source -i.* -Zxz -z9 -b .
|
||||
@ -311,7 +312,7 @@ build_all () {
|
||||
local OPTIND OPTARG
|
||||
local orig_opts="" dsc_opts="" deb_opts=""
|
||||
local archs="" distros="" orig="" par=false
|
||||
while getopts 'a:bc:df:jmno:s:v:z:' o "$@"; do
|
||||
while getopts 'a:bc:df:jm:no:s:v:z:' o "$@"; do
|
||||
case "$o" in
|
||||
a) archs="$archs $OPTARG";;
|
||||
b) orig_opts="$orig_opts -b";;
|
||||
@ -376,6 +377,8 @@ commands:
|
||||
|
||||
build-all
|
||||
|
||||
[ This must be run as root! ]
|
||||
|
||||
-a Specify architectures
|
||||
-b Bundle downloaded libraries in source package
|
||||
-c Specify distributions
|
||||
@ -395,6 +398,8 @@ commands:
|
||||
|
||||
build-debs <distro> <dsc-file> <architecture>
|
||||
|
||||
[ This must be run as root! ]
|
||||
|
||||
-B Binary architecture-dependent build
|
||||
-b Binary-only build
|
||||
-d Enable cowbuilder debug hook
|
||||
|
123
docs/docs.2012.vcxproj
Normal file
123
docs/docs.2012.vcxproj
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>docs</ProjectName>
|
||||
<ProjectGuid>{1A1FF289-4FD6-4285-A422-D31DD67A4723}</ProjectGuid>
|
||||
<RootNamespace>docs</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<BuildLog>
|
||||
<Path>
|
||||
</Path>
|
||||
</BuildLog>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
<Inputs>%(Inputs)</Inputs>
|
||||
<Outputs>%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\src\include; ..\libs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>
|
||||
</OutputFile>
|
||||
</Lib>
|
||||
<Xdcmake>
|
||||
<OutputFile>
|
||||
</OutputFile>
|
||||
</Xdcmake>
|
||||
<Bscmake>
|
||||
<OutputFile>
|
||||
</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<BuildLog>
|
||||
<Path>
|
||||
</Path>
|
||||
</BuildLog>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
<Inputs>%(Inputs)</Inputs>
|
||||
<Outputs>%(Outputs)</Outputs>
|
||||
</CustomBuildStep>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\src\include; ..\libs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>
|
||||
</OutputFile>
|
||||
</Lib>
|
||||
<Xdcmake>
|
||||
<OutputFile>
|
||||
</OutputFile>
|
||||
</Xdcmake>
|
||||
<Bscmake>
|
||||
<OutputFile>
|
||||
</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="Doxygen.conf">
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">doxygen %(FullPath)
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\include\switch.h;..\src\include\switch_apr.h;..\src\include\switch_buffer.h;..\src\include\switch_caller.h;..\src\include\switch_channel.h;..\src\include\switch_config.h;..\src\include\switch_console.h;..\src\include\switch_core.h;..\src\include\switch_event.h;..\src\include\switch_frame.h;..\src\include\switch_loadable_module.h;..\src\include\switch_module_interface.h;..\src\include\switch_mutex.h;..\src\include\switch_platform.h;..\src\include\switch_resample.h;..\src\include\switch_sqlite.h;..\src\include\switch_types.h;..\src\include\switch_utils.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">html/index.html;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">doxygen %(FullPath)
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\src\include\switch.h;..\src\include\switch_apr.h;..\src\include\switch_buffer.h;..\src\include\switch_caller.h;..\src\include\switch_channel.h;..\src\include\switch_config.h;..\src\include\switch_console.h;..\src\include\switch_core.h;..\src\include\switch_event.h;..\src\include\switch_frame.h;..\src\include\switch_loadable_module.h;..\src\include\switch_module_interface.h;..\src\include\switch_mutex.h;..\src\include\switch_platform.h;..\src\include\switch_resample.h;..\src\include\switch_sqlite.h;..\src\include\switch_types.h;..\src\include\switch_utils.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">html/index.html;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -22,6 +22,17 @@
|
||||
<prompt phrase="Semicolon" filename="59.wav"/>
|
||||
<prompt phrase="Caret" filename="94.wav"/>
|
||||
<prompt phrase="Pipe" filename="124.wav"/>
|
||||
<prompt phrase="Plus." filename="43.wav"/>
|
||||
<prompt phrase="Open parenthesis." filename="40.wav"/>
|
||||
<prompt phrase="Close parenthesis." filename="41.wav"/>
|
||||
<prompt phrase="Open curly bracket." filename="123.wav"/>
|
||||
<prompt phrase="Close curly bracket." filename="125.wav"/>
|
||||
<prompt phrase="Open square bracket." filename="91.wav"/>
|
||||
<prompt phrase="Close square bracket." filename="93.wav"/>
|
||||
<prompt phrase="Comma." filename="44.wav"/>
|
||||
<prompt phrase="Backtick." filename="96.wav"/>
|
||||
<prompt phrase="Less than sign." filename="60.wav"/>
|
||||
<prompt phrase="Greater than sign." filename="62.wav"/>
|
||||
<prompt phrase="A" filename="97.wav"/>
|
||||
<prompt phrase="B" filename="98.wav"/>
|
||||
<prompt phrase="C" filename="99.wav"/>
|
||||
@ -589,20 +600,34 @@
|
||||
<prompt phrase="...is not on the blacklist." filename="ivr-is_not_on_the_blacklist.wav"/>
|
||||
<prompt phrase="...is already on the blacklist." filename="ivr-is_already_on_the_blacklist.wav"/>
|
||||
<prompt phrase="For other options, press..." filename="ivr-for_other_options.wav"/>
|
||||
<!-- The following phrases still need to be recorded -->
|
||||
<prompt phrase="Thank you." filename="ivr-thank_you.wav"/>
|
||||
<prompt phrase="Plus." filename="43.wav"/>
|
||||
<prompt phrase="Your caller I.D. information is..." filename="ivr-your_caller_id_information_is.wav"/>
|
||||
<prompt phrase="Call screening has been enabled." filename="ivr-call_screening_enabled.wav"/>
|
||||
<prompt phrase="Call screening has been disabled." filename="ivr-call_screening_disabled.wav"/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="" filename=""/>
|
||||
<prompt phrase="Ain't nobody got time for that!" filename="ivr-aint_nobody_got_time_for_that.wav"/>
|
||||
<prompt phrase="We would support the shit out of you if only you returned our phone calls and emails." filename="ivr-we_would_support.wav"/>
|
||||
<prompt phrase="...suck." filename="ivr-suck.wav"/>
|
||||
<prompt phrase="...sucks." filename="ivr-sucks.wav"/>
|
||||
<prompt phrase="To redial your last call..." filename="ivr-to_redial_last_call.wav"/>
|
||||
<prompt phrase="To ensure that your service keeps working..." filename="ivr-ensure_service_keeps_working.wav"/>
|
||||
<prompt phrase="Please contact..." filename="ivr-please_contact.wav"/>
|
||||
<prompt phrase="...the billing department..." filename="ivr-the_billing_department.wav"/>
|
||||
<prompt phrase="...by dialing..." filename="ivr-by_dialing.wav"/>
|
||||
<prompt phrase="The credit card on file could not be charged." filename="ivr-credit_card_could_not_be_charged.wav"/>
|
||||
<prompt phrase="...units..." filename="ivr-units.wav"/>
|
||||
<prompt phrase="...per minute." filename="ivr-per_minute.wav"/>
|
||||
<prompt phrase="Your caller ID number is blocked." filename="ivr-your_caller_id_number_is_blocked.wav"/>
|
||||
<prompt phrase="You must unblock your caller ID for PIN-less authorization to the calling card." filename="ivr-unblock_caller_id.wav"/>
|
||||
<prompt phrase="Alternatively, you can request or use a PIN code on your account." filename="ivr-request_or_use_pin.wav"/>
|
||||
<prompt phrase="You have used..." filename="ivr-you_have_used.wav"/>
|
||||
<prompt phrase="...out of..." filename="ivr-out_of.wav"/>
|
||||
<prompt phrase="Your next billing cycle begins on..." filename="ivr-next_billing_cycle.wav"/>
|
||||
<prompt phrase="Nothing." filename="ivr-nothing.wav"/>
|
||||
<prompt phrase="To skip..." filename="ivr-to_skip.wav"/>
|
||||
<!-- The following phrases still need to be recorded -->
|
||||
<prompt phrase="Please hold while we connect you to a live operator." filename="ivr_connect_live_operator.wav"/>
|
||||
<prompt phrase="Please hold while we connect you to an actual human being." filename="ivr-connect_actual_human_being.wav"/>
|
||||
<prompt phrase="The system is going down for maintenance." filename="ivr-system_down_for_maintenance.wav"/>
|
||||
<prompt phrase="The system will be back up in approximately..." filename="ivr-system_back_up_in_approximately.wav"/>
|
||||
<prompt phrase="" filename=""/>
|
||||
|
||||
</ivr>
|
||||
@ -635,6 +660,16 @@
|
||||
<prompt phrase="It is stable, highly scalable, and extensible." filename="misc-it_is_stable_scalable_extensible.wav"/>
|
||||
<prompt phrase="Best of all, it is free for anyone to download and use." filename="misc-free_to_download.wav"/>
|
||||
<prompt phrase="Visit www dot freeswitch dot org to learn more about our project and worldwide community." filename="misc-freeswitch_dot_org_more.wav"/>
|
||||
<prompt phrase="Sangoma." filename="misc-Sangoma.wav"/>
|
||||
<prompt phrase="To learn more about CudaTel, press..." filename="misc-learn_more_about_cudatel.wav"/>
|
||||
<prompt phrase="The CudaTel Communication Server from Barracuda Networks is an advanced IP PBX powered by FreeSWITCH and designed by the core FreeSWITCH development team." filename="misc-cudatel_communication_server_from_barracuda.wav"/>
|
||||
<prompt phrase="CudaTel is the IP PBX designed by I.T. professionals, for I.T. professionals." filename="misc-cudatel_by_it.wav"/>
|
||||
<prompt phrase="To speak to a knowledgeable CudaTel representative, call us at 734-887-3000." filename="misc-speak_to_cudatel_rep.wav"/>
|
||||
<prompt phrase="You may also visit us at W W W dot C U D A T E L dot com to learn more about this amazing product." filename="misc-visit_cudatel_dot_com.wav"/>
|
||||
<prompt phrase="FreeSWITCH Solutions offers the best FreeSWITCH consulting money can buy." filename="misc-fss_best_consulting.wav"/>
|
||||
<prompt phrase="We have a network of FreeSWITCH experts that includes the core FreeSWITCH development team." filename="misc-fss_network_of_experts.wav"/>
|
||||
<prompt phrase="Contact us at W-W-W dot freeswitchsolutions dot com to see how we can help you take your FreeSWITCH experience to the next level." filename="misc-fss_contact_us.wav"/>
|
||||
<prompt phrase="It's totally soccer mom shit!" filename="misc-soccer_mom.wav"/>
|
||||
</misc>
|
||||
<zrtp>
|
||||
<!-- base256 prompts for SAS -->
|
||||
|
515
docs/phrase/phrase_zh_CN.xml
Normal file
515
docs/phrase/phrase_zh_CN.xml
Normal file
@ -0,0 +1,515 @@
|
||||
<language>
|
||||
<zh_CN>
|
||||
<ascii>
|
||||
<prompt phrase="空格" filename="32.wav"/>
|
||||
<prompt phrase="井" filename="35.wav"/>
|
||||
<prompt phrase="星" filename="42.wav"/>
|
||||
<prompt phrase="点" filename="46.wav"/>
|
||||
<prompt phrase="杠" filename="45.wav"/>
|
||||
<prompt phrase="叹号" filename="33.wav"/>
|
||||
<prompt phrase="At" filename="64.wav"/>
|
||||
<prompt phrase="Dollar" filename="36.wav"/>
|
||||
<prompt phrase="百分号" filename="37.wav"/>
|
||||
<prompt phrase="And号" filename="38.wav"/>
|
||||
<prompt phrase="双引号" filename="34.wav"/>
|
||||
<prompt phrase="单引号" filename="39.wav"/>
|
||||
<prompt phrase="斜杠" filename="47.wav"/>
|
||||
<prompt phrase="下划线" filename="95.wav"/>
|
||||
<prompt phrase="反斜杠" filename="92.wav"/>
|
||||
<prompt phrase="波浪线" filename="126.wav"/>
|
||||
<prompt phrase="等号" filename="61.wav"/>
|
||||
<prompt phrase="冒号" filename="58.wav"/>
|
||||
<prompt phrase="分号" filename="59.wav"/>
|
||||
<prompt phrase="脱字符" filename="94.wav"/>
|
||||
<prompt phrase="竖线" filename="124.wav"/>
|
||||
<prompt phrase="A" filename="97.wav"/>
|
||||
<prompt phrase="B" filename="98.wav"/>
|
||||
<prompt phrase="C" filename="99.wav"/>
|
||||
<prompt phrase="D" filename="100.wav"/>
|
||||
<prompt phrase="E" filename="101.wav"/>
|
||||
<prompt phrase="F" filename="102.wav"/>
|
||||
<prompt phrase="G" filename="103.wav"/>
|
||||
<prompt phrase="H" filename="104.wav"/>
|
||||
<prompt phrase="I" filename="105.wav"/>
|
||||
<prompt phrase="J" filename="106.wav"/>
|
||||
<prompt phrase="K" filename="107.wav"/>
|
||||
<prompt phrase="L" filename="108.wav"/>
|
||||
<prompt phrase="M" filename="109.wav"/>
|
||||
<prompt phrase="N" filename="110.wav"/>
|
||||
<prompt phrase="O" filename="111.wav"/>
|
||||
<prompt phrase="P" filename="112.wav"/>
|
||||
<prompt phrase="Q" filename="113.wav"/>
|
||||
<prompt phrase="R" filename="114.wav"/>
|
||||
<prompt phrase="S" filename="115.wav"/>
|
||||
<prompt phrase="T" filename="116.wav"/>
|
||||
<prompt phrase="U" filename="117.wav"/>
|
||||
<prompt phrase="V" filename="118.wav"/>
|
||||
<prompt phrase="W" filename="119.wav"/>
|
||||
<prompt phrase="X" filename="120.wav"/>
|
||||
<prompt phrase="Y" filename="121.wav"/>
|
||||
<prompt phrase="Z" filename="122.wav"/>
|
||||
</ascii>
|
||||
<phonetic-ascii>
|
||||
<prompt phrase="空格" filename="32.wav"/>
|
||||
<prompt phrase="点" filename="46.wav"/>
|
||||
<prompt phrase="Alpha" filename="97.wav"/>
|
||||
<prompt phrase="Bravo" filename="98.wav"/>
|
||||
<prompt phrase="Charlie" filename="99.wav"/>
|
||||
<prompt phrase="Delta" filename="100.wav"/>
|
||||
<prompt phrase="Echo" filename="101.wav"/>
|
||||
<prompt phrase="Foxtrot" filename="102.wav"/>
|
||||
<prompt phrase="Golf" filename="103.wav"/>
|
||||
<prompt phrase="Hotel" filename="104.wav"/>
|
||||
<prompt phrase="India" filename="105.wav"/>
|
||||
<prompt phrase="Juliet" filename="106.wav"/>
|
||||
<prompt phrase="Kilo" filename="107.wav"/>
|
||||
<prompt phrase="Lima" filename="108.wav"/>
|
||||
<prompt phrase="Mike" filename="109.wav"/>
|
||||
<prompt phrase="November" filename="110.wav"/>
|
||||
<prompt phrase="Oscar" filename="111.wav"/>
|
||||
<prompt phrase="Papa" filename="112.wav"/>
|
||||
<prompt phrase="Quebec" filename="113.wav"/>
|
||||
<prompt phrase="Romeo" filename="114.wav"/>
|
||||
<prompt phrase="Sierra" filename="115.wav"/>
|
||||
<prompt phrase="Tango" filename="116.wav"/>
|
||||
<prompt phrase="Uniform" filename="117.wav"/>
|
||||
<prompt phrase="Victor" filename="118.wav"/>
|
||||
<prompt phrase="Whiskey" filename="119.wav"/>
|
||||
<prompt phrase="Xray" filename="120.wav"/>
|
||||
<prompt phrase="Yankee" filename="121.wav"/>
|
||||
<prompt phrase="Zulu" filename="122.wav"/>
|
||||
</phonetic-ascii>
|
||||
<digits>
|
||||
<prompt phrase="零" filename="0.wav"/>
|
||||
<prompt phrase="一" filename="1.wav"/>
|
||||
<prompt phrase="二" filename="2.wav"/>
|
||||
<prompt phrase="三" filename="3.wav"/>
|
||||
<prompt phrase="四" filename="4.wav"/>
|
||||
<prompt phrase="五" filename="5.wav"/>
|
||||
<prompt phrase="六" filename="6.wav"/>
|
||||
<prompt phrase="七" filename="7.wav"/>
|
||||
<prompt phrase="八" filename="8.wav"/>
|
||||
<prompt phrase="九" filename="9.wav"/>
|
||||
<prompt phrase="十" filename="10.wav"/>
|
||||
<prompt phrase="十一" filename="11.wav"/>
|
||||
<prompt phrase="十二" filename="12.wav"/>
|
||||
<prompt phrase="十三" filename="13.wav"/>
|
||||
<prompt phrase="十四" filename="14.wav"/>
|
||||
<prompt phrase="十五" filename="15.wav"/>
|
||||
<prompt phrase="十六" filename="16.wav"/>
|
||||
<prompt phrase="十七" filename="17.wav"/>
|
||||
<prompt phrase="十八" filename="18.wav"/>
|
||||
<prompt phrase="十九" filename="19.wav"/>
|
||||
<prompt phrase="二十" filename="20.wav"/>
|
||||
<prompt phrase="三十" filename="30.wav"/>
|
||||
<prompt phrase="四十" filename="40.wav"/>
|
||||
<prompt phrase="五十" filename="50.wav"/>
|
||||
<prompt phrase="六十" filename="60.wav"/>
|
||||
<prompt phrase="七十" filename="70.wav"/>
|
||||
<prompt phrase="八十" filename="80.wav"/>
|
||||
<prompt phrase="九十" filename="90.wav"/>
|
||||
<prompt phrase="点" filename="dot.wav"/>
|
||||
<prompt phrase="第一" filename="h-1.wav"/>
|
||||
<prompt phrase="第二" filename="h-2.wav"/>
|
||||
<prompt phrase="第三" filename="h-3.wav"/>
|
||||
<prompt phrase="第四" filename="h-4.wav"/>
|
||||
<prompt phrase="第五" filename="h-5.wav"/>
|
||||
<prompt phrase="第六" filename="h-6.wav"/>
|
||||
<prompt phrase="第七" filename="h-7.wav"/>
|
||||
<prompt phrase="第八" filename="h-8.wav"/>
|
||||
<prompt phrase="第九" filename="h-9.wav"/>
|
||||
<prompt phrase="第十" filename="h-10.wav"/>
|
||||
<prompt phrase="第十一" filename="h-11.wav"/>
|
||||
<prompt phrase="第十二" filename="h-12.wav"/>
|
||||
<prompt phrase="第十三" filename="h-13.wav"/>
|
||||
<prompt phrase="第十四" filename="h-14.wav"/>
|
||||
<prompt phrase="第十五" filename="h-15.wav"/>
|
||||
<prompt phrase="第十六" filename="h-16.wav"/>
|
||||
<prompt phrase="第十七" filename="h-17.wav"/>
|
||||
<prompt phrase="第十八" filename="h-18.wav"/>
|
||||
<prompt phrase="第十九" filename="h-19.wav"/>
|
||||
<prompt phrase="第二十" filename="h-20.wav"/>
|
||||
<prompt phrase="第三十" filename="h-30.wav"/>
|
||||
<prompt phrase="百" filename="hundred.wav"/>
|
||||
<prompt phrase="百万" filename="million.wav"/>
|
||||
<prompt phrase="点" filename="period.wav"/>
|
||||
<prompt phrase="点" filename="point.wav"/>
|
||||
<prompt phrase="井" filename="pound.wav"/>
|
||||
<prompt phrase="星" filename="star.wav"/>
|
||||
<prompt phrase="千" filename="thousand.wav"/>
|
||||
</digits>
|
||||
<currency>
|
||||
<prompt phrase="And" filename="and.wav"/>
|
||||
<prompt phrase="分" filename="cent.wav"/>
|
||||
<prompt phrase="Central" filename="central.wav"/>
|
||||
<prompt phrase="分每分钟" filename="cents-per-minute.wav"/>
|
||||
<prompt phrase="分" filename="cents.wav"/>
|
||||
<prompt phrase="元" filename="dollar.wav"/>
|
||||
<prompt phrase="元" filename="dollars.wav"/>
|
||||
<prompt phrase="负" filename="minus.wav"/>
|
||||
<prompt phrase="负" filename="negative.wav"/>
|
||||
<prompt phrase="元" filename="yuan.wav"/>
|
||||
<prompt phrase="角" filename="jiao.wav"/>
|
||||
<prompt phrase="分" filename="fen.wav"/>
|
||||
<prompt phrase="厘" filename="li.wav"/>
|
||||
</currency>
|
||||
<time>
|
||||
<prompt phrase="上午" filename="a-m.wav"/>
|
||||
<prompt phrase="在" filename="at.wav"/>
|
||||
<prompt phrase="星期日" filename="day-0.wav"/>
|
||||
<prompt phrase="星期一" filename="day-1.wav"/>
|
||||
<prompt phrase="星期二" filename="day-2.wav"/>
|
||||
<prompt phrase="星期三" filename="day-3.wav"/>
|
||||
<prompt phrase="星期四" filename="day-4.wav"/>
|
||||
<prompt phrase="星期五" filename="day-5.wav"/>
|
||||
<prompt phrase="星期六" filename="day-6.wav"/>
|
||||
<prompt phrase="时" filename="hour.wav"/>
|
||||
<prompt phrase="小时" filename="hours.wav"/>
|
||||
<prompt phrase="分" filename="minute.wav"/>
|
||||
<prompt phrase="分" filename="minutes.wav"/>
|
||||
<prompt phrase="一月" filename="mon-0.wav"/>
|
||||
<prompt phrase="二月" filename="mon-1.wav"/>
|
||||
<prompt phrase="三月" filename="mon-2.wav"/>
|
||||
<prompt phrase="四月" filename="mon-3.wav"/>
|
||||
<prompt phrase="五月" filename="mon-4.wav"/>
|
||||
<prompt phrase="六月" filename="mon-5.wav"/>
|
||||
<prompt phrase="七月" filename="mon-6.wav"/>
|
||||
<prompt phrase="八月" filename="mon-7.wav"/>
|
||||
<prompt phrase="九月" filename="mon-8.wav"/>
|
||||
<prompt phrase="十月" filename="mon-9.wav"/>
|
||||
<prompt phrase="十一月" filename="mon-10.wav"/>
|
||||
<prompt phrase="十二月" filename="mon-11.wav"/>
|
||||
<prompt phrase="点" filename="oclock.wav"/>
|
||||
<prompt phrase="oh" filename="oh.wav"/>
|
||||
<prompt phrase="下午" filename="p-m.wav"/>
|
||||
<prompt phrase="秒" filename="second.wav"/>
|
||||
<prompt phrase="秒" filename="seconds.wav"/>
|
||||
<prompt phrase="今天" filename="today.wav"/>
|
||||
<prompt phrase="明天" filename="tomorrow.wav"/>
|
||||
<prompt phrase="昨天" filename="yesterday.wav"/>
|
||||
</time>
|
||||
<voicemail>
|
||||
<prompt phrase="分机" filename="vm-person.wav"/>
|
||||
<prompt phrase="设置紧急" filename="vm-marked-urgent.wav"/>
|
||||
<prompt phrase="已发送邮件" filename="vm-emailed.wav"/>
|
||||
<prompt phrase="您有" filename="vm-you_have.wav"/>
|
||||
<prompt phrase="请输入您的ID,然后按" filename="vm-enter_id.wav"/>
|
||||
<prompt phrase="请输入您的密码,然后按" filename="vm-enter_pass.wav"/>
|
||||
<prompt phrase="登录错误" filename="vm-fail_auth.wav"/>
|
||||
<prompt phrase="欢迎进入您的语音邮箱" filename="vm-hello.wav"/>
|
||||
<prompt phrase="再见" filename="vm-goodbye.wav"/>
|
||||
<prompt phrase="请在滴声后录下您的名字,按任意键结束录音" filename="vm-record_name1.wav"/>
|
||||
<prompt phrase="选择欢迎声音,请按1到9选择" filename="vm-choose_greeting_choose.wav"/>
|
||||
<prompt phrase="选择错误" filename="vm-choose_greeting_fail.wav"/>
|
||||
<prompt phrase="失败次数过多" filename="vm-abort.wav"/>
|
||||
<prompt phrase="修改密码" filename="vm-change_password.wav"/>
|
||||
<prompt phrase="请在滴声后开始欢迎音录音,按任意键或停止说话结束录音" filename="vm-record_greeting.wav"/>
|
||||
<prompt phrase="请在滴声后开始录音,按任意键或停止说话结束录音" filename="vm-record_message.wav"/>
|
||||
<prompt phrase="不可达" filename="vm-play_greeting.wav"/>
|
||||
<prompt phrase="新紧急" filename="vm-urgent-new.wav"/>
|
||||
<prompt phrase="新" filename="vm-new.wav"/>
|
||||
<prompt phrase="紧急留言已保存" filename="vm-urgent-saved.wav"/>
|
||||
<prompt phrase="已保存" filename="vm-saved.wav"/>
|
||||
<prompt phrase="信息" filename="vm-message.wav"/>
|
||||
<prompt phrase="信息" filename="vm-messages.wav"/>
|
||||
<prompt phrase="按" filename="vm-press.wav"/>
|
||||
<prompt phrase="听取新留言" filename="vm-listen_new.wav"/>
|
||||
<prompt phrase="听取已保存的留言" filename="vm-listen_saved.wav"/>
|
||||
<prompt phrase="高级选项" filename="vm-advanced.wav"/>
|
||||
<prompt phrase="转发留言" filename="vm-to_forward.wav"/>
|
||||
<prompt phrase="退出" filename="vm-to_exit.wav"/>
|
||||
<prompt phrase="录制欢迎音" filename="vm-record_greeting.wav"/>
|
||||
<prompt phrase="选择一个欢迎音" filename="vm-choose_greeting.wav"/>
|
||||
<prompt phrase="录制您的名字" filename="vm-record_name2.wav"/>
|
||||
<prompt phrase="主菜单" filename="vm-main_menu.wav"/>
|
||||
<prompt phrase="收听录音" filename="vm-listen_to_recording.wav"/>
|
||||
<prompt phrase="保存录音" filename="vm-save_recording.wav"/>
|
||||
<prompt phrase="重新录音" filename="vm-rerecord.wav"/>
|
||||
<prompt phrase="将该留言设置为紧急" filename="vm-mark-urgent.wav"/>
|
||||
<prompt phrase="继续" filename="vm-continue.wav"/>
|
||||
<prompt phrase="重听" filename="vm-listen_to_recording_again.wav"/>
|
||||
<prompt phrase="删除录音" filename="vm-delete_recording.wav"/>
|
||||
<prompt phrase="将录音转发到您的电子邮箱" filename="vm-forward_to_email.wav"/>
|
||||
<prompt phrase="欢迎" filename="vm-greeting.wav"/>
|
||||
<prompt phrase="已选择" filename="vm-selected.wav"/>
|
||||
<prompt phrase="不存在" filename="vm-not_available.wav"/>
|
||||
<prompt phrase="留言号码" filename="vm-message_number.wav"/>
|
||||
<prompt phrase="已删除" filename="vm-deleted.wav"/>
|
||||
<prompt phrase="留言时间太短,请重试" filename="vm-too-small.wav"/>
|
||||
<prompt phrase="收件箱" filename="vm-in_folder.wav"/>
|
||||
<prompt phrase="返回通话" filename="vm-return_call.wav"/>
|
||||
<prompt phrase="紧急" filename="vm-urgent.wav"/>
|
||||
<prompt phrase="留言信箱已满,请稍后再试" filename="vm-mailbox_full.wav"/>
|
||||
<prompt phrase="欢迎进入您的新语音信息。收听设置语音信箱的帮助信息,请按1,跳过请按2" filename="vm-tutorial_yes_no.wav"/>
|
||||
<prompt phrase="我们需要录制您的姓名,该姓名会用于整个系统,包括公司电话号码簿" filename="vm-tutorial_record_name.wav"/>
|
||||
<prompt phrase="您的密码用于保护您的语音邮箱,您想要现在修改密码吗?" filename="vm-tutorial_change_pin.wav"/>
|
||||
<prompt phrase="您所拨号的用户不可达,他也没有语音邮箱" filename="vm-not_available_no_voicemail.wav"/>
|
||||
<prompt phrase="您输入的密码长度不够" filename="voicemail/vm-pin_below_minimum_length.wav"/>
|
||||
<prompt phrase="最小的密码长度是..." filename="voicemail/vm-minimum_pin_length_is.wav"/>
|
||||
</voicemail>
|
||||
<directory>
|
||||
<prompt phrase="请输入姓名拼音的前几位字母" filename="dir-enter_person.wav"/>
|
||||
<prompt phrase="...姓..." filename="dir-last_name.wav"/>
|
||||
<prompt phrase="搜索..." filename="dir-to_search_by.wav"/>
|
||||
<prompt phrase="...名字..." filename="dir-first_name.wav"/>
|
||||
<prompt phrase="没找到相应的结果" filename="dir-no_matching_results.wav"/>
|
||||
<prompt phrase="...条相应的结果" filename="dir-result_match.wav"/>
|
||||
<prompt phrase="搜到太多对应的结果" filename="dir-too_many_result.wav"/>
|
||||
<prompt phrase="没有了" filename="dir-no_more_results.wav"/>
|
||||
<prompt phrase="号码是..." filename="dir-result_number.wav"/>
|
||||
<prompt phrase="...分机号..." filename="dir-at_extension.wav"/>
|
||||
<prompt phrase="选择该条..." filename="dir-to_select_entry.wav"/>
|
||||
<prompt phrase="选择下一条..." filename="dir-for_next.wav"/>
|
||||
<prompt phrase="选择上一条..." filename="dir-for_prev.wav"/>
|
||||
<prompt phrase="重新搜索..." filename="dir-start_new_search.wav"/>
|
||||
<prompt phrase="请输入最小的..." filename="dir-specify_mininum.wav"/>
|
||||
<prompt phrase="...人名的字符" filename="dir-letters_of_person_name.wav"/>
|
||||
<prompt phrase="请重试" filename="dir-please_try_again.wav"/>
|
||||
<prompt phrase="请按..." filename="dir-press.wav" info="we can copy vm/vm-press.wav"/>
|
||||
<prompt phrase="到下一条..." filename="dir-for_next.wav" note="re-recorded because original was wrong"/>
|
||||
<prompt phrase="请输入您要查找的人姓名的开头几个字母" filename="dir-enter_person_first_or_last.wav"/>
|
||||
</directory>
|
||||
<conference>
|
||||
<prompt phrase="NULL" filename="conf-ack.wav" type="tone"/>
|
||||
<prompt phrase="NULL" filename="conf-nack.wav" type="tone"/>
|
||||
<prompt phrase="静音" filename="conf-muted.wav"/>
|
||||
<prompt phrase="解除静音" filename="conf-unmuted.wav"/>
|
||||
<prompt phrase="目前该会议中只有您一个人" filename="conf-alone.wav"/>
|
||||
<prompt phrase="NULL" filename="conf-perpetual.wav" type="music"/>
|
||||
<prompt phrase="NULL" filename="conf-enter.wav" type="tone"/>
|
||||
<prompt phrase="NULL" filename="conf-exit.wav" type="tone"/>
|
||||
<prompt phrase="您已被踢出会议室" filename="conf-kicked.wav"/>
|
||||
<prompt phrase="会议已锁定" filename="conf-locked.wav"/>
|
||||
<prompt phrase="会议已锁定" filename="conf-is-locked.wav"/>
|
||||
<prompt phrase="会议已解除锁定" filename="conf-is-unlocked.wav"/>
|
||||
<prompt phrase="请输入会议密码" filename="conf-pin.wav"/>
|
||||
<prompt phrase="密码错误,请重新输入" filename="conf-bad-pin.wav"/>
|
||||
<prompt phrase="再见" filename="conf-goodbye.wav"/>
|
||||
<prompt phrase="欢迎进入本会议" filename="conf-welcome.wav"/>
|
||||
<prompt phrase="请输入会议号码,按#号结束" filename="conf-enter_conf_number.wav"/>
|
||||
<prompt phrase="请输入会议密码,按#号结束" filename="conf-enter_conf_pin.wav"/>
|
||||
<prompt phrase="...进入会议" filename="conf-has_joined.wav"/>
|
||||
<prompt phrase="...离开会议" filename="conf-has_left.wav"/>
|
||||
<prompt phrase="您已静音" filename="conf-you_are_already_muted.wav"/>
|
||||
<prompt phrase="您已双向静音" filename="conf-you_are_now_bidirectionally_muted.wav"/>
|
||||
<prompt phrase="输入与会者编号然后按#号键" filename="conf-number_of_listeners.wav"/>
|
||||
<prompt phrase="...名听众参与本次会议" filename="conf-listeners_in_conference.wav"/>
|
||||
<prompt phrase="...名听众参与本次会议" filename="conf-listener_in_conference.wav"/>
|
||||
<prompt phrase="...名与会者参与本次会议" filename="conf-members_in_conference.wav"/>
|
||||
<prompt phrase="本会议现在是 Q and A 模式" filename="conference/conf-conference_is_in_qna_mode.wav"/>
|
||||
<prompt phrase="Q and A 模式..." filename="conference/conf-qna_mode.wav"/>
|
||||
<prompt phrase="进入声音..." filename="conference/conf-entry_sound.wav"/>
|
||||
<prompt phrase="退出声音..." filename="conference/conf-exit_sound.wav"/>
|
||||
</conference>
|
||||
<ivr>
|
||||
<prompt phrase="账号" filename="ivr-account_number.wav"/>
|
||||
<prompt phrase="连接到主叫" filename="ivr-connect_to_caller.wav"/>
|
||||
<prompt phrase="如果您知道分机号码,请现在输入" filename="ivr-enter_ext_pound.wav"/>
|
||||
<prompt phrase="请输入分机号,以#号结束" filename="ivr-enter_ext.wav"/>
|
||||
<prompt phrase="该分机" filename="ivr-for_this_person.wav"/>
|
||||
<prompt phrase="正在呼叫,请稍候..." filename="ivr-hold_connect_call.wav"/>
|
||||
<prompt phrase="对不起" filename="ivr-im_sorry.wav"/>
|
||||
<prompt phrase="请" filename="ivr-please.wav"/>
|
||||
<prompt phrase="请在以下时间致电我们" filename="ivr-please_return_our_call_at.wav"/>
|
||||
<prompt phrase="参考号码" filename="ivr-regarding_reference_number.wav"/>
|
||||
<prompt phrase="这是一个IVR子菜单的例子..." filename="ivr-sample_submenu.wav"/>
|
||||
<prompt phrase="请在滴声后说出您的姓名" filename="ivr-say_name.wav"/>
|
||||
<prompt phrase="将该呼叫转移到语音邮箱" filename="ivr-send_to_voicemail.wav"/>
|
||||
<prompt phrase="转接线员" filename="ivr-speak_to_a_customer_service_representative.wav"/>
|
||||
<prompt phrase="选择一条信息" filename="ivr-take_a_message.wav"/>
|
||||
<prompt phrase="谢谢" filename="ivr-thank_you.wav"/>
|
||||
<prompt phrase="输入错误" filename="ivr-that_was_an_invalid_entry.wav"/>
|
||||
<prompt phrase="有一个电话来自" filename="ivr-this_is_a_call_from.wav"/>
|
||||
<prompt phrase="您可以通过本 IVR 测试一些功能..." filename="ivr-this_ivr_will_let_you_test_features.wav"/>
|
||||
<prompt phrase="呼叫FreeSWITCH会议" filename="ivr-to_call_the_freeswitch_conference.wav"/>
|
||||
<prompt phrase="进行回音测试" filename="ivr-to_do_a_freeswitch_echo_test.wav"/>
|
||||
<prompt phrase="进行延迟回音测试" filename="ivr-to_do_a_fwd_echo_test.wav"/>
|
||||
<prompt phrase="收听下级测试菜单" filename="ivr-to_hear_sample_submenu.wav"/>
|
||||
<prompt phrase="收听疯狂的猴子" filename="ivr-to_hear_screaming_monkeys.wav"/>
|
||||
<prompt phrase="收听保持音乐" filename="ivr-to_listen_to_moh.wav"/>
|
||||
<prompt phrase="重听" filename="ivr-to_repeat_these_options.wav"/>
|
||||
<prompt phrase="返回上一级菜单" filename="ivr-to_return_to_previous_menu.wav"/>
|
||||
<prompt phrase="转接线员" filename="ivr-to_speak_with_an_operator.wav"/>
|
||||
<prompt phrase="欢迎来到FreeSWITCH,电话系统的未来" filename="ivr-welcome_to_freeswitch.wav"/>
|
||||
<prompt phrase="您可以随时挂机" filename="ivr-you_may_exit_by_hanging_up.wav"/>
|
||||
<prompt phrase="或" filename ="ivr-or.wav"/>
|
||||
<prompt phrase="否" filename ="ivr-not.wav"/>
|
||||
<prompt phrase="呼叫" filename ="ivr-call.wav"/>
|
||||
<prompt phrase="您可以" filename ="ivr-you_may.wav"/>
|
||||
<prompt phrase="您好" filename="ivr-hello.wav"/>
|
||||
<prompt phrase="使用您电话上的按键..." filename="ivr-use_telephone_keypad.wav"/>
|
||||
<prompt phrase="请说出您想要呼叫的人的名字" filename="ivr-spell_name.wav"/>
|
||||
<prompt phrase="姓氏优先" filename="ivr-last_name_first.wav"/>
|
||||
<prompt phrase="名字优先" filename="ivr-first_name_first.wav"/>
|
||||
<prompt phrase="Q或Z请按1" filename="ivr-press_one_q_or_z.wav"/>
|
||||
<prompt phrase="销售" filename="ivr-sales.wav"/>
|
||||
<prompt phrase="客服" filename="ivr-customer_service.wav"/>
|
||||
<prompt phrase="技术支持" filename="ivr-technical_support.wav"/>
|
||||
<prompt phrase="接线员" filename="ivr-operator.wav"/>
|
||||
<prompt phrase="您呼叫的分机不存在" filename="ivr-you_have_dialed_an_invalid_extension.wav"/>
|
||||
<prompt phrase="请输入分机号,以#号键结束" filename="ivr-please_enter_extension_followed_by_pound.wav"/>
|
||||
<prompt phrase="请输入密码,以#号键结束" filename="ivr-please_enter_pin_followed_by_pound.wav"/>
|
||||
<prompt phrase="您的分机号的密码有误" filename="ivr-pin_or_extension_is-invalid.wav"/>
|
||||
<prompt phrase="您将为您的账号预留该电话..." filename="ivr-you_are_about_to_provision_this_phone.wav"/>
|
||||
<prompt phrase="请再输入一次密码" filename="ivr-please_reenter_your_pin.wav"/>
|
||||
<prompt phrase="注册到 ClueCon,请按..." filename="ivr-register_for_cluecon.wav"/>
|
||||
<prompt phrase="登录" filename="ivr-to_log_in.wav"/>
|
||||
<prompt phrase="退出" filename="ivr-to_log_out.wav"/>
|
||||
<prompt phrase="您已登录" filename="ivr-you_are_now_logged_in.wav"/>
|
||||
<prompt phrase="您已退出" filename="ivr-you_are_now_logged_out.wav"/>
|
||||
<prompt phrase="请重试" filename="ivr-please_try_again.wav"/>
|
||||
<prompt phrase="您将永久预留该电话到您的分机" filename="ivr-provision_phone_permanently_to_extension.wav"/>
|
||||
<prompt phrase="预留该电话到分机,请输入分机号,以#号结束" filename="ivr-extension_to_provision_this_phone.wav"/>
|
||||
<prompt phrase="谢谢,该电话将会重启动" filename="ivr-this_phone_will_now_reboot.wav"/>
|
||||
<prompt phrase="谢谢,您的录音已保存" filename="ivr-recording_saved.wav"/>
|
||||
<prompt phrase="保存录音请按1,收听录音请按2,重新录音请按 3" filename="ivr-save_review_record.wav"/>
|
||||
<prompt phrase="现在不能保存录音,请稍后再试" filename="ivr-unable_save.wav"/>
|
||||
<prompt phrase="您是第..." filename="ivr-you_are_number.wav"/>
|
||||
<prompt phrase="...排队者" filename="ivr-in_line.wav"/>
|
||||
<prompt phrase="感谢您耐心等待" filename="ivr-thank_you_for_holding.wav"/>
|
||||
<prompt phrase="您大约需要的等待时间是..." filename="ivr-estimated_hold_time.wav"/>
|
||||
<prompt phrase="多于..." filename="ivr-more_than.wav"/>
|
||||
<prompt phrase="少于..." filename="ivr-less_than.wav"/>
|
||||
<prompt phrase="开始录音" filename="ivr-begin_recording.wav "/>
|
||||
<prompt phrase="呼叫前转已取消" filename="ivr-call_forwarding_has_been_cancelled.wav"/>
|
||||
<prompt phrase="呼叫前转已设置" filename="ivr-call_forwarding_has_been_set.wav"/>
|
||||
<prompt phrase="请输入电话号码" filename="ivr-please_enter_the_phone_number.wav"/>
|
||||
<prompt phrase="请说出您的姓名和呼叫原因" filename="ivr-please_state_your_name_and_reason_for_calling.wav"/>
|
||||
<prompt phrase="接受请按1,拒绝请按2,转语音邮箱请按3" filename="ivr-accept_reject_voicemail.wav"/>
|
||||
<prompt phrase="来电" filename="ivr-incoming_call.wav"/>
|
||||
<prompt phrase="感谢致电" filename="ivr-thank_you_for_calling.wav"/>
|
||||
<prompt phrase="请稍候" filename="ivr-stay_on_line_call_answered_momentarily.wav"/>
|
||||
<prompt phrase="电话转接中" filename="ivr-call_being_transferred.wav"/>
|
||||
<prompt phrase="电话转接中,请稍候" filename="ivr-enjoy_music_while_transfer.wav"/>
|
||||
<prompt phrase="电话来自..." filename="ivr-call_from.wav"/>
|
||||
<prompt phrase="该菜单没有选项,请联系管理员" filename="ivr-no_menu_items.wav"/>
|
||||
<prompt phrase="选择企业目录, 请按..." filename="ivr-for_directory_press.wav"/>
|
||||
<prompt phrase="使用您的电话拨号盘..." filename="ivr-using_telephone_keypad.wav"/>
|
||||
<prompt phrase="请输入姓氏的开头几个字母" filename="ivr-enter_letters_last_name.wav"/>
|
||||
<prompt phrase="请输入名字的开头几个字母" filename="ivr-enter_letters_first_name.wav"/>
|
||||
<prompt phrase="请输入姓名的开头几个字母" filename="ivr-enter_letters_first_or_last_name.wav"/>
|
||||
<prompt phrase="正确请按..." filename="ivr-if_correct_press.wav"/>
|
||||
<prompt phrase="错误请按..." filename="ivr-if_not_press.wav"/>
|
||||
<prompt phrase="输入完毕请按#号键" filename="ivr-finished_pound_hash_key.wav"/>
|
||||
<prompt phrase="免打扰未生效" filename="ivr-dnd_activated.wav"/>
|
||||
<prompt phrase="免打扰已生效" filename="ivr-dnd_cancelled.wav"/>
|
||||
<prompt phrase="请输入任意其它数字..." filename="ivr-any_other_digit.wav"/>
|
||||
<prompt phrase="确认请按1,否则请按2" filename="ivr-one_yes_two_no.wav"/>
|
||||
<prompt phrase="请输入队列号码,以#号结束" filename="ivr-enter_queue_number.wav"/>
|
||||
<prompt phrase="请输入..." filename="ivr-please_enter_the.wav"/>
|
||||
<prompt phrase="号码." filename="ivr-number.wav"/>
|
||||
<prompt phrase="...以#号结束" filename="ivr-followed_by_pound.wav"/>
|
||||
<prompt phrase="账户余额为..." filename="ivr-account_balance_is.wav"/>
|
||||
<prompt phrase="欢迎致电,请直拨分机号,查号请拨 0" filename="ivr-generic_greeting.wav"/>
|
||||
<prompt phrase="正确认按1,错误请按2" filename="ivr-if_correct_one_if_not_two.wav"/>
|
||||
<prompt phrase="...文件..." filename="ivr-file.wav"/>
|
||||
<prompt phrase="...文件..." filename="ivr-files-.wav"/>
|
||||
<prompt phrase="叫醒服务..." filename="ivr-for_a_wakeup_call.wav"/>
|
||||
<prompt phrase="这里是电话叫醒服务" filename="ivr-this_is_your_wakeup_call.wav"/>
|
||||
<prompt phrase="设置电话叫醒服务..." filename="ivr-request_wakeup_call.wav"/>
|
||||
<prompt phrase="确认电话叫醒服务..." filename="ivr-confirm_wakeup_call.wav"/>
|
||||
<prompt phrase="取消电话叫醒服务..." filename="ivr-cancel_wakeup_call.wav"/>
|
||||
<prompt phrase="您已设置电话叫醒服务.." filename="ivr-requested_wakeup_call_for.wav"/>
|
||||
<prompt phrase="您未设置电话叫醒服务" filename="ivr-not_requested_wakeup_call.wav"/>
|
||||
<prompt phrase="您的电话叫醒服务已取消" filename="ivr-wakeup_call_cancelled.wav"/>
|
||||
<prompt phrase="每日叫醒电话..." filename="ivr-for_daily_wakeup_call.wav"/>
|
||||
<prompt phrase="每日叫醒电话..." filename="ivr-daily_wakeup_call.wav"/>
|
||||
<prompt phrase="每日叫醒电话..." filename="ivr-for_daily_wakeup_calls.wav"/>
|
||||
<prompt phrase="一次性叫醒电话..." filename="ivr-for_one_time_wakeup_call.wav"/>
|
||||
<prompt phrase="一次性叫醒电话..." filename="ivr-one_time_wakeup_call.wav"/>
|
||||
<prompt phrase="...叫醒电话..." filename="ivr-wakeup_call.wav"/>
|
||||
<prompt phrase="该起床了,太阳晒屁股了!" filename="ivr-wakey_wakey_sunshine.wav"/>
|
||||
<prompt phrase="欢迎" filename="ivr-welcome.wav"/>
|
||||
<prompt phrase="欢迎致电..." filename="ivr-welcome_to.wav"/>
|
||||
<prompt phrase="早上好." filename="ivr-good_morning.wav"/>
|
||||
<prompt phrase="中午好." filename="ivr-good_afternoon.wav"/>
|
||||
<prompt phrase="晚上好." filename="ivr-good_evening.wav"/>
|
||||
<prompt phrase="谢谢." filename="ivr-Thank_you.wav"/>
|
||||
<prompt phrase="为..." filename="ivr-for.wav"/>
|
||||
<prompt phrase="这次等待时间比往常长一点" filename="ivr-longer_than_usual_hold_times.wav"/>
|
||||
<prompt phrase="您是..." filename="ivr-you_are_the.wav"/>
|
||||
<prompt phrase="请稍候" filename="ivr-one_moment_please.wav"/>
|
||||
<prompt phrase="您的电话会被按顺序接听" filename="ivr-call_answered_order_received.wav"/>
|
||||
<prompt phrase="您输入的是..." filename="ivr-you_entered.wav"/>
|
||||
<prompt phrase="分机号..." filename="ivr-extension_number.wav"/>
|
||||
<prompt phrase="电话转接中,请稍候." filename="ivr-please_hold_while_party_contacted.wav"/>
|
||||
<prompt phrase="电话转接中,请先欣赏音乐." filename="ivr-please_enjoy_music_while_party_reached.wav"/>
|
||||
<prompt phrase="重听..." filename="ivr-repeat_this_information.wav"/>
|
||||
<prompt phrase="不 不 不!" filename="ivr-no_no_no.wav"/>
|
||||
<prompt phrase="您是说要按那个键吗?" filename="ivr-did_you_mean_to_press_key.wav"/>
|
||||
<prompt phrase="我是认真的,你真的是说要按那个键吗?" filename="ivr-seriously_mean_to_press_key.wav"/>
|
||||
<prompt phrase="好吧,随便" filename="ivr-oh_whatever.wav"/>
|
||||
<prompt phrase="总算对了!如果你再输错小心我打你屁股" filename="ivr-one_more_mistake.wav"/>
|
||||
<prompt phrase="恭喜,您按的是星号键,这并不表示您是一个明星。只是意味着你有一个手指头可以按键" filename="ivr-congratulations_you_pressed_star.wav"/>
|
||||
<prompt phrase="所有工程师都在忙着帮助其它销售代表演示CudaTel有多酷" filename="ivr-engineers_busy_assisting_other_sales.wav"/>
|
||||
<prompt phrase="该信息将会自已删除,倒计时 5, 4, 3, 2, 1 ..." filename="ivr-message_self_destruct.wav"/>
|
||||
<prompt phrase="您所有的电话都属于我们." filename="ivr-all_your_call_are_belong_to_us.wav"/>
|
||||
<prompt phrase="我就是喜欢你按电话按键的那股劲!" filename="ivr-love_those_touch_tones.wav"/>
|
||||
<prompt phrase="是的,我们没有香蕉." filename="ivr-yes_we_have_no_bananas.wav"/>
|
||||
<prompt phrase="哥们,你太恶心了!" filename="ivr-dude_you_suck.wav"/>
|
||||
<prompt phrase="您的来电对我们很重要,但您的耐心却不是,所以,我们很高兴把您放到等待队列里,用我们烦人的保持音乐恶心你" filename="ivr-on_hold_indefinitely.wav"/>
|
||||
<prompt phrase="...离开办公室了" filename="ivr-has_left_the_building.wav"/>
|
||||
<prompt phrase="无此电话号码" filename="ivr-phone_is_unassigned.wav"/>
|
||||
<prompt phrase="该电话设置有误" filename="ivr-phone_not_configured.wav"/>
|
||||
<prompt phrase="恭喜! 电话配置已成功,现在可以分配给一个用户了" filename="ivr-phone_is_configured_properly.wav"/>
|
||||
<prompt phrase="请联系系统管理员" filename="ivr-contact_system_administrator.wav"/>
|
||||
<prompt phrase="Barracuda Networks" filename="ivr-barracuda_networks.wav"/>
|
||||
<prompt phrase="CudaTel Communication Server" filename="ivr-cudatel_communication_server.wav"/>
|
||||
<prompt phrase="该队列没有电话了" filename="ivr-no_calls_waiting_in_queue.wav"/>
|
||||
<prompt phrase="您是第一个呼叫者,当然,在我们的字典里每个人都是第一个,所以,请稍等一会儿..." filename="ivr-youre_number_one.wav"/>
|
||||
<prompt phrase="...呼叫了紧急服务" filename="ivr-has_called_emergency_services.wav"/>
|
||||
<prompt phrase="那里有..." filename="ivr-there_are.wav"/>
|
||||
<prompt phrase="请输入主叫电话号码,以#号结束." filename="ivr-enter_source_telephone_number.wav"/>
|
||||
<prompt phrase="请输入被叫电话号码,以#号结束." filename="ivr-enter_destination_telephone_number.wav"/>
|
||||
<prompt phrase="录音开始" filename="ivr-recording_started.wav"/>
|
||||
<prompt phrase="录音结束" filename="ivr-recording_stopped.wav"/>
|
||||
<prompt phrase="录音暂停" filename="ivr-recording_paused.wav"/>
|
||||
<prompt phrase="录音删除" filename="ivr-recording_deleted.wav"/>
|
||||
<prompt phrase="您不再在队列中" filename="ivr-no_longer_in_queue.wav"/>
|
||||
<prompt phrase="...取款." filename="ivr-withdrawn.wav"/>
|
||||
<prompt phrase="问题..." filename="ivr-question.wav"/>
|
||||
<prompt phrase="...问题." filename="ivr-questions.wav"/>
|
||||
<prompt phrase="...已应答" filename="ivr-has_been_answered.wav"/>
|
||||
<prompt phrase="...已删除" filename="ivr-has_been_removed.wav"/>
|
||||
<prompt phrase="队列中已没有问题了." filename="ivr-no_questions_in_queue.wav"/>
|
||||
<prompt phrase="...已开启" filename="ivr/ivr_is_now_on.wav"/>
|
||||
<prompt phrase="...已关闭" filename="ivr/ivr_is_now_off.wav"/>
|
||||
<prompt phrase="该电话不允许呼叫外部号码" filename="ivr-phone_not_make_external_calls.wav"/>
|
||||
<prompt phrase="身份证号..." filename="ivr-id_number.wav"/>
|
||||
<prompt phrase="跳过该帮助信息..." filename="ivr-skip_instructions.wav"/>
|
||||
<prompt phrase="不按任何键挂断该电话以放弃录音." filename="ivr-hangup_to_discard.wav"/>
|
||||
<prompt phrase="...或按..." filename="ivr-or_press.wav"/>
|
||||
<prompt phrase="英语,请按..." filename="ivr-for_english_press.wav"/>
|
||||
<prompt phrase="您拨叫的号码是空号" filename="ivr-call_cannot_be_completed_as_dialed.wav"/>
|
||||
<prompt phrase="请查证后再拨" filename="ivr-please_check_number_try_again.wav"/>
|
||||
<prompt phrase="失败原因为..." filename="ivr-failure_reason_is.wav"/>
|
||||
<prompt phrase="空号" filename="ivr-unallocated_number.wav"/>
|
||||
<prompt phrase="无响应" filename="ivr-no_user_response.wav"/>
|
||||
<prompt phrase="号码错误" filename="ivr-invalid_number_format.wav"/>
|
||||
<prompt phrase="网关错误" filename="ivr-gateway_down.wav"/>
|
||||
<prompt phrase="无法路由" filename="ivr-no_route_destination.wav"/>
|
||||
<prompt phrase="用户忙" filename="ivr-user_busy.wav"/>
|
||||
<prompt phrase="呼叫被拒绝" filename="ivr-call_rejected.wav"/>
|
||||
<prompt phrase="未知错误" filename="ivr-normal_unspecified.wav"/>
|
||||
<prompt phrase="目的地不兼容" filename="ivr-incompatible_destination.wav"/>
|
||||
<prompt phrase="正常挂机" filename="ivr-normal_clearing.wav"/>
|
||||
<prompt phrase="会议室已满,请联系管理员" filename="conf-conference_is_full.wav"/>
|
||||
<prompt phrase="操作受限" filename="ivr-not_have_permission.wav"/>
|
||||
</ivr>
|
||||
|
||||
<misc>
|
||||
<prompt phrase="已进入安全通信" filename="call_secured.wav"/>
|
||||
<prompt phrase="然后按#号" filename="followed.wav"/>
|
||||
<prompt phrase="如果您是这个人" filename="if_you_are_this_person.wav"/>
|
||||
<prompt phrase="如果您愿意" filename="if_you_would_like_to.wav"/>
|
||||
<prompt phrase="提供参考号码" filename="provide_reference_number.wav"/>
|
||||
<prompt phrase="请输入您想要转移到的分机号" filename="transfer1.wav"/>
|
||||
<prompt phrase="转移" filename="transfer2.wav"/>
|
||||
<prompt phrase="我们正在尝试呼叫" filename="we_are_trying_to_reach.wav"/>
|
||||
<prompt phrase="有错误发生,请联系管理员" filename="error.wav"/>
|
||||
<prompt phrase="您的电话将会在以下时间内挂断..." filename="misc-your_call_will_be_terminated_in.wav"/>
|
||||
<prompt phrase="您的电话已挂断" filename="misc-your_call_has_been_terminated.wav"/>
|
||||
</misc>
|
||||
</zh_CN>
|
||||
</language>
|
||||
<!-- Based on phrase_en.xml at Sep 15 2011 -->
|
541
fscomm/FSComm.2012.vcxproj
Normal file
541
fscomm/FSComm.2012.vcxproj
Normal file
@ -0,0 +1,541 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>FSComm</ProjectName>
|
||||
<ProjectGuid>{7D3122C7-C9D0-3748-81F8-F0DDCB40BF5E}</ProjectGuid>
|
||||
<RootNamespace>FSComm</RootNamespace>
|
||||
<Keyword>Qt4VSv1.0</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\</IntDir>
|
||||
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\</IntDir>
|
||||
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
<EnableErrorChecks>None</EnableErrorChecks>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>-Zm200 -w34100 -w34189 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include;.;$(QTDIR)\include\ActiveQt;debug;$(QTDIR)\mkspecs\win32-msvc2008;..\src\include;$(QTDIR)\include\QtXml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<AssemblerListingLocation>
|
||||
</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" "/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>$(QTDIR)\lib\qtmaind.lib;$(QTDIR)\lib\QtGuid4.lib;$(QTDIR)\lib\QtCored4.lib;$(QTDIR)\lib\QtXml4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>debug\FSComm.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<LinkTimeCodeGeneration>
|
||||
</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
<DefaultCharType>Unsigned</DefaultCharType>
|
||||
<EnableErrorChecks>None</EnableErrorChecks>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalOptions>-Zm200 -w34100 -w34189 -w34100 -w34189 %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include;.;$(QTDIR)\include\ActiveQt;release;$(QTDIR)\mkspecs\win32-msvc2008;..\src\include;$(QTDIR)\include\QtXml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>QT_NO_DEBUG;NDEBUG;_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_NO_DEBUG;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<AssemblerListingLocation>
|
||||
</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>QT_NO_DEBUG;NDEBUG;_WINDOWS;UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_DLL;QT_NO_DEBUG;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>"/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" "/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>$(QTDIR)\lib\qtmain.lib;$(QTDIR)\lib\QtGui4.lib;$(QTDIR)\lib\QtCore4.lib;$(QTDIR)\lib\QtXml4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>release\FSComm.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<LinkTimeCodeGeneration>
|
||||
</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="account.cpp" />
|
||||
<ClCompile Include="preferences\accountdialog.cpp" />
|
||||
<ClCompile Include="call.cpp" />
|
||||
<ClCompile Include="channel.cpp" />
|
||||
<ClCompile Include="widgets\codecwidget.cpp" />
|
||||
<ClCompile Include="debugtools\consolewindow.cpp" />
|
||||
<ClCompile Include="fshost.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="mainwindow.cpp" />
|
||||
<ClCompile Include="mod_qsettings\mod_qsettings.cpp" />
|
||||
<ClCompile Include="preferences\prefaccounts.cpp" />
|
||||
<ClCompile Include="preferences\prefdialog.cpp" />
|
||||
<ClCompile Include="preferences\prefportaudio.cpp" />
|
||||
<ClCompile Include="preferences\prefsofia.cpp" />
|
||||
<ClCompile Include="debugtools\sortfilterproxymodel.cpp" />
|
||||
<ClCompile Include="debugtools\statedebugdialog.cpp" />
|
||||
<ClCompile Include="debug\moc_accountdialog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_codecwidget.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_consolewindow.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debug\moc_fshost.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_mainwindow.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_prefaccounts.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debug\moc_prefdialog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_prefportaudio.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_prefsofia.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_sortfilterproxymodel.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\moc_statedebugdialog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="debug\qrc_resources.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_accountdialog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_codecwidget.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_consolewindow.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_fshost.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_mainwindow.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_prefaccounts.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_prefdialog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_prefportaudio.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_prefsofia.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_sortfilterproxymodel.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\moc_statedebugdialog.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="release\qrc_resources.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="account.h" />
|
||||
<CustomBuild Include="preferences\accountdialog.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC accountdialog.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_accountdialog.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\accountdialog.h -o debug\moc_accountdialog.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;accountdialog.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_accountdialog.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC accountdialog.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_accountdialog.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\accountdialog.h -o release\moc_accountdialog.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;accountdialog.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_accountdialog.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="call.h" />
|
||||
<ClInclude Include="channel.h" />
|
||||
<CustomBuild Include="widgets\codecwidget.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC codecwidget.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_codecwidget.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 widgets\codecwidget.h -o debug\moc_codecwidget.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;codecwidget.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_codecwidget.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC prefportaudio.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_codecwidget.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 widgets\codecwidget.h -o release\moc_codecwidget.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;codecwidget.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_codecwidget.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="debugtools\consolewindow.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC consolewindow.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_consolewindow.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 debugtools\consolewindow.h -o debug\moc_consolewindow.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;consolewindow.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_consolewindow.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC consolewindow.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_consolewindow.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 debugtools\consolewindow.h -o release\moc_consolewindow.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;consolewindow.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_consolewindow.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="fshost.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC fshost.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_fshost.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 fshost.h -o debug\moc_fshost.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;fshost.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_fshost.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC fshost.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_fshost.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 fshost.h -o release\moc_fshost.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;fshost.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_fshost.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="mainwindow.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC mainwindow.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_mainwindow.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 mainwindow.h -o debug\moc_mainwindow.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;mainwindow.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_mainwindow.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC mainwindow.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_mainwindow.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 mainwindow.h -o release\moc_mainwindow.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;mainwindow.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_mainwindow.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="mod_qsettings\mod_qsettings.h" />
|
||||
<CustomBuild Include="preferences\prefaccounts.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC prefaccounts.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_prefaccounts.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefaccounts.h -o debug\moc_prefaccounts.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;prefaccounts.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_prefaccounts.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC prefaccounts.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_prefaccounts.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefaccounts.h -o release\moc_prefaccounts.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;prefaccounts.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_prefaccounts.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="preferences\prefdialog.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC prefdialog.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_prefdialog.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefdialog.h -o debug\moc_prefdialog.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;prefdialog.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_prefdialog.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC prefdialog.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_prefdialog.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefdialog.h -o release\moc_prefdialog.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;prefdialog.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_prefdialog.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="preferences\prefportaudio.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC prefportaudio.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_prefportaudio.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefportaudio.h -o debug\moc_prefportaudio.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;prefportaudio.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_prefportaudio.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC prefportaudio.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_prefportaudio.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefportaudio.h -o release\moc_prefportaudio.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;prefportaudio.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_prefportaudio.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="preferences\prefsofia.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC prefsofia.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_prefsofia.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefsofia.h -o debug\moc_prefsofia.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;prefsofia.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_prefsofia.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC prefportaudio.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_prefsofia.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 preferences\prefsofia.h -o release\moc_prefsofia.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;prefsofia.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_prefsofia.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="debugtools\sortfilterproxymodel.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC sortfilterproxymodel.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_sortfilterproxymodel.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 debugtools\sortfilterproxymodel.h -o debug\moc_sortfilterproxymodel.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;sortfilterproxymodel.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_sortfilterproxymodel.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC sortfilterproxymodel.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_sortfilterproxymodel.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 debugtools\sortfilterproxymodel.h -o release\moc_sortfilterproxymodel.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;sortfilterproxymodel.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_sortfilterproxymodel.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="debugtools\statedebugdialog.h">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC statedebugdialog.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile debug\moc_statedebugdialog.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"debug" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 debugtools\statedebugdialog.h -o debug\moc_statedebugdialog.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;statedebugdialog.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\moc_statedebugdialog.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC prefportaudio.h</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile release\moc_statedebugdialog.cpp
|
||||
$(QTDIR)\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"$(QTDIR)\include\QtCore" -I"$(QTDIR)\include\QtGui" -I"$(QTDIR)\include" -I"." -I"$(QTDIR)\include\ActiveQt" -I"release" -I"." -I$(QTDIR)\mkspecs\win32-msvc2008 -D_MSC_VER=1500 -DWIN32 debugtools\statedebugdialog.h -o release\moc_statedebugdialog.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;statedebugdialog.h;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\moc_statedebugdialog.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="ui_accountdialog.h" />
|
||||
<ClInclude Include="ui_codecwidget.h" />
|
||||
<ClInclude Include="ui_consolewindow.h" />
|
||||
<ClInclude Include="ui_mainwindow.h" />
|
||||
<ClInclude Include="ui_prefdialog.h" />
|
||||
<ClInclude Include="ui_statedebugdialog.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="preferences\accountdialog.ui">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC accountdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_accountdialog.h
|
||||
$(QTDIR)\bin\uic.exe preferences\accountdialog.ui -o ui_accountdialog.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;accountdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ui_accountdialog.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC accountdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_accountdialog.h
|
||||
$(QTDIR)\bin\uic.exe preferences\accountdialog.ui -o ui_accountdialog.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;accountdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ui_accountdialog.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="widgets\codecwidget.ui">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC codecwidget.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_codecwidget.h
|
||||
$(QTDIR)\bin\uic.exe widgets\codecwidget.ui -o ui_codecwidget.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;codecwidgets.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ui_codecwidget.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC codecwidget.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_codecwidget.h
|
||||
$(QTDIR)\bin\uic.exe widgets\codecwidget.ui -o ui_codecwidget.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;codecwidget.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ui_codecwidget.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="debugtools\consolewindow.ui">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC consolewindow.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_consolewindow.h
|
||||
$(QTDIR)\bin\uic.exe debugtools\consolewindow.ui -o ui_consolewindow.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;consolewindow.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ui_consolewindow.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC accountdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_consolewindow.h
|
||||
$(QTDIR)\bin\uic.exe debugtools\consolewindow.ui -o ui_consolewindow.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;accountdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ui_consolewindow.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="mainwindow.ui">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC mainwindow.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_mainwindow.h
|
||||
$(QTDIR)\bin\uic.exe mainwindow.ui -o ui_mainwindow.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;mainwindow.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ui_mainwindow.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC mainwindow.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_mainwindow.h
|
||||
$(QTDIR)\bin\uic.exe mainwindow.ui -o ui_mainwindow.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;mainwindow.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ui_mainwindow.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="preferences\prefdialog.ui">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC prefdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_prefdialog.h
|
||||
$(QTDIR)\bin\uic.exe preferences\prefdialog.ui -o ui_prefdialog.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;prefdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ui_prefdialog.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC prefdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_prefdialog.h
|
||||
$(QTDIR)\bin\uic.exe preferences\prefdialog.ui -o ui_prefdialog.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;prefdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ui_prefdialog.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="debugtools\statedebugdialog.ui">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC statedebugdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_statedebugdialog.h
|
||||
$(QTDIR)\bin\uic.exe debugtools\statedebugdialog.ui -o ui_statedebugdialog.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rem;statedebugdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ui_statedebugdialog.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC statedebugdialog.ui</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem IncrediBuild_AllowRemote
|
||||
Rem IncrediBuild_OutputFile .\ui_statedebugdialog.h
|
||||
$(QTDIR)\bin\uic.exe debugtools\statedebugdialog.ui -o ui_statedebugdialog.h
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rem;statedebugdialog.ui;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ui_statedebugdialog.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<None Include="conf\event_socket.conf.xml" />
|
||||
<None Include="conf\accounts\example.xml" />
|
||||
<None Include="conf\freeswitch.xml" />
|
||||
<None Include="conf\portaudio.conf.xml" />
|
||||
<None Include="resources\pref_audio.gif" />
|
||||
<None Include="resources\pref_sip.png" />
|
||||
<CustomBuild Include="resources.qrc">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">RCC resources.qrc</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\rcc.exe -name resources resources.qrc -o debug\qrc_resources.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\rcc.exe;conf\accounts\example.xml;conf\event_socket.conf.xml;conf\freeswitch.xml;conf\portaudio.conf.xml;resources.qrc;resources\pref_audio.gif;resources\pref_sip.png;resources\splash.png;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">debug\qrc_resources.cpp;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">RCC resources.qrc</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\rcc.exe -name resources resources.qrc -o release\qrc_resources.cpp
|
||||
</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\rcc.exe;conf\accounts\example.xml;conf\event_socket.conf.xml;conf\freeswitch.xml;conf\portaudio.conf.xml;resources.qrc;resources\pref_audio.gif;resources\pref_sip.png;resources\splash.png;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">release\qrc_resources.cpp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<None Include="resources\splash.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\w32\Library\FreeSwitchCore.2008.vcxproj">
|
||||
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
3
libs/.gitignore
vendored
3
libs/.gitignore
vendored
@ -357,6 +357,7 @@ opal
|
||||
/libwebsockets/test-server/Makefile.in
|
||||
/mongo-cxx-driver-v*/
|
||||
/mpg123/
|
||||
/libmpg123/
|
||||
/openldap-*/
|
||||
/openssl-*/
|
||||
/openzap/build/compile
|
||||
@ -918,6 +919,8 @@ opal
|
||||
/xmlrpc-c/tools/lib/blddir
|
||||
/xmlrpc-c/tools/lib/depend.mk
|
||||
/xmlrpc-c/tools/lib/srcdir
|
||||
/sipcc/Makefile
|
||||
/sipcc/Makefile.in
|
||||
|
||||
/yaml/
|
||||
/yaml/config.h
|
||||
|
@ -103,7 +103,6 @@ BV_DECLARE(int) bv16_encode(bv16_encode_state_t *cs,
|
||||
Float gainq;
|
||||
Float lg;
|
||||
Float ppt;
|
||||
Float lth;
|
||||
Float dummy;
|
||||
int pp;
|
||||
int cpp;
|
||||
@ -189,8 +188,15 @@ BV_DECLARE(int) bv16_encode(bv16_encode_state_t *cs,
|
||||
|
||||
/* Level estimation */
|
||||
dummy = estl_alpha;
|
||||
lth = estlevel(cs->prevlg[0], &cs->level, &cs->lmax, &cs->lmin,
|
||||
&cs->lmean, &cs->x1, LGPORDER + 1, Nfdm + 1, &dummy);
|
||||
estlevel(cs->prevlg[0],
|
||||
&cs->level,
|
||||
&cs->lmax,
|
||||
&cs->lmin,
|
||||
&cs->lmean,
|
||||
&cs->x1,
|
||||
LGPORDER + 1,
|
||||
Nfdm + 1,
|
||||
&dummy);
|
||||
|
||||
/* Scale the scalar quantizer codebook */
|
||||
for (i = 0; i < (VDIM*CBSZ); i++)
|
||||
|
@ -103,7 +103,6 @@ BV_DECLARE(int) bv32_encode(bv32_encode_state_t *cs,
|
||||
Float e;
|
||||
Float ee;
|
||||
Float ppt;
|
||||
Float lth;
|
||||
int pp;
|
||||
int cpp;
|
||||
int i;
|
||||
@ -193,8 +192,8 @@ BV_DECLARE(int) bv32_encode(bv32_encode_state_t *cs,
|
||||
lg = (ee < TMinE) ? MinE : log(ee/SFRSZ)/log(2.0);
|
||||
bs.gidx[issf] = bv32_gainquan(gainq + issf, lg, cs->lgpm, cs->prevlg, cs->level);
|
||||
|
||||
/* Level Estimation */
|
||||
lth = bv32_estlevel(cs->prevlg[0], &cs->level, &cs->lmax, &cs->lmin, &cs->lmean, &cs->x1);
|
||||
/* Level estimation */
|
||||
bv32_estlevel(cs->prevlg[0], &cs->level, &cs->lmax, &cs->lmin, &cs->lmean, &cs->x1);
|
||||
|
||||
/* Scale the excitation codebook */
|
||||
for (i = 0; i < (VDIM*CBSZ); i++)
|
||||
|
206
libs/broadvoice/src/libbroadvoice.2012.vcxproj
Normal file
206
libs/broadvoice/src/libbroadvoice.2012.vcxproj
Normal file
@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>libbroadvoice</ProjectName>
|
||||
<ProjectGuid>{CF70F278-3364-4395-A2E1-23501C9B8AD2}</ProjectGuid>
|
||||
<RootNamespace>libbroadvoice</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extdll.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extdll.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extdll.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extdll.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.; .\floating\common; .\floating\bv16; .\floating\bv32; .\broadvoice; .\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BROADVOICE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.; .\floating\common; .\floating\bv16; .\floating\bv32; .\broadvoice; .\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BROADVOICE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.; .\floating\common; .\floating\bv16; .\floating\bv32; .\broadvoice; .\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BROADVOICE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.; .\floating\common; .\floating\bv16; .\floating\bv32; .\broadvoice; .\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BROADVOICE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="bitstream.c" />
|
||||
<ClCompile Include="floating\common\a2lsp.c" />
|
||||
<ClCompile Include="floating\common\allpole.c" />
|
||||
<ClCompile Include="floating\common\allzero.c" />
|
||||
<ClCompile Include="floating\common\autocor.c" />
|
||||
<ClCompile Include="floating\common\cmtables.c" />
|
||||
<ClCompile Include="floating\common\levdur.c" />
|
||||
<ClCompile Include="floating\common\lsp2a.c" />
|
||||
<ClCompile Include="floating\common\stblchck.c" />
|
||||
<ClCompile Include="floating\common\stblzlsp.c" />
|
||||
<ClCompile Include="floating\common\utility.c" />
|
||||
<ClCompile Include="bitpack16.c" />
|
||||
<ClCompile Include="floating\bv16\bv16decoder.c" />
|
||||
<ClCompile Include="floating\bv16\bv16encoder.c" />
|
||||
<ClCompile Include="floating\bv16\bv16coarse_pitch.c" />
|
||||
<ClCompile Include="floating\bv16\bv16excdec.c" />
|
||||
<ClCompile Include="floating\bv16\bv16excquan.c" />
|
||||
<ClCompile Include="floating\bv16\bv16fine_pitch.c" />
|
||||
<ClCompile Include="floating\bv16\bv16gaindec.c" />
|
||||
<ClCompile Include="floating\bv16\bv16gainquan.c" />
|
||||
<ClCompile Include="floating\bv16\bv16levelest.c" />
|
||||
<ClCompile Include="floating\bv16\bv16lspdec.c" />
|
||||
<ClCompile Include="floating\bv16\bv16lspquan.c" />
|
||||
<ClCompile Include="floating\bv16\bv16plc.c" />
|
||||
<ClCompile Include="floating\bv16\bv16ptdec.c" />
|
||||
<ClCompile Include="floating\bv16\bv16postfilter.c" />
|
||||
<ClCompile Include="floating\bv16\bv16ptquan.c" />
|
||||
<ClCompile Include="floating\bv16\bv16tables.c" />
|
||||
<ClCompile Include="bitpack32.c" />
|
||||
<ClCompile Include="floating\bv32\bv32decoder.c" />
|
||||
<ClCompile Include="floating\bv32\bv32encoder.c" />
|
||||
<ClCompile Include="floating\bv32\bv32coarse_pitch.c" />
|
||||
<ClCompile Include="floating\bv32\bv32excdec.c" />
|
||||
<ClCompile Include="floating\bv32\bv32excquan.c" />
|
||||
<ClCompile Include="floating\bv32\bv32fine_pitch.c" />
|
||||
<ClCompile Include="floating\bv32\bv32gaindec.c" />
|
||||
<ClCompile Include="floating\bv32\bv32gainquan.c" />
|
||||
<ClCompile Include="floating\bv32\bv32levelest.c" />
|
||||
<ClCompile Include="floating\bv32\bv32lspdec.c" />
|
||||
<ClCompile Include="floating\bv32\bv32lspquan.c" />
|
||||
<ClCompile Include="floating\bv32\bv32plc.c" />
|
||||
<ClCompile Include="floating\bv32\bv32ptdec.c" />
|
||||
<ClCompile Include="floating\bv32\bv32ptquan.c" />
|
||||
<ClCompile Include="floating\bv32\bv32tables.c" />
|
||||
<ClCompile Include="msvc\gettimeofday.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="broadvoice\broadvoice.h" />
|
||||
<ClInclude Include="broadvoice\version.h" />
|
||||
<ClInclude Include="broadvoice\private\broadvoice.h" />
|
||||
<ClInclude Include="broadvoice.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
211
libs/esl/fs_cli.2012.vcxproj
Normal file
211
libs/esl/fs_cli.2012.vcxproj
Normal file
@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>fs_cli</ProjectName>
|
||||
<ProjectGuid>{D2FB8043-D208-4AEE-8F18-3B5857C871B9}</ProjectGuid>
|
||||
<RootNamespace>fs_cli</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<BuildLog />
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)getopt;$(ProjectDir)src/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;6053;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)fs_cli.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<BuildLog />
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)getopt;$(ProjectDir)src/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;6053;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)fs_cli.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<BuildLog />
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)getopt;$(ProjectDir)src/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;6053;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)fs_cli.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<BuildLog />
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)getopt;$(ProjectDir)src/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4100;6053;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)fs_cli.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fs_cli.c" />
|
||||
<ClCompile Include="getopt\getopt_long.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="getopt\getopt.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="src\esl.2012.vcxproj">
|
||||
<Project>{cf405366-9558-4ae8-90ef-5e21b51ccb4e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -64,6 +64,7 @@ typedef struct {
|
||||
char output_text_color[12];
|
||||
} cli_profile_t;
|
||||
|
||||
static int is_color = 1;
|
||||
static int warn_stop = 0;
|
||||
static int connected = 0;
|
||||
static int allow_ctl_c = 0;
|
||||
@ -598,7 +599,8 @@ static const char *usage_str =
|
||||
" -R, --reconnect Reconnect if disconnected\n"
|
||||
" -d, --debug=level Debug Level (0 - 7)\n"
|
||||
" -b, --batchmode Batch mode\n"
|
||||
" -t, --timeout Timeout for API commands (in miliseconds)\n\n";
|
||||
" -t, --timeout Timeout for API commands (in miliseconds)\n"
|
||||
" -n, --no-color Disable color\n\n";
|
||||
|
||||
static int usage(char *name){
|
||||
printf(usage_str, name);
|
||||
@ -966,7 +968,7 @@ static const char *banner =
|
||||
|
||||
static const char *inf = "Type /help <enter> to see a list of commands\n\n\n";
|
||||
|
||||
static void print_banner(FILE *stream)
|
||||
static void print_banner(FILE *stream, int color)
|
||||
{
|
||||
int x;
|
||||
const char *use = NULL;
|
||||
@ -978,22 +980,36 @@ static void print_banner(FILE *stream)
|
||||
|
||||
#ifdef WIN32
|
||||
/* Print banner in yellow with blue background */
|
||||
SetConsoleTextAttribute(hStdout, ESL_SEQ_FYELLOW | BACKGROUND_BLUE);
|
||||
if (color) {
|
||||
SetConsoleTextAttribute(hStdout, ESL_SEQ_FYELLOW | BACKGROUND_BLUE);
|
||||
}
|
||||
WriteFile(hStdout, banner, (DWORD) strlen(banner), NULL, NULL);
|
||||
WriteFile(hStdout, use, (DWORD) strlen(use), NULL, NULL);
|
||||
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
|
||||
if (color) {
|
||||
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
|
||||
}
|
||||
|
||||
/* Print the rest info in default colors */
|
||||
fprintf(stream, "\n%s\n", inf);
|
||||
#else
|
||||
fprintf(stream,
|
||||
"%s%s%s%s%s%s\n%s\n",
|
||||
ESL_SEQ_DEFAULT_COLOR,
|
||||
ESL_SEQ_FYELLOW, ESL_SEQ_BBLUE,
|
||||
banner,
|
||||
use, ESL_SEQ_DEFAULT_COLOR, inf);
|
||||
|
||||
fprintf(stream, "%s", output_text_color);
|
||||
if (color) {
|
||||
fprintf(stream, "%s%s%s", ESL_SEQ_DEFAULT_COLOR, ESL_SEQ_FYELLOW, ESL_SEQ_BBLUE);
|
||||
}
|
||||
|
||||
fprintf(stream, "%s%s", banner, use);
|
||||
|
||||
|
||||
if (color) {
|
||||
fprintf(stream, "%s", ESL_SEQ_DEFAULT_COLOR);
|
||||
}
|
||||
|
||||
fprintf(stream, "\n%s\n", inf);
|
||||
|
||||
|
||||
if (color) {
|
||||
fprintf(stream, "%s", output_text_color);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (x < 160) {
|
||||
@ -1238,6 +1254,7 @@ int main(int argc, char *argv[])
|
||||
int opt;
|
||||
static struct option options[] = {
|
||||
{"help", 0, 0, 'h'},
|
||||
{"no-color", 0, 0, 'n'},
|
||||
{"host", 1, 0, 'H'},
|
||||
{"port", 1, 0, 'P'},
|
||||
{"user", 1, 0, 'u'},
|
||||
@ -1269,7 +1286,7 @@ int main(int argc, char *argv[])
|
||||
int argv_quiet = 0;
|
||||
int argv_batch = 0;
|
||||
int loops = 2, reconnect = 0, timeout = 0;
|
||||
|
||||
char *ccheck;
|
||||
|
||||
#ifdef WIN32
|
||||
feature_level = 0;
|
||||
@ -1277,6 +1294,10 @@ int main(int argc, char *argv[])
|
||||
feature_level = 1;
|
||||
#endif
|
||||
|
||||
if ((ccheck = getenv("FS_CLI_COLOR"))) {
|
||||
is_color = esl_true(ccheck);
|
||||
}
|
||||
|
||||
strncpy(internal_profile.host, "127.0.0.1", sizeof(internal_profile.host));
|
||||
strncpy(internal_profile.pass, "ClueCon", sizeof(internal_profile.pass));
|
||||
strncpy(internal_profile.name, "internal", sizeof(internal_profile.name));
|
||||
@ -1299,7 +1320,7 @@ int main(int argc, char *argv[])
|
||||
esl_global_set_default_logger(6); /* default debug level to 6 (info) */
|
||||
for(;;) {
|
||||
int option_index = 0;
|
||||
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:t:qrRhib?", options, &option_index);
|
||||
opt = getopt_long(argc, argv, "H:U:P:S:u:p:d:x:l:t:qrRhib?n", options, &option_index);
|
||||
if (opt == -1) break;
|
||||
switch (opt) {
|
||||
case 'H':
|
||||
@ -1315,6 +1336,9 @@ int main(int argc, char *argv[])
|
||||
argv_error = 1;
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
is_color = 0;
|
||||
break;
|
||||
case 'u':
|
||||
esl_set_string(temp_user, optarg);
|
||||
argv_user = 1;
|
||||
@ -1359,7 +1383,7 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
print_banner(stdout);
|
||||
print_banner(stdout, is_color);
|
||||
usage(argv[0]);
|
||||
return 0;
|
||||
default:
|
||||
@ -1501,6 +1525,14 @@ int main(int argc, char *argv[])
|
||||
el_set(el, EL_BIND, "\033OQ", "f2-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OR", "f3-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OS", "f4-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OT", "f5-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OU", "f6-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OV", "f7-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OW", "f8-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OX", "f9-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OY", "f10-key", NULL);
|
||||
el_set(el, EL_BIND, "\033OZ", "f11-key", NULL);
|
||||
el_set(el, EL_BIND, "\033O[", "f12-key", NULL);
|
||||
|
||||
el_set(el, EL_BIND, "\033[11~", "f1-key", NULL);
|
||||
el_set(el, EL_BIND, "\033[12~", "f2-key", NULL);
|
||||
@ -1545,7 +1577,7 @@ int main(int argc, char *argv[])
|
||||
if (global_profile->batch_mode) {
|
||||
setvbuf(stdout, (char*)NULL, _IONBF, 0);
|
||||
}
|
||||
print_banner(stdout);
|
||||
print_banner(stdout, is_color);
|
||||
esl_log(ESL_LOG_INFO, "FS CLI Ready.\nenter /help for a list of commands.\n");
|
||||
output_printf("%s\n", handle.last_sr_reply);
|
||||
while (running > 0) {
|
||||
|
199
libs/esl/managed/ESL.2012.vcxproj
Normal file
199
libs/esl/managed/ESL.2012.vcxproj
Normal file
@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>ESL</ProjectName>
|
||||
<ProjectGuid>{FEA2D0AE-6713-4E41-A473-A143849BC7FF}</ProjectGuid>
|
||||
<RootNamespace>ESL</RootNamespace>
|
||||
<Keyword>ManagedCProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<CLRSupport>true</CLRSupport>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\libs\esl\src\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
<TargetMachine>NotSet</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\libs\esl\src\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\libs\esl\src\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>esl.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\..\..\libs\esl\src\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\esl_oop.cpp" />
|
||||
<ClCompile Include="esl_wrap.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\include\esl_oop.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
30
libs/esl/managed/ESL.2012.vcxproj.filters
Normal file
30
libs/esl/managed/ESL.2012.vcxproj.filters
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\esl_oop.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_wrap.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\include\esl_oop.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
93
libs/esl/managed/ManagedEsl.2012.csproj
Normal file
93
libs/esl/managed/ManagedEsl.2012.csproj
Normal file
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DEE5837B-E01D-4223-B351-EDF9418F3F8E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ManagedEsl</RootNamespace>
|
||||
<AssemblyName>ManagedEsl</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ESL.cs" />
|
||||
<Compile Include="ESLconnection.cs" />
|
||||
<Compile Include="ESLevent.cs" />
|
||||
<Compile Include="ESLPINVOKE.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SWIGTYPE_p_esl_event_t.cs" />
|
||||
<Compile Include="SWIGTYPE_p_esl_priority_t.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
98
libs/esl/managed/ManagedEslTest/ManagedEslTest.2012.csproj
Normal file
98
libs/esl/managed/ManagedEslTest/ManagedEslTest.2012.csproj
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2321D01A-D64B-4461-9837-FACF38652212}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ManagedEslTest</RootNamespace>
|
||||
<AssemblyName>ManagedEslTest</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ManagedEsl.csproj">
|
||||
<Project>{DEE5837B-E01D-4223-B351-EDF9418F3F8E}</Project>
|
||||
<Name>ManagedEsl</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
74
libs/esl/managed/managed_esl.2012.sln
Normal file
74
libs/esl/managed/managed_esl.2012.sln
Normal file
@ -0,0 +1,74 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ESL", "ESL.2012.vcxproj", "{FEA2D0AE-6713-4E41-A473-A143849BC7FF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManagedEsl.2012", "ManagedEsl.2012.csproj", "{DEE5837B-E01D-4223-B351-EDF9418F3F8E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF} = {FEA2D0AE-6713-4E41-A473-A143849BC7FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManagedEslTest.2012", "ManagedEslTest\ManagedEslTest.2012.csproj", "{2321D01A-D64B-4461-9837-FACF38652212}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF} = {FEA2D0AE-6713-4E41-A473-A143849BC7FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Debug|x64.Build.0 = Debug|x64
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|Win32.Build.0 = Release|Win32
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|x64.ActiveCfg = Release|x64
|
||||
{FEA2D0AE-6713-4E41-A473-A143849BC7FF}.Release|x64.Build.0 = Release|x64
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DEE5837B-E01D-4223-B351-EDF9418F3F8E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2321D01A-D64B-4461-9837-FACF38652212}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
158
libs/esl/src/esl.2012.vcxproj
Normal file
158
libs/esl/src/esl.2012.vcxproj
Normal file
@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>esl</ProjectName>
|
||||
<ProjectGuid>{CF405366-9558-4AE8-90EF-5E21B51CCB4E}</ProjectGuid>
|
||||
<RootNamespace>esl</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;ESL_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<DisableSpecificWarnings>4706;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="esl.c" />
|
||||
<ClCompile Include="esl_config.c" />
|
||||
<ClCompile Include="esl_event.c">
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">6001;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">6001;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">6001;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">6001;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_json.c" />
|
||||
<ClCompile Include="esl_threadmutex.c">
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">28125;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">28125;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">28125;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">28125;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_buffer.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\esl.h" />
|
||||
<ClInclude Include="include\esl_config.h" />
|
||||
<ClInclude Include="include\esl_event.h" />
|
||||
<ClInclude Include="include\esl_json.h" />
|
||||
<ClInclude Include="include\esl_threadmutex.h" />
|
||||
<ClInclude Include="include\esl_buffer.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
53
libs/esl/src/esl.2012.vcxproj.filters
Normal file
53
libs/esl/src/esl.2012.vcxproj.filters
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="esl.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_config.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_event.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_json.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_threadmutex.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="esl_buffer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\esl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\esl_config.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\esl_event.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\esl_json.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\esl_threadmutex.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\esl_buffer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -506,6 +506,11 @@ ESL_DECLARE(esl_status_t) esl_sendevent(esl_handle_t *handle, esl_event_t *event
|
||||
len = strlen(txt) + 100;
|
||||
event_buf = malloc(len);
|
||||
assert(event_buf);
|
||||
|
||||
if (!event_buf) {
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
memset(event_buf, 0, len);
|
||||
|
||||
snprintf(event_buf, len, "sendevent %s\n%s", esl_event_name(event->event_id), txt);
|
||||
@ -566,6 +571,11 @@ ESL_DECLARE(esl_status_t) esl_sendmsg(esl_handle_t *handle, esl_event_t *event,
|
||||
len = strlen(txt) + 100;
|
||||
cmd_buf = malloc(len);
|
||||
assert(cmd_buf);
|
||||
|
||||
if (!cmd_buf) {
|
||||
return ESL_FAIL;
|
||||
}
|
||||
|
||||
memset(cmd_buf, 0, len);
|
||||
|
||||
if (uuid) {
|
||||
|
@ -499,6 +499,18 @@ with the signaling protocols that you can run on top of your I/O interfaces.
|
||||
|
||||
<param name="cid-name-transmit-method" value="default"/>
|
||||
-->
|
||||
<!--
|
||||
Send CONNECT ACK
|
||||
Whether to send a Connect Ack
|
||||
|
||||
Possible values:
|
||||
yes - send connect ack
|
||||
no - do not send connect ack
|
||||
default (will transmit Connect Ack based on variant + signaling)
|
||||
|
||||
<param name="send-connect-ack" value="yes"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Q.931 Timers in seconds
|
||||
|
||||
|
@ -283,6 +283,19 @@ then
|
||||
AC_MSG_NOTICE([You will need libpri-1.4.12_beta1 or newer for AOC event support])]
|
||||
)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether libpri has pri_maintenance_service()])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[extern int pri_maintenance_service(void);],
|
||||
[pri_maintenance_service();]
|
||||
)],
|
||||
[AC_DEFINE([HAVE_LIBPRI_MAINT_SERVICE], [1], [libpri has pri_maintenance_service()])
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([You will need libpri-1.4.11 or newer for the ftdm libpri maintenance set of commands])]
|
||||
)
|
||||
|
||||
# libpri is available, set variables for Makefile(.am)
|
||||
AC_SUBST([LIBPRI_LIBS], [-lpri])
|
||||
AC_SUBST([LIBPRI_LDFLAGS])
|
||||
|
@ -489,6 +489,10 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||
if (tech_pvt->write_codec.implementation) {
|
||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||
}
|
||||
|
||||
switch_core_session_unset_read_codec(session);
|
||||
switch_core_session_unset_write_codec(session);
|
||||
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -522,6 +522,9 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||
if (tech_pvt->write_codec.implementation) {
|
||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||
}
|
||||
|
||||
switch_core_session_unset_read_codec(session);
|
||||
switch_core_session_unset_write_codec(session);
|
||||
|
||||
ftdm_channel_close(&tech_pvt->ftdm_channel);
|
||||
}
|
||||
|
@ -207,6 +207,7 @@ static int parse_debug(const char *in, uint32_t *flags)
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBPRI_MAINT_SERVICE
|
||||
/**
|
||||
* \brief Parses a change status string to flags
|
||||
* \param in change status string to parse for
|
||||
@ -232,6 +233,8 @@ static int parse_change_status(const char *in)
|
||||
|
||||
return flags;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int print_debug(uint32_t flags, char *tmp, const int size)
|
||||
{
|
||||
@ -441,7 +444,9 @@ static const char *ftdm_libpri_usage =
|
||||
"libpri kill <span>\n"
|
||||
"libpri reset <span>\n"
|
||||
"libpri restart <span> <channel/all>\n"
|
||||
#ifdef HAVE_LIBPRI_MAINT_SERVICE
|
||||
"libpri maintenance <span> <channel/all> <in/maint/out>\n"
|
||||
#endif
|
||||
"libpri debug <span> [all|none|flag,...flagN]\n"
|
||||
"libpri msn <span>\n"
|
||||
"\n"
|
||||
@ -650,6 +655,7 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_LIBPRI_MAINT_SERVICE
|
||||
if (!strcasecmp(argv[0], "maintenance") && argc > 3) {
|
||||
ftdm_span_t *span = NULL;
|
||||
if (ftdm_span_find_by_name(argv[1], &span) == FTDM_SUCCESS) {
|
||||
@ -681,6 +687,7 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
/* zero args print usage */
|
||||
stream->write_function(stream, ftdm_libpri_usage);
|
||||
@ -2167,7 +2174,7 @@ static int on_restart_ack(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri
|
||||
/*
|
||||
* FACILITY Advice-On-Charge handler
|
||||
*/
|
||||
#ifdef HAVE_LIBPRI_AOC
|
||||
#if defined(HAVE_LIBPRI_AOC) && defined(PRI_EVENT_FACILITY)
|
||||
static const char *aoc_billing_id(const int id)
|
||||
{
|
||||
switch (id) {
|
||||
@ -2286,6 +2293,7 @@ static int handle_facility_aoc_e(const struct pri_subcmd_aoc_e *aoc_e)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PRI_EVENT_FACILITY
|
||||
/**
|
||||
* \brief Handler for libpri facility events
|
||||
* \param spri Pri wrapper structure (libpri, span, dchan)
|
||||
@ -2341,6 +2349,7 @@ static int on_facility(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_ev
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Caught Event on span %d %u (%s)\n", ftdm_span_get_id(spri->span), event_type, lpwrap_pri_event_str(event_type));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Handler for libpri dchan up event
|
||||
@ -2526,10 +2535,12 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
|
||||
pri_facility_enable(isdn_data->spri.pri);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_LIBPRI_MAINT_SERVICE
|
||||
/* Support the different switch of service status */
|
||||
if (isdn_data->service_message_support) {
|
||||
pri_set_service_message_support(isdn_data->spri.pri, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Callbacks for libpri events */
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_ANY, on_anything);
|
||||
@ -2548,7 +2559,9 @@ static void *ftdm_libpri_run(ftdm_thread_t *me, void *obj)
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_RESTART, on_restart);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_RESTART_ACK, on_restart_ack);
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_IO_FAIL, on_io_fail);
|
||||
#ifdef PRI_EVENT_FACILITY
|
||||
LPWRAP_MAP_PRI_EVENT(isdn_data->spri, LPWRAP_PRI_EVENT_FACILITY, on_facility);
|
||||
#endif
|
||||
|
||||
/* Callback invoked on each iteration of the lpwrap_run_pri() event loop */
|
||||
isdn_data->spri.on_loop = check_flags;
|
||||
|
@ -924,7 +924,7 @@ static int misdn_handle_mph_information_ind(ftdm_channel_t *chan, const struct m
|
||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "mISDN port state:\n\tD-Chan proto:\t%hu\n\tD-Chan state:\t%s (%hu)\n\tD-Chan flags:\t%#"FTDM_XINT64_FMT"\n\t\t\t%-70s\n",
|
||||
info->dch.ch.protocol,
|
||||
misdn_hw_state_name(info->dch.ch.protocol, info->dch.state), info->dch.state,
|
||||
info->dch.ch.Flags,
|
||||
(uint64_t)info->dch.ch.Flags,
|
||||
misdn_hw_print_flags(info->dch.ch.Flags, tmp, sizeof(tmp) - 1));
|
||||
|
||||
/* TODO: try to translate this to a usable set of alarm flags */
|
||||
@ -2269,14 +2269,23 @@ static ftdm_status_t handle_b_channel_event(ftdm_channel_t *chan)
|
||||
struct misdn_chan_private *priv = ftdm_chan_io_private(chan);
|
||||
char buf[MAX_DATA_MEM] = { 0 };
|
||||
struct mISDNhead *mh = (void *)buf;
|
||||
int retval;
|
||||
int retval, retries = 5;
|
||||
|
||||
if ((retval = recvfrom(chan->sockfd, buf, sizeof(buf), 0, NULL, NULL)) <= 0) {
|
||||
do {
|
||||
/*
|
||||
* Retry reading multiple times if recvfrom() returns EAGAIN
|
||||
*/
|
||||
retval = recvfrom(chan->sockfd, buf, sizeof(buf), 0, NULL, NULL);
|
||||
if (retval < 0 && errno != EAGAIN)
|
||||
break;
|
||||
|
||||
} while (retval < 0 && retries-- > 0);
|
||||
|
||||
if (retval < 0) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_ERROR, "mISDN failed to receive message: %s\n",
|
||||
strerror(errno));
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
if (retval < MISDN_HEADER_LEN) {
|
||||
ftdm_log_chan(chan, FTDM_LOG_ERROR, "mISDN message too short, min.: %d, read: %d\n",
|
||||
(int)MISDN_HEADER_LEN, retval);
|
||||
@ -2289,7 +2298,7 @@ static ftdm_status_t handle_b_channel_event(ftdm_channel_t *chan)
|
||||
char *data = buf + MISDN_HEADER_LEN;
|
||||
|
||||
/* Discard incoming audio if not active */
|
||||
if (!priv->active) {
|
||||
if (priv->active) {
|
||||
/* Convert audio data */
|
||||
misdn_convert_audio_bits(data, datalen);
|
||||
|
||||
|
@ -45,6 +45,12 @@ typedef enum {
|
||||
PRITAP_MASTER = (1 << 1),
|
||||
} pritap_flags_t;
|
||||
|
||||
typedef enum {
|
||||
PRITAP_MIX_BOTH = 0,
|
||||
PRITAP_MIX_PEER,
|
||||
PRITAP_MIX_SELF,
|
||||
} pritap_mix_mode_t;
|
||||
|
||||
typedef struct {
|
||||
void *callref;
|
||||
ftdm_number_t callingnum;
|
||||
@ -66,7 +72,7 @@ typedef struct pritap {
|
||||
int32_t flags;
|
||||
struct pri *pri;
|
||||
int debug;
|
||||
uint8_t mixaudio;
|
||||
pritap_mix_mode_t mixaudio;
|
||||
ftdm_channel_t *dchan;
|
||||
ftdm_span_t *span;
|
||||
ftdm_span_t *peerspan;
|
||||
@ -101,14 +107,29 @@ static FIO_CHANNEL_OUTGOING_CALL_FUNCTION(pritap_outgoing_call)
|
||||
|
||||
static void s_pri_error(struct pri *pri, char *s)
|
||||
{
|
||||
ftdm_log(FTDM_LOG_ERROR, "%s", s);
|
||||
pritap_t *pritap = pri_get_userdata(pri);
|
||||
|
||||
if (pritap && pritap->dchan) {
|
||||
ftdm_log_chan(pritap->dchan, FTDM_LOG_ERROR, "%s", s);
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_ERROR, "%s", s);
|
||||
}
|
||||
}
|
||||
|
||||
static void s_pri_message(struct pri *pri, char *s)
|
||||
{
|
||||
ftdm_log(FTDM_LOG_DEBUG, "%s", s);
|
||||
pritap_t *pritap = pri_get_userdata(pri);
|
||||
|
||||
if (pritap && pritap->dchan) {
|
||||
ftdm_log_chan(pritap->dchan, FTDM_LOG_DEBUG, "%s", s);
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "%s", s);
|
||||
}
|
||||
}
|
||||
|
||||
#define PRI_DEBUG_Q921_ALL (PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_STATE)
|
||||
#define PRI_DEBUG_Q931_ALL (PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q931_ANOMALY)
|
||||
|
||||
static int parse_debug(const char *in)
|
||||
{
|
||||
int flags = 0;
|
||||
@ -117,6 +138,18 @@ static int parse_debug(const char *in)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(in, "none")) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(in, "all")) {
|
||||
return PRI_DEBUG_ALL;
|
||||
}
|
||||
|
||||
if (strstr(in, "q921_all")) {
|
||||
flags |= PRI_DEBUG_Q921_ALL;
|
||||
}
|
||||
|
||||
if (strstr(in, "q921_raw")) {
|
||||
flags |= PRI_DEBUG_Q921_RAW;
|
||||
}
|
||||
@ -133,6 +166,10 @@ static int parse_debug(const char *in)
|
||||
flags |= PRI_DEBUG_CONFIG;
|
||||
}
|
||||
|
||||
if (strstr(in, "q931_all")) {
|
||||
flags |= PRI_DEBUG_Q931_ALL;
|
||||
}
|
||||
|
||||
if (strstr(in, "q931_dump")) {
|
||||
flags |= PRI_DEBUG_Q931_DUMP;
|
||||
}
|
||||
@ -153,14 +190,6 @@ static int parse_debug(const char *in)
|
||||
flags |= PRI_DEBUG_AOC;
|
||||
}
|
||||
|
||||
if (strstr(in, "all")) {
|
||||
flags |= PRI_DEBUG_ALL;
|
||||
}
|
||||
|
||||
if (strstr(in, "none")) {
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@ -400,16 +429,30 @@ static int pri_io_read(struct pri *pri, void *buf, int buflen)
|
||||
res = (int)len;
|
||||
|
||||
memset(&((unsigned char*)buf)[res],0,2);
|
||||
|
||||
res += 2;
|
||||
|
||||
/* libpri passive q921 raw dump does not work for all frames */
|
||||
if (pritap->debug & PRI_DEBUG_Q921_RAW) {
|
||||
char hbuf[2048] = { 0 };
|
||||
|
||||
print_hex_bytes(buf, len, hbuf, sizeof(hbuf));
|
||||
ftdm_log_chan(pritap->dchan, FTDM_LOG_DEBUG, "READ %"FTDM_SIZE_FMT"\n%s\n", len, hbuf);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static int pri_io_write(struct pri *pri, void *buf, int buflen)
|
||||
{
|
||||
pritap_t *pritap = pri_get_userdata(pri);
|
||||
ftdm_size_t len = buflen - 2;
|
||||
ftdm_size_t len = buflen - 2;
|
||||
|
||||
/* libpri passive q921 raw dump does not work for all frames */
|
||||
if (pritap->debug & PRI_DEBUG_Q921_RAW) {
|
||||
char hbuf[2048] = { 0 };
|
||||
|
||||
print_hex_bytes(buf, len, hbuf, sizeof(hbuf));
|
||||
ftdm_log_chan(pritap->dchan, FTDM_LOG_DEBUG, "WRITE %"FTDM_SIZE_FMT"\n%s\n", len, hbuf);
|
||||
}
|
||||
|
||||
if (ftdm_channel_write(pritap->dchan, buf, buflen, &len) != FTDM_SUCCESS) {
|
||||
ftdm_log(FTDM_LOG_CRIT, "span %d D channel write failed! [%s]\n", pritap->span->span_id, pritap->dchan->last_error);
|
||||
@ -939,11 +982,16 @@ static ftdm_status_t ftdm_pritap_sig_read(ftdm_channel_t *ftdmchan, void *data,
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
if (!pritap->mixaudio) {
|
||||
/* No mixing requested */
|
||||
if (pritap->mixaudio == PRITAP_MIX_SELF) {
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
if (pritap->mixaudio == PRITAP_MIX_PEER) {
|
||||
/* start out by clearing the self audio to make sure we don't return audio we were
|
||||
* not supposed to in an error condition */
|
||||
memset(data, FTDM_SILENCE_VALUE(ftdmchan), size);
|
||||
}
|
||||
|
||||
if (ftdmchan->native_codec != peerchan->native_codec) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Invalid peer channel with format %d, ours = %d\n",
|
||||
peerchan->native_codec, ftdmchan->native_codec);
|
||||
@ -961,6 +1009,12 @@ static ftdm_status_t ftdm_pritap_sig_read(ftdm_channel_t *ftdmchan, void *data,
|
||||
return FTDM_FAIL;
|
||||
}
|
||||
|
||||
if (pritap->mixaudio == PRITAP_MIX_PEER) {
|
||||
/* only the peer audio is requested */
|
||||
memcpy(data, peerbuf, size);
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
codec_func = peerchan->native_codec == FTDM_CODEC_ULAW ? fio_ulaw2slin : peerchan->native_codec == FTDM_CODEC_ALAW ? fio_alaw2slin : NULL;
|
||||
if (codec_func) {
|
||||
sizeread = size;
|
||||
@ -1016,7 +1070,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_pritap_configure_span)
|
||||
uint32_t i;
|
||||
const char *var, *val;
|
||||
const char *debug = NULL;
|
||||
uint8_t mixaudio = 1;
|
||||
pritap_mix_mode_t mixaudio = PRITAP_MIX_BOTH;
|
||||
ftdm_channel_t *dchan = NULL;
|
||||
pritap_t *pritap = NULL;
|
||||
ftdm_span_t *peerspan = NULL;
|
||||
@ -1047,7 +1101,16 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_pritap_configure_span)
|
||||
if (!strcasecmp(var, "debug")) {
|
||||
debug = val;
|
||||
} else if (!strcasecmp(var, "mixaudio")) {
|
||||
mixaudio = ftdm_true(val);
|
||||
if (ftdm_true(val) || !strcasecmp(val, "both")) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Setting mix audio mode to 'both' for span %s\n", span->name);
|
||||
mixaudio = PRITAP_MIX_BOTH;
|
||||
} else if (!strcasecmp(val, "peer")) {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Setting mix audio mode to 'peer' for span %s\n", span->name);
|
||||
mixaudio = PRITAP_MIX_PEER;
|
||||
} else {
|
||||
ftdm_log(FTDM_LOG_DEBUG, "Setting mix audio mode to 'self' for span %s\n", span->name);
|
||||
mixaudio = PRITAP_MIX_SELF;
|
||||
}
|
||||
} else if (!strcasecmp(var, "interface")) {
|
||||
if (!strcasecmp(val, "cpe")) {
|
||||
iface = PRITAP_IFACE_CPE;
|
||||
|
@ -712,14 +712,12 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
||||
#endif /* ISDN_SRV */
|
||||
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_QSIG) {
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;
|
||||
cfg.t.cfg.s.inDLSAP.intType = SYM_USER;
|
||||
cfg.t.cfg.s.inDLSAP.clrGlr = TRUE; /* in case of glare, clear local call */
|
||||
cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;
|
||||
cfg.t.cfg.s.inDLSAP.rstOpt = FALSE;
|
||||
} else {
|
||||
if (signal_data->signalling == SNGISDN_SIGNALING_NET) {
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;
|
||||
cfg.t.cfg.s.inDLSAP.intType = NETWORK;
|
||||
cfg.t.cfg.s.inDLSAP.clrGlr = FALSE; /* in case of glare, do not clear local call */
|
||||
cfg.t.cfg.s.inDLSAP.statEnqOpt = TRUE;
|
||||
@ -730,7 +728,6 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
||||
cfg.t.cfg.s.inDLSAP.rstOpt = TRUE;
|
||||
}
|
||||
} else {
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;
|
||||
cfg.t.cfg.s.inDLSAP.intType = USER;
|
||||
cfg.t.cfg.s.inDLSAP.clrGlr = TRUE; /* in case of glare, clear local call */
|
||||
cfg.t.cfg.s.inDLSAP.statEnqOpt = FALSE;
|
||||
@ -738,6 +735,16 @@ ftdm_status_t sngisdn_stack_cfg_q931_dlsap(ftdm_span_t *span)
|
||||
}
|
||||
}
|
||||
|
||||
if (signal_data->switchtype == SNGISDN_SWITCH_QSIG ||
|
||||
signal_data->switchtype == SNGISDN_SWITCH_5ESS) {
|
||||
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;
|
||||
} else if (signal_data->signalling == SNGISDN_SIGNALING_NET) {
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;
|
||||
} else {
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = FALSE;
|
||||
}
|
||||
|
||||
if (signal_data->send_connect_ack != SNGISDN_OPT_DEFAULT) {
|
||||
if (signal_data->send_connect_ack == SNGISDN_OPT_TRUE) {
|
||||
cfg.t.cfg.s.inDLSAP.ackOpt = TRUE;
|
||||
|
@ -1311,37 +1311,52 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event)
|
||||
static FIO_READ_FUNCTION(zt_read)
|
||||
{
|
||||
ftdm_ssize_t r = 0;
|
||||
int read_errno = 0;
|
||||
int errs = 0;
|
||||
|
||||
while (errs++ < 30) {
|
||||
if ((r = read(ftdmchan->sockfd, data, *datalen)) > 0) {
|
||||
r = read(ftdmchan->sockfd, data, *datalen);
|
||||
if (r > 0) {
|
||||
/* successful read, bail out now ... */
|
||||
break;
|
||||
}
|
||||
else if (r == 0) {
|
||||
|
||||
/* Timeout ... retry after a bit */
|
||||
if (r == 0) {
|
||||
ftdm_sleep(10);
|
||||
if (errs) errs--;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
if (errno == EAGAIN || errno == EINTR)
|
||||
continue;
|
||||
if (errno == ELAST) {
|
||||
zt_event_t zt_event_id = 0;
|
||||
if (ioctl(ftdmchan->sockfd, codes.GETEVENT, &zt_event_id) == -1) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Failed retrieving event after ELAST on read: %s\n", strerror(errno));
|
||||
r = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (handle_dtmf_event(ftdmchan, zt_event_id)) {
|
||||
/* we should enqueue this event somewhere so it can be retrieved by the user, for now, dropping it to see what it is! */
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Dropping event %d to be able to read data\n", zt_event_id);
|
||||
}
|
||||
continue;
|
||||
/* This gotta be an error, save errno in case we do printf(), ioctl() or other operations which may reset it */
|
||||
read_errno = errno;
|
||||
if (read_errno == EAGAIN || read_errno == EINTR) {
|
||||
/* Reasonable to retry under those errors */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* When ELAST is returned, it means DAHDI has an out of band event ready and we won't be able to read anything until
|
||||
* we retrieve the event using an ioctl(), so we try to retrieve it here ... */
|
||||
if (read_errno == ELAST) {
|
||||
zt_event_t zt_event_id = 0;
|
||||
if (ioctl(ftdmchan->sockfd, codes.GETEVENT, &zt_event_id) == -1) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, "Failed retrieving event after ELAST on read: %s\n", strerror(errno));
|
||||
r = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_ERROR, "read failed: %s\n", strerror(errno));
|
||||
if (handle_dtmf_event(ftdmchan, zt_event_id)) {
|
||||
/* we should enqueue this event somewhere so it can be retrieved by the user, for now, dropping it to see what it is! */
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Event %d is not dmtf related. Skipping one media read cycle\n", zt_event_id);
|
||||
}
|
||||
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_WARNING, "Skipping one IO read cycle due to events pending in the driver queue\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* Read error, keep going unless to many errors force us to abort ...*/
|
||||
ftdm_log(FTDM_LOG_ERROR, "IO read failed: %s\n", strerror(read_errno));
|
||||
}
|
||||
|
||||
if (r > 0) {
|
||||
*datalen = r;
|
||||
if (ftdmchan->type == FTDM_CHAN_TYPE_DQ921) {
|
||||
@ -1349,7 +1364,7 @@ static FIO_READ_FUNCTION(zt_read)
|
||||
}
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
else if (errno == ELAST) {
|
||||
else if (read_errno == ELAST) {
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
return r == 0 ? FTDM_TIMEOUT : FTDM_FAIL;
|
||||
|
175
libs/ilbc/libilbc.2012.vcxproj
Normal file
175
libs/ilbc/libilbc.2012.vcxproj
Normal file
@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>libilbc</ProjectName>
|
||||
<ProjectGuid>{9A5DDF08-C88C-4A35-B7F6-D605228446BD}</ProjectGuid>
|
||||
<RootNamespace>libilbc</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>src; src\ilbc; src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBilbc_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>src; src\ilbc; src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBilbc_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>src; src\ilbc; src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBilbc_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>src; src\ilbc; src\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBilbc_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\anaFilter.c" />
|
||||
<ClCompile Include="src\constants.c" />
|
||||
<ClCompile Include="src\createCB.c" />
|
||||
<ClCompile Include="src\doCPLC.c" />
|
||||
<ClCompile Include="src\enhancer.c" />
|
||||
<ClCompile Include="src\filter.c" />
|
||||
<ClCompile Include="src\FrameClassify.c" />
|
||||
<ClCompile Include="src\gainquant.c" />
|
||||
<ClCompile Include="src\getCBvec.c" />
|
||||
<ClCompile Include="src\helpfun.c" />
|
||||
<ClCompile Include="src\hpInput.c" />
|
||||
<ClCompile Include="src\hpOutput.c" />
|
||||
<ClCompile Include="src\iCBConstruct.c" />
|
||||
<ClCompile Include="src\iCBSearch.c" />
|
||||
<ClCompile Include="src\iLBC_decode.c" />
|
||||
<ClCompile Include="src\iLBC_encode.c" />
|
||||
<ClCompile Include="src\LPCdecode.c" />
|
||||
<ClCompile Include="src\LPCencode.c" />
|
||||
<ClCompile Include="src\lsf.c" />
|
||||
<ClCompile Include="src\packing.c" />
|
||||
<ClCompile Include="src\StateConstructW.c" />
|
||||
<ClCompile Include="src\StateSearchW.c" />
|
||||
<ClCompile Include="src\syntFilter.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\anaFilter.h" />
|
||||
<ClInclude Include="src\constants.h" />
|
||||
<ClInclude Include="src\createCB.h" />
|
||||
<ClInclude Include="src\doCPLC.h" />
|
||||
<ClInclude Include="src\enhancer.h" />
|
||||
<ClInclude Include="src\filter.h" />
|
||||
<ClInclude Include="src\FrameClassify.h" />
|
||||
<ClInclude Include="src\gainquant.h" />
|
||||
<ClInclude Include="src\getCBvec.h" />
|
||||
<ClInclude Include="src\helpfun.h" />
|
||||
<ClInclude Include="src\hpInput.h" />
|
||||
<ClInclude Include="src\hpOutput.h" />
|
||||
<ClInclude Include="src\iCBConstruct.h" />
|
||||
<ClInclude Include="src\iCBSearch.h" />
|
||||
<ClInclude Include="src\ilbc\ilbc.h" />
|
||||
<ClInclude Include="src\iLBC_define.h" />
|
||||
<ClInclude Include="src\LPCdecode.h" />
|
||||
<ClInclude Include="src\LPCencode.h" />
|
||||
<ClInclude Include="src\lsf.h" />
|
||||
<ClInclude Include="src\packing.h" />
|
||||
<ClInclude Include="src\StateConstructW.h" />
|
||||
<ClInclude Include="src\StateSearchW.h" />
|
||||
<ClInclude Include="src\syntFilter.h" />
|
||||
<ClInclude Include="src\ilbc\version.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -484,8 +484,8 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
License along with this library; if not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
|
@ -1,236 +0,0 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script). Here is a another example:
|
||||
|
||||
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||
configuration-related scripts to be executed by `/bin/bash'.
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
@ -1,11 +1,9 @@
|
||||
AM_CFLAGS = -Isrc -Wall -lm
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
NAME = libcodec2
|
||||
AM_CFLAGS = -Isrc -fPIC -Wall -O3 -lm
|
||||
AUTOMAKE_OPTS = gnu
|
||||
NAME = codec2
|
||||
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||
|
||||
EXTRA_DIST = pitch/hts1a.p \
|
||||
pitch/hts2a.p \
|
||||
octave/glottal.m \
|
||||
EXTRA_DIST = octave/glottal.m \
|
||||
octave/lsp_pdf.m \
|
||||
octave/phase.m \
|
||||
octave/pl2.m \
|
||||
@ -68,11 +66,6 @@ wav/hts2a_g729a.wav \
|
||||
wav/m2400.wav \
|
||||
wav/morig_speex_8k.wav \
|
||||
src/globals.c \
|
||||
doc/A_m.gif \
|
||||
doc/omega_0.gif \
|
||||
doc/phi_m.gif \
|
||||
doc/s_n.gif \
|
||||
doc/s_n.txt \
|
||||
unittest/lsp2.txt \
|
||||
unittest/lsp7.txt \
|
||||
unittest/lspd78.txt \
|
||||
@ -87,12 +80,15 @@ unittest/lspd123.txt \
|
||||
unittest/lsp1.txt \
|
||||
unittest/lsp6.txt \
|
||||
unittest/lspd456.txt \
|
||||
src/codeall.sh \
|
||||
src/fq20.sh \
|
||||
src/listen1.sh \
|
||||
src/listen.sh \
|
||||
src/listensim.sh \
|
||||
src/sim.sh
|
||||
|
||||
src/codebook/lsp1.txt \
|
||||
src/codebook/lsp2.txt \
|
||||
src/codebook/lsp3.txt \
|
||||
src/codebook/lsp4.txt \
|
||||
src/codebook/lsp5.txt \
|
||||
src/codebook/lsp6.txt \
|
||||
src/codebook/lsp7.txt \
|
||||
src/codebook/lsp8.txt \
|
||||
src/codebook/lsp9.txt \
|
||||
src/codebook/lsp10.txt
|
||||
|
||||
SUBDIRS = src unittest
|
||||
|
@ -0,0 +1,84 @@
|
||||
Codec 2 README
|
||||
--------------
|
||||
|
||||
Codec 2 is an open source (LGPL licensed) speech codec for 2400 bit/s
|
||||
and below. For more information please see:
|
||||
|
||||
http://rowetel.com/codec2.html
|
||||
|
||||
Also included is a FDMDV modem, see README_fdmdv.txt
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
1/ Listen to Codec 2:
|
||||
|
||||
$ ./configure && make
|
||||
$ cd src
|
||||
$ ./c2demo ../raw/hts1a.raw hts1a_c2.raw
|
||||
$ ../script/menu.sh ../raw/hts1a.raw hts1a_c2.raw
|
||||
|
||||
NOTE: For playback testing, menu.sh requires either the 'play',
|
||||
'aplay' or 'ossplay' programs to be installed (see
|
||||
http://sox.sourceforge.net/, http://www.alsa-project.org/, or
|
||||
http://www.opensound.com/ respectively).
|
||||
|
||||
2/ Compress and Decompress a file:
|
||||
|
||||
$ ./c2enc 2400 ../raw/hts1a.raw hts1a_c2.bit
|
||||
$ ./c2dec 2400 hts1a_c2.bit hts1a_c2.raw
|
||||
|
||||
3/ Same thing with pipes:
|
||||
|
||||
$ ./c2enc 1400 ../raw/hts1a.raw - | ./c2dec 1400 - - | play -t raw -r 8000 -s -2 -
|
||||
|
||||
Programs
|
||||
--------
|
||||
|
||||
1/ c2demo encodes a file of speech samples, then decodes them and
|
||||
saves the result.
|
||||
|
||||
2/ c2enc encodes a file of speech samples to a compressed file of
|
||||
encoded bits.
|
||||
|
||||
3/ c2dec decodes a compressed file of bits to a file of speech
|
||||
samples.
|
||||
|
||||
4/ c2sim is a simulation/development version of Codec 2. It allows
|
||||
selective use of the various Codec 2 algorithms. For example
|
||||
switching phase modelling or LSP quantisation on and off.
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
1/ For dump file support:
|
||||
|
||||
$ cd codec2
|
||||
$ CFLAGS=-DDUMP ./configure
|
||||
$ make clean && make
|
||||
|
||||
2/ To use gdb:
|
||||
|
||||
$ libtool --mode=execute gdb c2sim
|
||||
|
||||
Directories
|
||||
-----------
|
||||
|
||||
fltk - FLTK GUI programs(s)
|
||||
octave - Octave scripts used for visualising internal signals
|
||||
during development
|
||||
portaudio - Portaudio test programs
|
||||
script - shell scripts for playing and converting raw files
|
||||
src - C source code
|
||||
raw - speech files in raw format (16 bits signed linear 8 kHz)
|
||||
unittest - unit test source code
|
||||
voicing - hand-estimated voicing files, used for development
|
||||
wav - speech files in wave file format
|
||||
win32 - Support for building Windows DLL version of Codec 2 and FDMDV libraries
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
[ ] Get win32/Makefile integrated into Automake system, such that if
|
||||
i586-mingw32msvc exists the Win32 code gets automatically built.
|
||||
[ ] Same for fltk & portaudio, build these conditionally if libs exist
|
199
libs/libcodec2/README_fdmdv.txt
Normal file
199
libs/libcodec2/README_fdmdv.txt
Normal file
@ -0,0 +1,199 @@
|
||||
|
||||
README_fdmdv.txt
|
||||
David Rowe
|
||||
Created March 2012
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
A 1400 bit/s Frequency Division Multiplexed Digital Voice (FDMDV) modem
|
||||
based on [1]. Used for digital audio over HF SSB.
|
||||
|
||||
The FDMDV modem was first implemented in GNU Octave, then ported to C.
|
||||
Algorithm development is generally easier in Octave, but for real time
|
||||
work we need the C version. Automated units tests ensure the
|
||||
operation of the Octave and C versions are identical.
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
$ cd codec2-dev
|
||||
$ ./configure && make
|
||||
$ cd src
|
||||
|
||||
1. Generate some test bits and modulate them:
|
||||
|
||||
$ ./fdmdv_get_test_bits test.c2 1400
|
||||
$ ./fdmdv_mod test.c2 test.raw
|
||||
$ play -r 8000 -s -2 test.raw
|
||||
|
||||
2. Two seconds of test frame data modulated and sent out of sound device:
|
||||
|
||||
$ ./fdmdv_get_test_bits - 2800 | ./fdmdv_mod - - | play -t raw -r 8000 -s -2 -
|
||||
|
||||
3. Send 14000 modulated bits (10 seconds) to the demod and count errors:
|
||||
|
||||
$ ./fdmdv_get_test_bits - 14000 | ./fdmdv_mod - - | ./fdmdv_demod - - demod_dump.txt | ./fdmdv_put_test_bits -
|
||||
|
||||
Use Octave to look at plots of 1 second (1400 bits) of modem operation:
|
||||
|
||||
$ cd ../octave
|
||||
$ octave
|
||||
octave:1> fdmdv_demod_c("../src/demod_dump.txt",1400)
|
||||
|
||||
4. Run Octave simulation of entire modem and AWGN channel:
|
||||
|
||||
$ cd ../octave
|
||||
$ octave
|
||||
octave:1> fdmdv_ut
|
||||
|
||||
5. NOTE: If you would like to play modem samples over the air please
|
||||
convert the 8 kHz samples to 48 kHz. Many PC sound cards have
|
||||
wildly inaccurate sample clock rates when set to 8 kHz, but seem to
|
||||
perform OK when set for 48 kHz. If playing and recording files you
|
||||
can use the sox utility:
|
||||
|
||||
$ sox -r 8000 -s -2 modem_sample_8kHz.raw -r 48000 modem_sample_48kHz.wav
|
||||
|
||||
For real time applications, the fdmdv.[ch] library includes functions to
|
||||
convert between 48 and 8 kHz sample rates.
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
[1] http://n1su.com/fdmdv/FDMDV_Docs_Rel_1_4b.pdf
|
||||
[2] http://n1su.com/fdmdv/
|
||||
[3] http://www.rowetel.com/blog/?p=2433 "Testing a FDMDV Modem"
|
||||
[4] http://www.rowetel.com/blog/?p=2458 "FDMDV Modem Page" on David's web site
|
||||
|
||||
C Code
|
||||
------
|
||||
|
||||
src/fdmdv_mod.c - C version of modulator that takes a file of bits and
|
||||
converts it to a raw file of modulated samples.
|
||||
|
||||
src/fdmdv_demod.c - C version of demodulator that takes a raw file of
|
||||
modulated samples and outputs a file of bits.
|
||||
Optionally dumps demod states to a text file which
|
||||
can be plotted using the Octave script
|
||||
fdmdv_demod_c.m
|
||||
|
||||
src/fdmdv.h - Header file that exposes FDMDV C API functions. Include
|
||||
this file in your application program.
|
||||
|
||||
src/fdmdv.c - C functions that implement the FDMDV modem.
|
||||
|
||||
src/fdmdv-internal.h - internal states and constants for FDMDV modem,
|
||||
shouldn't be exposed to application program.
|
||||
|
||||
|
||||
unittest/tfdmdv.c - Used to conjunction with unittest/tfdmdv.m to
|
||||
automatically test C FDMDV functions against
|
||||
Octave versions.
|
||||
|
||||
Octave Scripts
|
||||
--------------
|
||||
|
||||
(Note these require some Octave packages to be installed, see
|
||||
octave/README.txt).
|
||||
|
||||
fdmdv.m - Functions and variables that implement the Octave version of
|
||||
the FDMDV modem.
|
||||
|
||||
fdmdv_ut.m - Unit test for fdmdv Octave code, useful while
|
||||
developing algorithm. Includes tx/rx plus basic channel
|
||||
simulation.
|
||||
|
||||
Typical run:
|
||||
|
||||
octave:6> fdmdv_ut
|
||||
Eb/No (meas): 7.30 (8.29) dB
|
||||
bits........: 2464
|
||||
errors......: 20
|
||||
BER.........: 0.0081
|
||||
PAPR........: 13.54 dB
|
||||
SNR.........: 4.0 dB
|
||||
|
||||
It also outputs lots of nice plots that show the
|
||||
operation of the modem.
|
||||
|
||||
For a 1400 bit/s DQPSK modem we expect about 1% BER for
|
||||
Eb/No = 7.3dB, which corresponds to SNR = 4dB (3kHz
|
||||
noise BW). The extra dB of measured power is due to the
|
||||
DBPSK pilot. Currently the noise generation code
|
||||
doesn't take the pilot power into account, so in this
|
||||
example the real SNR is actually 5dB.
|
||||
|
||||
fdmdv_mod.m - Octave version of modulator that outputs a raw file.
|
||||
The modulator is driven by a test frame of bits. This
|
||||
can then be played over a real channel or through a
|
||||
channel simulator like PathSim. The sample rate can be
|
||||
changed using "sox" to simulate differences in tx/rx
|
||||
sample clocks.
|
||||
|
||||
To generate 10 seconds of modulated signal:
|
||||
|
||||
octave:8> fdmdv_mod("test.raw",1400*10);
|
||||
|
||||
fdmdv_demod.m - Demodulator program that takes a raw file as input,
|
||||
and works out the bit error rate using the known test
|
||||
frame. Can be used to test the demod performs with
|
||||
off-air signals, or signals that have been passed
|
||||
through a channel simulator.
|
||||
|
||||
To demodulate 2 seconds of the test.raw file generated
|
||||
above:
|
||||
|
||||
octave:9> fdmdv_demod("test.raw",1400*2);
|
||||
2464 bits 0 errors BER: 0.0000
|
||||
|
||||
It also produces several plots showing the internal
|
||||
states of the demod. Useful for debugging and
|
||||
observing what happens with various channels.
|
||||
|
||||
fdmdv_demod_c.m - Takes an output text file from the C demod
|
||||
fdmdv_demod.c and produces plots and measures BER.
|
||||
Useful for evaluating fdmdv_demod.c performance.
|
||||
The plots produced are identical to the Octave
|
||||
version fdmdv_demod.m, allowing direct comparison of
|
||||
the C and Octave versions.
|
||||
|
||||
tfdmdv.m - Automatic tests that compare the Octave and C versions of
|
||||
the FDMDV modem functions. First run unittest/tfdmdv, this
|
||||
will generate a text file with test vectors from the C
|
||||
version. Then run the Octave script tfdmdv and it will
|
||||
generate Octave versions of the test vectors and compare
|
||||
each vector with the C equivalent. Its plots the vectors
|
||||
and and errors (green). Its also produces an automatic
|
||||
check list based on test results. If the Octave or C modem
|
||||
code is changed, this script should be used to ensure the
|
||||
C and Octave versions remain identical.
|
||||
|
||||
Modelling sample clock errors using sox
|
||||
---------------------------------------
|
||||
|
||||
This introduces a simulated 1000ppm error:
|
||||
|
||||
sox -r 8000 -s -2 mod_dqpsk.raw -s -2 mod_dqpsk_8008hz.raw rate -h 8008
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
[ ] implement ppm measurements in fdmdv_get_demod_stats()
|
||||
[ ] try interfering sine wave
|
||||
+ maybe swept
|
||||
+ does modem fall over?
|
||||
[ ] try non-flat channel, e.g. 3dB difference between hi and low tones
|
||||
+ make sure all estimators keep working
|
||||
[ ] test rx level sensitivity, i.e. 0 to 20dB attenuation
|
||||
[ ] make fine freq indep of amplitude
|
||||
+ use angle rather than imag coord
|
||||
[ ] document use of fdmdv_ut and fdmdv_demod + PathSim
|
||||
[ ] more positive form of sync reqd for DV frames?
|
||||
+ like using coarse_fine==1 to decode valid DV frame bit?
|
||||
+ when should we start decoding?
|
||||
[ ] more robust track/acquite state machine?
|
||||
+ e.g. hang on thru the fades?
|
||||
[ ] PAPR idea
|
||||
+ automatically tweak phases to reduce PAPR, e.g. slow variations in freq...
|
||||
[ ] why is pilot noise_est twice as big as other carriers
|
109
libs/libcodec2/asterisk/README
Normal file
109
libs/libcodec2/asterisk/README
Normal file
@ -0,0 +1,109 @@
|
||||
README for codec2/asterisk
|
||||
Asterisk Codec 2 support
|
||||
|
||||
Test Configuration
|
||||
------------------
|
||||
|
||||
Codec 2 is used to trunk calls between two Asterisk boxes:
|
||||
|
||||
A - SIP phone - Asterisk A - Codec2 - Asterisk B - SIP Phone - B
|
||||
|
||||
The two SIP phones are configured for mulaw.
|
||||
|
||||
Building
|
||||
---------
|
||||
|
||||
Asterisk must be patched so that the core understand Codec 2 frames.
|
||||
|
||||
1/ First install Codec 2:
|
||||
|
||||
david@cool:~$ svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev codec2-dev
|
||||
david@cool:~/codec2-dev$ cd codec2-dev
|
||||
david@cool:~/codec2-dev$ ./configure && make && sudo make install
|
||||
david@bear:~/codec2-dev$ sudo ldconfig -v
|
||||
david@cool:~/codec2-dev$ cd ~
|
||||
|
||||
2/ Then build Asterisk with Codec 2 support:
|
||||
|
||||
david@cool:~$ tar xvzf asterisk-1.8.9.0.tar.gz
|
||||
david@cool:~/asterisk-1.8.9.0$ patch -p4 < ~/codec2-dev/asterisk/asterisk-codec2.patch
|
||||
david@cool:~/asterisk-1.8.9.0$ cp ~/codec2-dev/asterisk/codec_codec2.c .
|
||||
david@cool:~/asterisk-1.8.9.0$ cp ~/codec2-dev/asterisk/ex_codec2.h ./codecs
|
||||
david@cool:~/asterisk-1.8.9.0$ ./configure && make ASTLDFLAGS=-lcodec2
|
||||
david@cool:~/asterisk-1.8.9.0$ sudo make install
|
||||
david@cool:~/asterisk-1.8.9.0$ sudo make samples
|
||||
|
||||
3/ Add this to the end of sip.conf on Asterisk A:
|
||||
|
||||
[6013]
|
||||
type=friend
|
||||
context=default
|
||||
host=dynamic
|
||||
user=6013
|
||||
secret=6013
|
||||
canreinvite=no
|
||||
callerid=6013
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
|
||||
[potato]
|
||||
type=peer
|
||||
username=potato
|
||||
fromuser=potato
|
||||
secret=password
|
||||
context=default
|
||||
disallow=all
|
||||
dtmfmode=rfc2833
|
||||
callerid=server
|
||||
canreinvite=no
|
||||
host=cool
|
||||
allow=codec2
|
||||
|
||||
3/ Add this to the end of sip.conf on Asterisk B:
|
||||
|
||||
[6014]
|
||||
type=friend
|
||||
context=default
|
||||
host=dynamic
|
||||
user=6014
|
||||
secret=6014
|
||||
canreinvite=no
|
||||
callerid=6014
|
||||
disallow=all
|
||||
allow=ulaw
|
||||
|
||||
[potato]
|
||||
type=peer
|
||||
username=potato
|
||||
fromuser=potato
|
||||
secret=password
|
||||
context=default
|
||||
disallow=all
|
||||
dtmfmode=rfc2833
|
||||
callerid=server
|
||||
canreinvite=no
|
||||
host=bear
|
||||
allow=codec2
|
||||
|
||||
4/ Here is the [default] section of extensions.conf on Asterisk B:
|
||||
|
||||
[default]
|
||||
|
||||
exten => 6013,1,Dial(SIP/potato/6013)
|
||||
;
|
||||
; By default we include the demo. In a production system, you
|
||||
; probably don't want to have the demo there.
|
||||
;
|
||||
;include => demo
|
||||
|
||||
5/ After booting see if the codec2_codec2.so module is loaded with "core show translate"
|
||||
|
||||
6/ To make a test call dial 6013 on the SIP phone connected to Asterisk B
|
||||
|
||||
7/ If codec_codec2.so won't load and you see "can't find codec2_create" try:
|
||||
|
||||
david@cool:~/asterisk-1.8.9.0$ touch codecs/codec_codec2.c
|
||||
david@cool:~/asterisk-1.8.9.0$ make ASTLDFLAGS=-lcodec2
|
||||
david@cool:~/asterisk-1.8.9.0$ sudo cp codecs/codec_codec2.so /usr/lib/asterisk/modules
|
||||
david@cool:~/asterisk-1.8.9.0$ sudo asterisk -vvvcn
|
||||
|
68
libs/libcodec2/asterisk/asterisk-codec2.patch
Normal file
68
libs/libcodec2/asterisk/asterisk-codec2.patch
Normal file
@ -0,0 +1,68 @@
|
||||
--- /home/david/asterisk-1.8.9.0-orig/include/asterisk/frame.h 2011-12-23 05:08:46.000000000 +1030
|
||||
+++ /home/david/asterisk-1.8.9.0-codec2/include/asterisk/frame.h 2012-03-27 13:16:55.623452431 +1030
|
||||
@@ -299,6 +299,7 @@
|
||||
#define AST_FORMAT_G719 (1ULL << 32)
|
||||
/*! SpeeX Wideband (16kHz) Free Compression */
|
||||
#define AST_FORMAT_SPEEX16 (1ULL << 33)
|
||||
+#define AST_FORMAT_CODEC2 (1ULL << 34)
|
||||
/*! Raw mu-law data (G.711) */
|
||||
#define AST_FORMAT_TESTLAW (1ULL << 47)
|
||||
/*! Reserved bit - do not use */
|
||||
--- /home/david/asterisk-1.8.9.0-orig/main/frame.c 2010-06-18 02:53:43.000000000 +0930
|
||||
+++ /home/david/asterisk-1.8.9.0-codec2/main/frame.c 2012-03-28 15:16:16.975581316 +1030
|
||||
@@ -102,6 +102,7 @@
|
||||
{ AST_FORMAT_ADPCM, "adpcm" , 8000, "ADPCM", 40, 10, 300, 10, 20 }, /*!< codec_adpcm.c */
|
||||
{ AST_FORMAT_SLINEAR, "slin", 8000, "16 bit Signed Linear PCM", 160, 10, 70, 10, 20, AST_SMOOTHER_FLAG_BE }, /*!< Signed linear */
|
||||
{ AST_FORMAT_LPC10, "lpc10", 8000, "LPC10", 7, 20, 20, 20, 20 }, /*!< codec_lpc10.c */
|
||||
+ { AST_FORMAT_CODEC2, "codec2", 8000, "Codec 2", 7, 20, 20, 20, 20 }, /*!< codec_codec2.c */
|
||||
{ AST_FORMAT_G729A, "g729", 8000, "G.729A", 10, 10, 230, 10, 20, AST_SMOOTHER_FLAG_G729 }, /*!< Binary commercial distribution */
|
||||
{ AST_FORMAT_SPEEX, "speex", 8000, "SpeeX", 10, 10, 60, 10, 20 }, /*!< codec_speex.c */
|
||||
{ AST_FORMAT_SPEEX16, "speex16", 16000, "SpeeX 16khz", 10, 10, 60, 10, 20 }, /*!< codec_speex.c */
|
||||
@@ -1475,6 +1476,9 @@
|
||||
samples = 22 * 8;
|
||||
samples += (((char *)(f->data.ptr))[7] & 0x1) * 8;
|
||||
break;
|
||||
+ case AST_FORMAT_CODEC2:
|
||||
+ samples = 160 * (f->datalen / 7);
|
||||
+ break;
|
||||
case AST_FORMAT_ULAW:
|
||||
case AST_FORMAT_ALAW:
|
||||
case AST_FORMAT_TESTLAW:
|
||||
@@ -1519,6 +1523,9 @@
|
||||
case AST_FORMAT_GSM:
|
||||
len = (samples / 160) * 33;
|
||||
break;
|
||||
+ case AST_FORMAT_CODEC2:
|
||||
+ len = (samples / 160) * 7;
|
||||
+ break;
|
||||
case AST_FORMAT_G729A:
|
||||
len = samples / 8;
|
||||
break;
|
||||
--- /home/david/asterisk-1.8.9.0-orig/main/channel.c 2011-12-17 10:21:13.000000000 +1030
|
||||
+++ /home/david/asterisk-1.8.9.0-codec2/main/channel.c 2012-03-28 15:05:22.395293391 +1030
|
||||
@@ -1075,6 +1075,7 @@
|
||||
/*! Ick, LPC10 sounds terrible, but at least we have code for it, if you're tacky enough
|
||||
to use it */
|
||||
AST_FORMAT_LPC10,
|
||||
+ AST_FORMAT_CODEC2,
|
||||
/*! G.729a is faster than 723 and slightly less expensive */
|
||||
AST_FORMAT_G729A,
|
||||
/*! Down to G.723.1 which is proprietary but at least designed for voice */
|
||||
--- /home/david/asterisk-1.8.9.0-orig/main/rtp_engine.c 2011-12-30 01:43:03.000000000 +1030
|
||||
+++ /home/david/asterisk-1.8.9.0-codec2/main/rtp_engine.c 2012-03-28 16:42:02.880872891 +1030
|
||||
@@ -101,6 +101,7 @@
|
||||
{{1, AST_FORMAT_SLINEAR}, "audio", "L16", 8000},
|
||||
{{1, AST_FORMAT_SLINEAR16}, "audio", "L16", 16000},
|
||||
{{1, AST_FORMAT_LPC10}, "audio", "LPC", 8000},
|
||||
+ {{1, AST_FORMAT_CODEC2}, "audio", "CODEC2", 8000},
|
||||
{{1, AST_FORMAT_G729A}, "audio", "G729", 8000},
|
||||
{{1, AST_FORMAT_G729A}, "audio", "G729A", 8000},
|
||||
{{1, AST_FORMAT_G729A}, "audio", "G.729", 8000},
|
||||
@@ -178,6 +179,7 @@
|
||||
[117] = {1, AST_FORMAT_SPEEX16},
|
||||
[118] = {1, AST_FORMAT_SLINEAR16}, /* 16 Khz signed linear */
|
||||
[121] = {0, AST_RTP_CISCO_DTMF}, /* Must be type 121 */
|
||||
+ [121] = {1, AST_FORMAT_CODEC2},
|
||||
};
|
||||
|
||||
int ast_rtp_engine_register2(struct ast_rtp_engine *engine, struct ast_module *module)
|
185
libs/libcodec2/asterisk/codec_codec2.c
Normal file
185
libs/libcodec2/asterisk/codec_codec2.c
Normal file
@ -0,0 +1,185 @@
|
||||
/*
|
||||
* Codec 2 module for Asterisk.
|
||||
*
|
||||
* Credit: codec_gsm.c used as a starting point.
|
||||
*
|
||||
* Copyright (C) 2012 Ed W and David Rowe
|
||||
*
|
||||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License Version 2. See the LICENSE file
|
||||
* at the top of the source tree.
|
||||
*/
|
||||
|
||||
/*! \file
|
||||
*
|
||||
* \brief Translate between signed linear and Codec 2
|
||||
*
|
||||
* \ingroup codecs
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
#include "asterisk/translate.h"
|
||||
#include "asterisk/config.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
#include <codec2.h>
|
||||
|
||||
#define BUFFER_SAMPLES 8000
|
||||
#define CODEC2_SAMPLES 160
|
||||
#define CODEC2_FRAME_LEN 7
|
||||
|
||||
/* Sample frame data */
|
||||
|
||||
#include "asterisk/slin.h"
|
||||
#include "ex_codec2.h"
|
||||
|
||||
struct codec2_translator_pvt { /* both codec2tolin and codec2togsm */
|
||||
struct CODEC2 *codec2;
|
||||
short buf[BUFFER_SAMPLES]; /* lintocodec2, temporary storage */
|
||||
};
|
||||
|
||||
static int codec2_new(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct codec2_translator_pvt *tmp = pvt->pvt;
|
||||
|
||||
tmp->codec2 = codec2_create(CODEC2_MODE_2400);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief decode and store in outbuf. */
|
||||
static int codec2tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
||||
{
|
||||
struct codec2_translator_pvt *tmp = pvt->pvt;
|
||||
int x;
|
||||
int16_t *dst = pvt->outbuf.i16;
|
||||
int flen = CODEC2_FRAME_LEN;
|
||||
|
||||
for (x=0; x < f->datalen; x += flen) {
|
||||
unsigned char *src;
|
||||
int len;
|
||||
len = CODEC2_SAMPLES;
|
||||
src = f->data.ptr + x;
|
||||
|
||||
codec2_decode(tmp->codec2, dst + pvt->samples, src);
|
||||
|
||||
pvt->samples += CODEC2_SAMPLES;
|
||||
pvt->datalen += 2 * CODEC2_SAMPLES;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief store samples into working buffer for later decode */
|
||||
static int lintocodec2_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
|
||||
{
|
||||
struct codec2_translator_pvt *tmp = pvt->pvt;
|
||||
|
||||
if (pvt->samples + f->samples > BUFFER_SAMPLES) {
|
||||
ast_log(LOG_WARNING, "Out of buffer space\n");
|
||||
return -1;
|
||||
}
|
||||
memcpy(tmp->buf + pvt->samples, f->data.ptr, f->datalen);
|
||||
pvt->samples += f->samples;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief encode and produce a frame */
|
||||
static struct ast_frame *lintocodec2_frameout(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct codec2_translator_pvt *tmp = pvt->pvt;
|
||||
int datalen = 0;
|
||||
int samples = 0;
|
||||
|
||||
/* We can't work on anything less than a frame in size */
|
||||
if (pvt->samples < CODEC2_SAMPLES)
|
||||
return NULL;
|
||||
while (pvt->samples >= CODEC2_SAMPLES) {
|
||||
/* Encode a frame of data */
|
||||
codec2_encode(tmp->codec2, (unsigned char*)(pvt->outbuf.c + datalen), tmp->buf + samples);
|
||||
datalen += CODEC2_FRAME_LEN;
|
||||
samples += CODEC2_SAMPLES;
|
||||
pvt->samples -= CODEC2_SAMPLES;
|
||||
}
|
||||
|
||||
/* Move the data at the end of the buffer to the front */
|
||||
if (pvt->samples)
|
||||
memmove(tmp->buf, tmp->buf + samples, pvt->samples * 2);
|
||||
|
||||
return ast_trans_frameout(pvt, datalen, samples);
|
||||
}
|
||||
|
||||
static void codec2_destroy_stuff(struct ast_trans_pvt *pvt)
|
||||
{
|
||||
struct codec2_translator_pvt *tmp = pvt->pvt;
|
||||
if (tmp->codec2)
|
||||
codec2_destroy(tmp->codec2);
|
||||
}
|
||||
|
||||
static struct ast_translator codec2tolin = {
|
||||
.name = "codec2tolin",
|
||||
.srcfmt = AST_FORMAT_CODEC2,
|
||||
.dstfmt = AST_FORMAT_SLINEAR,
|
||||
.newpvt = codec2_new,
|
||||
.framein = codec2tolin_framein,
|
||||
.destroy = codec2_destroy_stuff,
|
||||
.sample = codec2_sample,
|
||||
.buffer_samples = BUFFER_SAMPLES,
|
||||
.buf_size = BUFFER_SAMPLES * 2,
|
||||
.desc_size = sizeof (struct codec2_translator_pvt ),
|
||||
};
|
||||
|
||||
static struct ast_translator lintocodec2 = {
|
||||
.name = "lintocodec2",
|
||||
.srcfmt = AST_FORMAT_SLINEAR,
|
||||
.dstfmt = AST_FORMAT_CODEC2,
|
||||
.newpvt = codec2_new,
|
||||
.framein = lintocodec2_framein,
|
||||
.frameout = lintocodec2_frameout,
|
||||
.destroy = codec2_destroy_stuff,
|
||||
.sample = slin8_sample,
|
||||
.desc_size = sizeof (struct codec2_translator_pvt ),
|
||||
.buf_size = (BUFFER_SAMPLES * CODEC2_FRAME_LEN + CODEC2_SAMPLES - 1)/CODEC2_SAMPLES,
|
||||
};
|
||||
|
||||
/*! \brief standard module glue */
|
||||
static int reload(void)
|
||||
{
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintocodec2);
|
||||
if (!res)
|
||||
res = ast_unregister_translator(&codec2tolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_register_translator(&codec2tolin);
|
||||
if (!res)
|
||||
res=ast_register_translator(&lintocodec2);
|
||||
else
|
||||
ast_unregister_translator(&codec2tolin);
|
||||
if (res)
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Codec 2 Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
28
libs/libcodec2/asterisk/ex_codec2.h
Normal file
28
libs/libcodec2/asterisk/ex_codec2.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*! \file
|
||||
* \brief 8-bit raw data
|
||||
*
|
||||
* Copyright (C) 2012, 2012 Ed W and David Rowe
|
||||
*
|
||||
* Distributed under the terms of the GNU General Public License
|
||||
*
|
||||
*/
|
||||
|
||||
static uint8_t ex_codec2[] = {
|
||||
0x3e,0x06,0x4a,0xbb,0x9e,0x40,0xc0
|
||||
};
|
||||
|
||||
static struct ast_frame *codec2_sample(void)
|
||||
{
|
||||
static struct ast_frame f = {
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
.subclass.codec = AST_FORMAT_CODEC2,
|
||||
.datalen = sizeof(ex_codec2),
|
||||
.samples = CODEC2_SAMPLES,
|
||||
.mallocd = 0,
|
||||
.offset = 0,
|
||||
.src = __PRETTY_FUNCTION__,
|
||||
.data.ptr = ex_codec2,
|
||||
};
|
||||
|
||||
return &f;
|
||||
}
|
11
libs/libcodec2/asterisk/make_asterisk_patch.sh
Executable file
11
libs/libcodec2/asterisk/make_asterisk_patch.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Create patch for Codec 2 support inside Asterisk
|
||||
|
||||
ORIG=~/asterisk-1.8.9.0-orig
|
||||
CODEC2=~/asterisk-1.8.9.0-codec2
|
||||
diff -ruN $ORIG/include/asterisk/frame.h $CODEC2/include/asterisk/frame.h > asterisk-codec2.patch
|
||||
diff -ruN $ORIG/main/frame.c $CODEC2/main/frame.c >> asterisk-codec2.patch
|
||||
diff -ruN $ORIG/main/channel.c $CODEC2/main/channel.c >> asterisk-codec2.patch
|
||||
diff -ruN $ORIG/main/rtp_engine.c $CODEC2/main/rtp_engine.c >> asterisk-codec2.patch
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.59])
|
||||
AC_INIT(libcodec2, 1.0, david@rowetel.com)
|
||||
AM_INIT_AUTOMAKE(libcodec2,1.0)
|
||||
AC_INIT(codec2, 0.2, david@rowetel.com)
|
||||
AM_INIT_AUTOMAKE(codec2,0.2)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
19
libs/libcodec2/fltk/Makefile
Normal file
19
libs/libcodec2/fltk/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
# Requires FLTK 1.3 & Portaudio V19
|
||||
|
||||
FLTK_VER = $(shell fltk-config --api-version)
|
||||
ifneq ($(FLTK_VER),1.3)
|
||||
$(error Must use FLTK version 1.3, you have $(FLTK_VER))
|
||||
endif
|
||||
|
||||
FLTK_CFLAGS += $(shell fltk-config --ldstaticflags)
|
||||
CFLAGS = -O3 -g -Wall
|
||||
LIBS = ../src/.libs/libcodec2.a -lm -lrt -lportaudio -pthread
|
||||
LC2POC_C = fl_fdmdv.cxx
|
||||
|
||||
all: fl_fdmdv
|
||||
|
||||
fl_fdmdv: Makefile $(LC2POC_C)
|
||||
g++ $(LC2POC_C) -I../src/ -o fl_fdmdv $(CFLAGS) $(FLTK_CFLAGS) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f fl_fdmdv
|
1158
libs/libcodec2/fltk/fl_fdmdv.cxx
Normal file
1158
libs/libcodec2/fltk/fl_fdmdv.cxx
Normal file
File diff suppressed because it is too large
Load Diff
17
libs/libcodec2/octave/README.txt
Normal file
17
libs/libcodec2/octave/README.txt
Normal file
@ -0,0 +1,17 @@
|
||||
README.txt
|
||||
For codec2/octave directory
|
||||
Created 24 June 2012 by David Rowe
|
||||
|
||||
1/ To support some of the Octave scripts (in particular fdmdv) in this
|
||||
directory the following Octave packages need to be installed:
|
||||
|
||||
control image miscellaneous optim signal specfun struct
|
||||
|
||||
2/ Download these tar balls from:
|
||||
|
||||
http://octave.sourceforge.net/packages.php
|
||||
|
||||
3/ Install each package from the Octave command line with:
|
||||
|
||||
octave:3> pkg install package_file_name.tar.gz
|
||||
|
43
libs/libcodec2/octave/av_imp.m
Normal file
43
libs/libcodec2/octave/av_imp.m
Normal file
@ -0,0 +1,43 @@
|
||||
% av_imp.m
|
||||
% David Rowe Aug 2012
|
||||
% Averages the impulse response samples
|
||||
|
||||
function imp = av_imp(imp_filename, period_in_secs, st, en)
|
||||
f = fopen(imp_filename,"rb");
|
||||
s = fread(f, Inf, "short")';
|
||||
|
||||
Fs = 8000;
|
||||
n = period_in_secs * Fs;
|
||||
|
||||
[r c] = size(s);
|
||||
|
||||
imp = zeros(1,n);
|
||||
for i=1:n:c-n
|
||||
imp = imp + s(i:i+n-1);
|
||||
endfor
|
||||
|
||||
% user supplies start and end samples after viweing plot
|
||||
|
||||
if (nargin == 4)
|
||||
imp = imp(st:en);
|
||||
end
|
||||
|
||||
% normalise
|
||||
|
||||
imp /= sqrt(sum(imp .^ 2));
|
||||
|
||||
[h w] = freqz(imp, 1, 4000);
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
plot(imp);
|
||||
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211)
|
||||
plot(10*log10(abs(h)))
|
||||
subplot(212)
|
||||
plot(angle(h))
|
||||
|
||||
endfunction
|
||||
|
98
libs/libcodec2/octave/cbphase.m
Normal file
98
libs/libcodec2/octave/cbphase.m
Normal file
@ -0,0 +1,98 @@
|
||||
% cbphase.m
|
||||
% David Rowe Aug 2012
|
||||
% Used to experiment with critical band phase perception and smoothing
|
||||
|
||||
function cbphase
|
||||
|
||||
Wo = 100.0*pi/4000;
|
||||
L = floor(pi/Wo);
|
||||
|
||||
A = zeros(1,L);
|
||||
phi = zeros(1,L);
|
||||
|
||||
% three harmonics in this band
|
||||
|
||||
b = 4; a = b-1; c = b+1;
|
||||
|
||||
% set up phases and mags for 2nd order system (see phasesecord.m)
|
||||
|
||||
wres = b*Wo;
|
||||
phi(a) = 3*pi/4 + wres;
|
||||
phi(b) = pi/2 + wres;
|
||||
phi(c) = pi/4 + wres;
|
||||
|
||||
A(a) = 0.707;
|
||||
A(b) = 1;
|
||||
A(c) = 0.707;
|
||||
|
||||
% add linear component
|
||||
|
||||
phi(1) = pi;
|
||||
phi(2:L) = phi(2:L) + (2:L)*phi(1);
|
||||
phi = phi - 2*pi*(floor(phi/(2*pi)) + 0.5);
|
||||
|
||||
N = 16000;
|
||||
Nplot = 250;
|
||||
s = zeros(1,N);
|
||||
|
||||
for m=a:c
|
||||
s_m = A(m)*cos(m*Wo*(0:(N-1)) + phi(m));
|
||||
s = s + s_m;
|
||||
endfor
|
||||
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211)
|
||||
plot((1:L)*Wo*4000/pi, A,'+');
|
||||
subplot(212)
|
||||
plot((1:L)*Wo*4000/pi, phi,'+');
|
||||
|
||||
%v = A(a)*exp(j*phi(a)) + A(b)*exp(j*phi(b)) + A(c)*exp(j*phi(c));
|
||||
%compass(v,"r")
|
||||
%hold off;
|
||||
|
||||
% est phi1
|
||||
|
||||
diff = phi(b) - phi(a)
|
||||
sumi = sin(diff);
|
||||
sumr = cos(diff);
|
||||
diff = phi(c) - phi(b)
|
||||
sumi += sin(diff);
|
||||
sumr += cos(diff);
|
||||
phi1_ = atan2(sumi, sumr)
|
||||
s_v = cos(Wo*(0:(N-1)) + phi1_);
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
subplot(211)
|
||||
plot(s(1:Nplot));
|
||||
hold on;
|
||||
plot(s_v(1:Nplot),"r");
|
||||
hold off;
|
||||
|
||||
% build (hopefully) perceptually similar phase
|
||||
|
||||
phi_(a) = a*phi1_;
|
||||
phi_(b) = b*phi1_;
|
||||
phi_(c) = c*phi1_;
|
||||
|
||||
s_ = zeros(1,N);
|
||||
|
||||
for m=a:c
|
||||
s_m = A(m)*cos(m*Wo*(0:(N-1)) + phi_(m));
|
||||
s_ = s_ + s_m;
|
||||
endfor
|
||||
|
||||
subplot(212)
|
||||
plot(s_(1:Nplot));
|
||||
|
||||
gain = 8000;
|
||||
fs=fopen("orig_ph.raw","wb");
|
||||
fwrite(fs,gain*s,"short");
|
||||
fclose(fs);
|
||||
fs=fopen("mod_ph.raw","wb");
|
||||
fwrite(fs,gain*s_,"short");
|
||||
fclose(fs);
|
||||
|
||||
endfunction
|
||||
|
108
libs/libcodec2/octave/codec2_demo.m
Normal file
108
libs/libcodec2/octave/codec2_demo.m
Normal file
@ -0,0 +1,108 @@
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% codec2_demo.m
|
||||
|
||||
% Designed as an educational tool to explain the operation of Codec 2
|
||||
% for conference and user group presentations on a projector. An
|
||||
% alternative to static overhead slides.
|
||||
%
|
||||
% Derived from codec2-dev/octave/plamp.m
|
||||
%
|
||||
% usage:
|
||||
% octave:1> plamp("../src/hts2a",40)
|
||||
%
|
||||
% Then press:
|
||||
% c - to cycle through the wavform being displayed on the figure
|
||||
% n - next frame
|
||||
% b - back one frame
|
||||
%
|
||||
% tip: hold down n or b to animate the display
|
||||
%
|
||||
% The text files used as input are generated using c2sim:
|
||||
%
|
||||
% /codec2-dev/src$ c2sim ../raw/hts2a.raw --dump hts2a
|
||||
%
|
||||
% The Codec 2 README explains how to build c2sim with dump files
|
||||
% enabled.
|
||||
|
||||
function codec2_demo(samname, f)
|
||||
|
||||
sn_name = strcat(samname,"_sn.txt");
|
||||
Sn = load(sn_name);
|
||||
|
||||
sw_name = strcat(samname,"_sw.txt");
|
||||
Sw = load(sw_name);
|
||||
|
||||
model_name = strcat(samname,"_model.txt");
|
||||
model = load(model_name);
|
||||
|
||||
figure(1);
|
||||
|
||||
k = ' ';
|
||||
wf = "Sn";
|
||||
do
|
||||
|
||||
if strcmp(wf,"Sn")
|
||||
clf;
|
||||
s = [ Sn(2*f-1,:) Sn(2*f,:) ];
|
||||
plot(s);
|
||||
axis([1 length(s) -20000 20000]);
|
||||
end
|
||||
|
||||
if (strcmp(wf,"Sw"))
|
||||
clf;
|
||||
plot((0:255)*4000/256, Sw(f,:),";Sw;");
|
||||
end
|
||||
|
||||
if strcmp(wf,"SwAm")
|
||||
Wo = model(f,1);
|
||||
L = model(f,2);
|
||||
Am = model(f,3:(L+2));
|
||||
plot((0:255)*4000/256, Sw(f,:),";Sw;");
|
||||
hold on;
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Am),"+;Am;r");
|
||||
axis([1 4000 -10 80]);
|
||||
hold off;
|
||||
end
|
||||
|
||||
if strcmp(wf,"Am")
|
||||
Wo = model(f,1);
|
||||
L = model(f,2);
|
||||
Am = model(f,3:(L+2));
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Am),"+;Am;r");
|
||||
axis([1 4000 -10 80]);
|
||||
end
|
||||
|
||||
% interactive menu
|
||||
|
||||
printf("\rframe: %d menu: n-next b-back w-cycle window q-quit", f);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
if (k == 'n')
|
||||
f = f + 1;
|
||||
end
|
||||
if (k == 'b')
|
||||
f = f - 1;
|
||||
end
|
||||
if (k == 'w')
|
||||
if strcmp(wf,"Sn")
|
||||
next_wf = "Sw";
|
||||
end
|
||||
if strcmp(wf,"Sw")
|
||||
next_wf = "SwAm";
|
||||
end
|
||||
if strcmp(wf,"SwAm")
|
||||
next_wf = "Am";
|
||||
end
|
||||
if strcmp(wf,"Am")
|
||||
next_wf = "Sn";
|
||||
end
|
||||
wf = next_wf;
|
||||
end
|
||||
|
||||
until (k == 'q')
|
||||
printf("\n");
|
||||
|
||||
endfunction
|
54
libs/libcodec2/octave/cspec.m
Normal file
54
libs/libcodec2/octave/cspec.m
Normal file
@ -0,0 +1,54 @@
|
||||
% cspec.m
|
||||
% David Rowe Aug 2012
|
||||
% Used to compare spectromgrams while experimenting with phase
|
||||
|
||||
function cspec(s1,s2)
|
||||
f1 = fopen(s1,"rb");
|
||||
s1 = fread(f1,Inf,"short");
|
||||
f2 = fopen(s2,"rb");
|
||||
s2 = fread(f2,Inf,"short");
|
||||
|
||||
Fs = 8000;
|
||||
spec_win = 512;
|
||||
|
||||
state = 's1';
|
||||
do
|
||||
if strcmp(state,'s1')
|
||||
spec(s1,Fs,spec_win);
|
||||
%title(s1);
|
||||
end
|
||||
if strcmp(state,'s2')
|
||||
spec(s2,Fs,spec_win);
|
||||
%title(s2);
|
||||
end
|
||||
if strcmp(state,'diff')
|
||||
spec(s1-s2,Fs,spec_win);
|
||||
%title("difference");
|
||||
end
|
||||
|
||||
printf("\rstate: %s space-toggle d-diff q-quit", state);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
|
||||
if k == ' '
|
||||
if strcmp(state,"diff")
|
||||
next_state = 's1';
|
||||
end
|
||||
if strcmp(state,"s1")
|
||||
next_state = 's2';
|
||||
end
|
||||
if strcmp(state,'s2')
|
||||
next_state = 's1';
|
||||
end
|
||||
end
|
||||
|
||||
if k == 'd'
|
||||
next_state = 'diff';
|
||||
end
|
||||
|
||||
state = next_state;
|
||||
until (k == 'q')
|
||||
|
||||
printf("\n");
|
||||
|
||||
endfunction
|
935
libs/libcodec2/octave/fdmdv.m
Normal file
935
libs/libcodec2/octave/fdmdv.m
Normal file
@ -0,0 +1,935 @@
|
||||
% fdmdv.m
|
||||
%
|
||||
% Functions that implement a Frequency Divison Multiplexed Modem for
|
||||
% Digital Voice (FDMDV) over HF channels.
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
% reqd to mak sure we get same random bits at mod and demod
|
||||
|
||||
rand('state',1);
|
||||
randn('state',1);
|
||||
|
||||
% Constants
|
||||
|
||||
global Fs = 8000; % sample rate in Hz
|
||||
global T = 1/Fs; % sample period in seconds
|
||||
global Rs = 50; % symbol rate in Hz
|
||||
global Nc = 14; % number of carriers
|
||||
global Nb = 2; % Bits/symbol for QPSK modulation
|
||||
global Rb = Nc*Rs*Nb; % bit rate
|
||||
global M = Fs/Rs; % oversampling factor
|
||||
global Nsym = 6; % number of symbols to filter over
|
||||
global Fsep = 75; % Separation between carriers (Hz)
|
||||
global Fcentre = 1200; % Centre frequency, Nc/2 carriers below this, N/c carriers above (Hz)
|
||||
global Nt = 5; % number of symbols we estimate timing over
|
||||
global P = 4; % oversample factor used for rx symbol filtering
|
||||
global Nfilter = Nsym*M;
|
||||
global Nfiltertiming = M+Nfilter+M;
|
||||
alpha = 0.5;
|
||||
global snr_coeff = 0.9 % SNR est averaging filter coeff
|
||||
|
||||
% root raised cosine (Root Nyquist) filter
|
||||
|
||||
global gt_alpha5_root;
|
||||
gt_alpha5_root = gen_rn_coeffs(alpha, T, Rs, Nsym, M);
|
||||
|
||||
|
||||
% Functions ----------------------------------------------------
|
||||
|
||||
|
||||
% generate Nc+1 QPSK symbols from vector of (1,Nc*Nb) input bits. The
|
||||
% Nc+1 symbol is the +1 -1 +1 .... BPSK sync carrier
|
||||
|
||||
function tx_symbols = bits_to_qpsk(prev_tx_symbols, tx_bits, modulation)
|
||||
global Nc;
|
||||
global Nb;
|
||||
global pilot_bit;
|
||||
|
||||
% re-arrange as (Nc,Nb) matrix
|
||||
|
||||
tx_bits_matrix = zeros(Nc,Nb);
|
||||
tx_bits_matrix(1:Nc,1) = tx_bits(1:Nb:Nb*Nc);
|
||||
tx_bits_matrix(1:Nc,2) = tx_bits(2:Nb:Nb*Nc);
|
||||
|
||||
if (strcmp(modulation,'dqpsk'))
|
||||
|
||||
% map to (Nc,1) DQPSK symbols
|
||||
|
||||
for c=1:Nc
|
||||
msb = tx_bits_matrix(c,1); lsb = tx_bits_matrix(c,2);
|
||||
|
||||
if ((msb == 0) && (lsb == 0))
|
||||
tx_symbols(c) = prev_tx_symbols(c);
|
||||
endif
|
||||
if ((msb == 0) && (lsb == 1))
|
||||
tx_symbols(c) = j*prev_tx_symbols(c);
|
||||
endif
|
||||
if ((msb == 1) && (lsb == 0))
|
||||
tx_symbols(c) = -prev_tx_symbols(c);
|
||||
endif
|
||||
if ((msb == 1) && (lsb == 1))
|
||||
tx_symbols(c) = -j*prev_tx_symbols(c);
|
||||
endif
|
||||
end
|
||||
else
|
||||
% QPSK mapping
|
||||
tx_symbols = -1 + 2*tx_bits_matrix(:,1) - j + 2j*tx_bits_matrix(:,2);
|
||||
endif
|
||||
|
||||
% +1 -1 +1 -1 BPSK sync carrier, once filtered becomes two spectral
|
||||
% lines at +/- Rs/2
|
||||
|
||||
if pilot_bit
|
||||
tx_symbols(Nc+1) = -prev_tx_symbols(Nc+1);
|
||||
else
|
||||
tx_symbols(Nc+1) = prev_tx_symbols(Nc+1);
|
||||
end
|
||||
if pilot_bit
|
||||
pilot_bit = 0;
|
||||
else
|
||||
pilot_bit = 1;
|
||||
end
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Given Nc*Nb bits construct M samples (1 symbol) of Nc filtered
|
||||
% symbols streams
|
||||
|
||||
function tx_baseband = tx_filter(tx_symbols)
|
||||
global Nc;
|
||||
global M;
|
||||
global tx_filter_memory;
|
||||
global Nfilter;
|
||||
global gt_alpha5_root;
|
||||
|
||||
tx_baseband = zeros(Nc+1,M);
|
||||
|
||||
% tx filter each symbol, generate M filtered output samples for each symbol.
|
||||
% Efficient polyphase filter techniques used as tx_filter_memory is sparse
|
||||
|
||||
tx_filter_memory(:,Nfilter) = sqrt(2)/2*tx_symbols;
|
||||
|
||||
for i=1:M
|
||||
tx_baseband(:,i) = M*tx_filter_memory(:,M:M:Nfilter) * gt_alpha5_root(M-i+1:M:Nfilter)';
|
||||
end
|
||||
tx_filter_memory(:,1:Nfilter-M) = tx_filter_memory(:,M+1:Nfilter);
|
||||
tx_filter_memory(:,Nfilter-M+1:Nfilter) = zeros(Nc+1,M);
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Construct FDM signal by frequency shifting each filtered symbol
|
||||
% stream. Returns complex signal so we can apply frequency offsets
|
||||
% easily.
|
||||
|
||||
function tx_fdm = fdm_upconvert(tx_filt)
|
||||
global Fs;
|
||||
global M;
|
||||
global Nc;
|
||||
global Fsep;
|
||||
global phase_tx;
|
||||
global freq;
|
||||
|
||||
tx_fdm = zeros(1,M);
|
||||
|
||||
% Nc/2 tones below centre freq
|
||||
|
||||
for c=1:Nc/2
|
||||
for i=1:M
|
||||
phase_tx(c) = phase_tx(c) * freq(c);
|
||||
tx_fdm(i) = tx_fdm(i) + tx_filt(c,i)*phase_tx(c);
|
||||
end
|
||||
end
|
||||
|
||||
% Nc/2 tones above centre freq
|
||||
|
||||
for c=Nc/2+1:Nc
|
||||
for i=1:M
|
||||
phase_tx(c) = phase_tx(c) * freq(c);
|
||||
tx_fdm(i) = tx_fdm(i) + tx_filt(c,i)*phase_tx(c);
|
||||
end
|
||||
end
|
||||
|
||||
% add centre pilot tone
|
||||
|
||||
c = Nc+1;
|
||||
for i=1:M
|
||||
phase_tx(c) = phase_tx(c) * freq(c);
|
||||
pilot(i) = 2*tx_filt(c,i)*phase_tx(c);
|
||||
tx_fdm(i) = tx_fdm(i) + pilot(i);
|
||||
end
|
||||
|
||||
% Scale such that total Carrier power C of real(tx_fdm) = Nc. This
|
||||
% excludes the power of the pilot tone.
|
||||
% We return the complex (single sided) signal to make frequency
|
||||
% shifting for the purpose of testing easier
|
||||
|
||||
tx_fdm = 2*tx_fdm;
|
||||
endfunction
|
||||
|
||||
|
||||
% Frequency shift each modem carrier down to Nc+1 baseband signals
|
||||
|
||||
function rx_baseband = fdm_downconvert(rx_fdm, nin)
|
||||
global Fs;
|
||||
global M;
|
||||
global Nc;
|
||||
global Fsep;
|
||||
global phase_rx;
|
||||
global freq;
|
||||
|
||||
rx_baseband = zeros(1,nin);
|
||||
|
||||
% Nc/2 tones below centre freq
|
||||
|
||||
for c=1:Nc/2
|
||||
for i=1:nin
|
||||
phase_rx(c) = phase_rx(c) * freq(c);
|
||||
rx_baseband(c,i) = rx_fdm(i)*phase_rx(c)';
|
||||
end
|
||||
end
|
||||
|
||||
% Nc/2 tones above centre freq
|
||||
|
||||
for c=Nc/2+1:Nc
|
||||
for i=1:nin
|
||||
phase_rx(c) = phase_rx(c) * freq(c);
|
||||
rx_baseband(c,i) = rx_fdm(i)*phase_rx(c)';
|
||||
end
|
||||
end
|
||||
|
||||
% Pilot
|
||||
|
||||
c = Nc+1;
|
||||
for i=1:nin
|
||||
phase_rx(c) = phase_rx(c) * freq(c);
|
||||
rx_baseband(c,i) = rx_fdm(i)*phase_rx(c)';
|
||||
end
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Receive filter each baseband signal at oversample rate P
|
||||
|
||||
function rx_filt = rx_filter(rx_baseband, nin)
|
||||
global Nc;
|
||||
global M;
|
||||
global P;
|
||||
global rx_filter_memory;
|
||||
global Nfilter;
|
||||
global gt_alpha5_root;
|
||||
global Fsep;
|
||||
|
||||
rx_filt = zeros(Nc+1,nin*P/M);
|
||||
|
||||
% rx filter each symbol, generate P filtered output samples for each symbol.
|
||||
% Note we keep memory at rate M, it's just the filter output at rate P
|
||||
|
||||
N=M/P;
|
||||
j=1;
|
||||
for i=1:N:nin
|
||||
rx_filter_memory(:,Nfilter-N+1:Nfilter) = rx_baseband(:,i:i-1+N);
|
||||
rx_filt(:,j) = rx_filter_memory * gt_alpha5_root';
|
||||
rx_filter_memory(:,1:Nfilter-N) = rx_filter_memory(:,1+N:Nfilter);
|
||||
j+=1;
|
||||
end
|
||||
endfunction
|
||||
|
||||
|
||||
% LPF and peak pick part of freq est, put in a function as we call it twice
|
||||
|
||||
function [foff imax pilot_lpf S] = lpf_peak_pick(pilot_baseband, pilot_lpf, nin)
|
||||
global M;
|
||||
global Npilotlpf;
|
||||
global Npilotcoeff;
|
||||
global Fs;
|
||||
global Mpilotfft;
|
||||
global pilot_coeff;
|
||||
|
||||
% LPF cutoff 200Hz, so we can handle max +/- 200 Hz freq offset
|
||||
|
||||
pilot_lpf(1:Npilotlpf-nin) = pilot_lpf(nin+1:Npilotlpf);
|
||||
j = 1;
|
||||
for i = Npilotlpf-nin+1:Npilotlpf
|
||||
pilot_lpf(i) = pilot_baseband(j:j+Npilotcoeff-1) * pilot_coeff';
|
||||
j++;
|
||||
end
|
||||
|
||||
% decimate to improve DFT resolution, window and DFT
|
||||
|
||||
Mpilot = Fs/(2*200); % calc decimation rate given new sample rate is twice LPF freq
|
||||
h = hanning(Npilotlpf);
|
||||
s = pilot_lpf(1:Mpilot:Npilotlpf) .* h(1:Mpilot:Npilotlpf)';
|
||||
s = [s zeros(1,Mpilotfft-Npilotlpf/Mpilot)];
|
||||
S = fft(s, Mpilotfft);
|
||||
|
||||
% peak pick and convert to Hz
|
||||
|
||||
[imax ix] = max(S);
|
||||
r = 2*200/Mpilotfft; % maps FFT bin to frequency in Hz
|
||||
|
||||
if ix > Mpilotfft/2
|
||||
foff = (ix - Mpilotfft - 1)*r;
|
||||
else
|
||||
foff = (ix - 1)*r;
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Estimate frequency offset of FDM signal using BPSK pilot. This is quite
|
||||
% sensitive to pilot tone level wrt other carriers
|
||||
|
||||
function [foff S1 S2] = rx_est_freq_offset(rx_fdm, pilot, pilot_prev, nin)
|
||||
global M;
|
||||
global Npilotbaseband;
|
||||
global pilot_baseband1;
|
||||
global pilot_baseband2;
|
||||
global pilot_lpf1;
|
||||
global pilot_lpf2;
|
||||
|
||||
% down convert latest nin samples of pilot by multiplying by
|
||||
% ideal BPSK pilot signal we have generated locally. This
|
||||
% peak of the resulting signal is sensitive to the time shift between
|
||||
% the received and local version of the pilot, so we do it twice at
|
||||
% different time shifts and choose the maximum.
|
||||
|
||||
pilot_baseband1(1:Npilotbaseband-nin) = pilot_baseband1(nin+1:Npilotbaseband);
|
||||
pilot_baseband2(1:Npilotbaseband-nin) = pilot_baseband2(nin+1:Npilotbaseband);
|
||||
for i=1:nin
|
||||
pilot_baseband1(Npilotbaseband-nin+i) = rx_fdm(i) * conj(pilot(i));
|
||||
pilot_baseband2(Npilotbaseband-nin+i) = rx_fdm(i) * conj(pilot_prev(i));
|
||||
end
|
||||
|
||||
[foff1 max1 pilot_lpf1 S1] = lpf_peak_pick(pilot_baseband1, pilot_lpf1, nin);
|
||||
[foff2 max2 pilot_lpf2 S2] = lpf_peak_pick(pilot_baseband2, pilot_lpf2, nin);
|
||||
|
||||
if max1 > max2
|
||||
foff = foff1;
|
||||
else
|
||||
foff = foff2;
|
||||
end
|
||||
endfunction
|
||||
|
||||
|
||||
% Estimate optimum timing offset, re-filter receive symbols
|
||||
|
||||
function [rx_symbols rx_timing env] = rx_est_timing(rx_filt, rx_baseband, nin)
|
||||
global M;
|
||||
global Nt;
|
||||
global Nc;
|
||||
global rx_filter_mem_timing;
|
||||
global rx_baseband_mem_timing;
|
||||
global P;
|
||||
global Nfilter;
|
||||
global Nfiltertiming;
|
||||
global gt_alpha5_root;
|
||||
|
||||
% nin adjust
|
||||
% --------------------------------
|
||||
% 120 -1 (one less rate P sample)
|
||||
% 160 0 (nominal)
|
||||
% 200 1 (one more rate P sample)
|
||||
|
||||
adjust = P - nin*P/M;
|
||||
|
||||
% update buffer of Nt rate P filtered symbols
|
||||
|
||||
rx_filter_mem_timing(:,1:(Nt-1)*P+adjust) = rx_filter_mem_timing(:,P+1-adjust:Nt*P);
|
||||
rx_filter_mem_timing(:,(Nt-1)*P+1+adjust:Nt*P) = rx_filt(:,:);
|
||||
|
||||
% sum envelopes of all carriers
|
||||
|
||||
env = sum(abs(rx_filter_mem_timing(:,:))); % use all Nc+1 carriers for timing
|
||||
%env = abs(rx_filter_mem_timing(Nc+1,:)); % just use BPSK pilot
|
||||
[n m] = size(env);
|
||||
|
||||
% The envelope has a frequency component at the symbol rate. The
|
||||
% phase of this frequency component indicates the timing. So work out
|
||||
% single DFT at frequency 2*pi/P
|
||||
|
||||
x = env * exp(-j*2*pi*(0:m-1)/P)';
|
||||
|
||||
% map phase to estimated optimum timing instant at rate M
|
||||
% the M/4 part was adjusted by experiment, I know not why....
|
||||
|
||||
rx_timing = angle(x)*M/(2*pi) + M/4;
|
||||
if (rx_timing > M)
|
||||
rx_timing -= M;
|
||||
end
|
||||
if (rx_timing < -M)
|
||||
rx_timing += M;
|
||||
end
|
||||
|
||||
% rx_baseband_mem_timing contains M + Nfilter + M samples of the
|
||||
% baseband signal at rate M this enables us to resample the filtered
|
||||
% rx symbol with M sample precision once we have rx_timing
|
||||
|
||||
rx_baseband_mem_timing(:,1:Nfiltertiming-nin) = rx_baseband_mem_timing(:,nin+1:Nfiltertiming);
|
||||
rx_baseband_mem_timing(:,Nfiltertiming-nin+1:Nfiltertiming) = rx_baseband;
|
||||
|
||||
% sample right in the middle of the timing estimator window, by filtering
|
||||
% at rate M
|
||||
|
||||
s = round(rx_timing) + M;
|
||||
rx_symbols = rx_baseband_mem_timing(:,s+1:s+Nfilter) * gt_alpha5_root';
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Phase estimation function - probably won't work over a HF channel
|
||||
% Tries to operate over a single symbol but uses phase information from
|
||||
% all Nc carriers which should increase the SNR of phase estimate.
|
||||
% Maybe phase is coherent over a couple of symbols in HF channel,not
|
||||
% sure but it's worth 3dB so worth experimenting or using coherent as
|
||||
% an option.
|
||||
|
||||
function rx_phase = rx_est_phase(prev_rx_symbols, rx_symbols)
|
||||
|
||||
% modulation strip
|
||||
|
||||
rx_phase = angle(sum(rx_symbols .^ 4))/4;
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% convert symbols back to an array of bits
|
||||
|
||||
function [rx_bits sync_bit f_err phase_difference] = qpsk_to_bits(prev_rx_symbols, rx_symbols, modulation)
|
||||
global Nc;
|
||||
global Nb;
|
||||
global Nb;
|
||||
|
||||
if (strcmp(modulation,'dqpsk'))
|
||||
% extra 45 degree clockwise lets us use real and imag axis as
|
||||
% decision boundaries
|
||||
|
||||
phase_difference = zeros(Nc+1,1);
|
||||
phase_difference(1:Nc) = rx_symbols(1:Nc) .* conj(prev_rx_symbols(1:Nc)) * exp(j*pi/4);
|
||||
|
||||
% map (Nc,1) DQPSK symbols back into an (1,Nc*Nb) array of bits
|
||||
|
||||
for c=1:Nc
|
||||
d = phase_difference(c);
|
||||
if ((real(d) >= 0) && (imag(d) >= 0))
|
||||
msb = 0; lsb = 0;
|
||||
endif
|
||||
if ((real(d) < 0) && (imag(d) >= 0))
|
||||
msb = 0; lsb = 1;
|
||||
endif
|
||||
if ((real(d) < 0) && (imag(d) < 0))
|
||||
msb = 1; lsb = 0;
|
||||
endif
|
||||
if ((real(d) >= 0) && (imag(d) < 0))
|
||||
msb = 1; lsb = 1;
|
||||
endif
|
||||
rx_bits(2*(c-1)+1) = msb;
|
||||
rx_bits(2*(c-1)+2) = lsb;
|
||||
end
|
||||
|
||||
% Extract DBPSK encoded Sync bit
|
||||
|
||||
phase_difference(Nc+1,1) = rx_symbols(Nc+1) .* conj(prev_rx_symbols(Nc+1));
|
||||
if (real(phase_difference(Nc+1)) < 0)
|
||||
sync_bit = 1;
|
||||
f_err = imag(phase_difference(Nc+1));
|
||||
else
|
||||
sync_bit = 0;
|
||||
f_err = -imag(phase_difference(Nc+1));
|
||||
end
|
||||
|
||||
% pilot carrier gets an extra pi/4 rotation to make it consistent with
|
||||
% other carriers, as we need it for snr_update and scatter diagram
|
||||
|
||||
phase_difference(Nc+1) *= exp(j*pi/4);
|
||||
else
|
||||
% map (Nc,1) QPSK symbols back into an (1,Nc*Nb) array of bits
|
||||
|
||||
rx_bits(1:Nb:Nc*Nb) = real(rx_symbols) > 0;
|
||||
rx_bits(2:Nb:Nc*Nb) = imag(rx_symbols) > 0;
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% given phase differences update estimates of signal and noise levels
|
||||
|
||||
function [sig_est noise_est] = snr_update(sig_est, noise_est, phase_difference)
|
||||
global snr_coeff;
|
||||
global Nc;
|
||||
|
||||
% mag of each symbol is distance from origin, this gives us a
|
||||
% vector of mags, one for each carrier.
|
||||
|
||||
s = abs(phase_difference);
|
||||
|
||||
% signal mag estimate for each carrier is a smoothed version
|
||||
% of instantaneous magntitude, this gives us a vector of smoothed
|
||||
% mag estimates, one for each carrier.
|
||||
|
||||
sig_est = snr_coeff*sig_est + (1 - snr_coeff)*s;
|
||||
|
||||
% noise mag estimate is distance of current symbol from average
|
||||
% location of that symbol. We reflect all symbols into the first
|
||||
% quadrant for convenience.
|
||||
|
||||
refl_symbols = abs(real(phase_difference)) + j*abs(imag(phase_difference));
|
||||
n = abs(exp(j*pi/4)*sig_est - refl_symbols);
|
||||
|
||||
% noise mag estimate for each carrier is a smoothed version of
|
||||
% instantaneous noise mag, this gives us a vector of smoothed
|
||||
% noise power estimates, one for each carrier.
|
||||
|
||||
noise_est = snr_coeff*noise_est + (1 - snr_coeff)*n;
|
||||
endfunction
|
||||
|
||||
|
||||
% calculate current SNR estimate (3000Hz noise BW)
|
||||
|
||||
function snr_dB = calc_snr(sig_est, noise_est)
|
||||
global Rs;
|
||||
|
||||
% find total signal power by summing power in all carriers
|
||||
|
||||
S = sum(sig_est .^2);
|
||||
SdB = 10*log10(S);
|
||||
|
||||
% Average noise mag across all carriers and square to get an average
|
||||
% noise power. This is an estimate of the noise power in Rs = 50Hz of
|
||||
% BW (note for raised root cosine filters Rs is the noise BW of the
|
||||
% filter)
|
||||
|
||||
N50 = mean(noise_est).^2;
|
||||
N50dB = 10*log10(N50);
|
||||
|
||||
% Now multiply by (3000 Hz)/(50 Hz) to find the total noise power in
|
||||
% 3000 Hz
|
||||
|
||||
N3000dB = N50dB + 10*log10(3000/Rs);
|
||||
|
||||
snr_dB = SdB - N3000dB;
|
||||
|
||||
endfunction
|
||||
|
||||
% returns nbits from a repeating sequence of random data
|
||||
|
||||
function bits = get_test_bits(nbits)
|
||||
global Ntest_bits; % length of test sequence
|
||||
global current_test_bit;
|
||||
global test_bits;
|
||||
|
||||
for i=1:nbits
|
||||
bits(i) = test_bits(current_test_bit++);
|
||||
if (current_test_bit > Ntest_bits)
|
||||
current_test_bit = 1;
|
||||
endif
|
||||
end
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Accepts nbits from rx and attempts to sync with test_bits sequence.
|
||||
% if sync OK measures bit errors
|
||||
|
||||
function [sync bit_errors] = put_test_bits(rx_bits)
|
||||
global Ntest_bits; % length of test sequence
|
||||
global test_bits;
|
||||
global rx_test_bits_mem;
|
||||
|
||||
% Append to our memory
|
||||
|
||||
[m n] = size(rx_bits);
|
||||
rx_test_bits_mem(1:Ntest_bits-n) = rx_test_bits_mem(n+1:Ntest_bits);
|
||||
rx_test_bits_mem(Ntest_bits-n+1:Ntest_bits) = rx_bits;
|
||||
|
||||
% see how many bit errors we get when checked against test sequence
|
||||
|
||||
bit_errors = sum(xor(test_bits,rx_test_bits_mem));
|
||||
|
||||
% if less than a thresh we are aligned and in sync with test sequence
|
||||
|
||||
ber = bit_errors/Ntest_bits;
|
||||
|
||||
sync = 0;
|
||||
if (ber < 0.2)
|
||||
sync = 1;
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
% Generate M samples of DBPSK pilot signal for Freq offset estimation
|
||||
|
||||
function [pilot_fdm bit symbol filter_mem phase] = generate_pilot_fdm(bit, symbol, filter_mem, phase, freq)
|
||||
global M;
|
||||
global Nfilter;
|
||||
global gt_alpha5_root;
|
||||
|
||||
% +1 -1 +1 -1 DBPSK sync carrier, once filtered becomes two spectral
|
||||
% lines at +/- Rs/2
|
||||
|
||||
if bit
|
||||
symbol = -symbol;
|
||||
else
|
||||
symbol = symbol;
|
||||
end
|
||||
if bit
|
||||
bit = 0;
|
||||
else
|
||||
bit = 1;
|
||||
end
|
||||
|
||||
% filter DPSK symbol to create M baseband samples
|
||||
|
||||
filter_mem(Nfilter) = (sqrt(2)/2)*symbol;
|
||||
for i=1:M
|
||||
tx_baseband(i) = M*filter_mem(M:M:Nfilter) * gt_alpha5_root(M-i+1:M:Nfilter)';
|
||||
end
|
||||
filter_mem(1:Nfilter-M) = filter_mem(M+1:Nfilter);
|
||||
filter_mem(Nfilter-M+1:Nfilter) = zeros(1,M);
|
||||
|
||||
% upconvert
|
||||
|
||||
for i=1:M
|
||||
phase = phase * freq;
|
||||
pilot_fdm(i) = sqrt(2)*2*tx_baseband(i)*phase;
|
||||
end
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% Generate a 4M sample vector of DBPSK pilot signal. As the pilot signal
|
||||
% is periodic in 4M samples we can then use this vector as a look up table
|
||||
% for pilot signal generation in the demod.
|
||||
|
||||
function pilot_lut = generate_pilot_lut()
|
||||
global Nc;
|
||||
global Nfilter;
|
||||
global M;
|
||||
global freq;
|
||||
|
||||
% pilot states
|
||||
|
||||
pilot_rx_bit = 0;
|
||||
pilot_symbol = sqrt(2);
|
||||
pilot_freq = freq(Nc+1);
|
||||
pilot_phase = 1;
|
||||
pilot_filter_mem = zeros(1, Nfilter);
|
||||
%prev_pilot = zeros(M,1);
|
||||
|
||||
pilot_lut = [];
|
||||
|
||||
F=8;
|
||||
|
||||
for f=1:F
|
||||
[pilot pilot_rx_bit pilot_symbol pilot_filter_mem pilot_phase] = generate_pilot_fdm(pilot_rx_bit, pilot_symbol, pilot_filter_mem, pilot_phase, pilot_freq);
|
||||
%prev_pilot = pilot;
|
||||
pilot_lut = [pilot_lut pilot];
|
||||
end
|
||||
|
||||
% discard first 4 symbols as filter memory is filling, just keep last
|
||||
% four symbols
|
||||
|
||||
pilot_lut = pilot_lut(4*M+1:M*F);
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% grab next pilot samples for freq offset estimation at demod
|
||||
|
||||
function [pilot prev_pilot pilot_lut_index prev_pilot_lut_index] = get_pilot(pilot_lut_index, prev_pilot_lut_index, nin)
|
||||
global M;
|
||||
global pilot_lut;
|
||||
|
||||
for i=1:nin
|
||||
pilot(i) = pilot_lut(pilot_lut_index);
|
||||
pilot_lut_index++;
|
||||
if pilot_lut_index > 4*M
|
||||
pilot_lut_index = 1;
|
||||
end
|
||||
prev_pilot(i) = pilot_lut(prev_pilot_lut_index);
|
||||
prev_pilot_lut_index++;
|
||||
if prev_pilot_lut_index > 4*M
|
||||
prev_pilot_lut_index = 1;
|
||||
end
|
||||
end
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
% Change the sample rate by a small amount, for example 1000ppm (ratio
|
||||
% = 1.001). Always returns nout samples in buf_out, but uses a
|
||||
% variable number of input samples nin to accomodate the change in
|
||||
% sample rate. nin is nominally set to nout, but may use nout +/- 2
|
||||
% samples to accomodate the different sample rates. buf_in should be
|
||||
% of length nout+6 samples to accomodate this, and buf_in should be
|
||||
% updated externally based on the nin returned each time. "ratio" is
|
||||
% Fs_in/Fs_out, for example 48048/48000 = 1.001 (+1000ppm) or
|
||||
% 47952/48000 = 0.999 (-1000ppm). Uses linear interpolation to
|
||||
% perform the resampling. This requires a highly over-sampled signal,
|
||||
% for example 48000Hz sample rate for the modem signal centred on
|
||||
% 1kHz, otherwise linear interpolation will have a low pass filter effect
|
||||
% (for example an 8000Hz sample rate for modem signal centred on 1kHz
|
||||
% would cause problems).
|
||||
|
||||
function [buf_out t nin] = resample(buf_in, t, ratio, nout)
|
||||
|
||||
for i=1:nout
|
||||
c = floor(t);
|
||||
a = t - c;
|
||||
b = 1 - a;
|
||||
buf_out(i) = buf_in(c)*b + buf_in(c+1)*a;
|
||||
t += ratio;
|
||||
end
|
||||
|
||||
t -= nout;
|
||||
|
||||
% adjust nin and t so that on next call we start with 3 < t < 4,
|
||||
% this gives us +/- 2 samples room to move before we hit start or
|
||||
% end of buf_in
|
||||
|
||||
delta = floor(t - 3);
|
||||
nin = nout + delta;
|
||||
t -= delta;
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
% freq offset state machine. Moves between acquire and track states based
|
||||
% on BPSK pilot sequence. Freq offset estimator occasionally makes mistakes
|
||||
% when used continuously. So we use it until we have acquired the BPSK pilot,
|
||||
% then switch to a more robust tracking algorithm. If we lose sync we switch
|
||||
% back to acquire mode for fast-requisition.
|
||||
|
||||
function [track state] = freq_state(sync_bit, state)
|
||||
|
||||
% acquire state, look for 6 symbol 010101 sequence from sync bit
|
||||
|
||||
next_state = state;
|
||||
if state == 0
|
||||
if sync_bit == 0
|
||||
next_state = 1;
|
||||
end
|
||||
end
|
||||
if state == 1
|
||||
if sync_bit == 1
|
||||
next_state = 2;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
if state == 2
|
||||
if sync_bit == 0
|
||||
next_state = 3;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
if state == 3
|
||||
if sync_bit == 1
|
||||
next_state = 4;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
if state == 4
|
||||
if sync_bit == 0
|
||||
next_state = 5;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
if state == 5
|
||||
if sync_bit == 1
|
||||
next_state = 6;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
|
||||
% states 6 and above are track mode, make sure we keep getting 0101 sync bit sequence
|
||||
|
||||
if state == 6
|
||||
if sync_bit == 0
|
||||
next_state = 7;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
if state == 7
|
||||
if sync_bit == 1
|
||||
next_state = 6;
|
||||
else
|
||||
next_state = 0;
|
||||
end
|
||||
end
|
||||
|
||||
state = next_state;
|
||||
if state >= 6
|
||||
track = 1;
|
||||
else
|
||||
track = 0;
|
||||
end
|
||||
endfunction
|
||||
|
||||
|
||||
% Save test bits to a text file in the form of a C array
|
||||
|
||||
function test_bits_file(filename)
|
||||
global test_bits;
|
||||
global Ntest_bits;
|
||||
|
||||
f=fopen(filename,"wt");
|
||||
fprintf(f,"/* Generated by test_bits_file() Octave function */\n\n");
|
||||
fprintf(f,"const int test_bits[]={\n");
|
||||
for m=1:Ntest_bits-1
|
||||
fprintf(f," %d,\n",test_bits(m));
|
||||
endfor
|
||||
fprintf(f," %d\n};\n",test_bits(Ntest_bits));
|
||||
fclose(f);
|
||||
endfunction
|
||||
|
||||
|
||||
% Saves RN filter coeffs to a text file in the form of a C array
|
||||
|
||||
function rn_file(filename)
|
||||
global gt_alpha5_root;
|
||||
global Nfilter;
|
||||
|
||||
f=fopen(filename,"wt");
|
||||
fprintf(f,"/* Generated by rn_file() Octave function */\n\n");
|
||||
fprintf(f,"const float gt_alpha5_root[]={\n");
|
||||
for m=1:Nfilter-1
|
||||
fprintf(f," %g,\n",gt_alpha5_root(m));
|
||||
endfor
|
||||
fprintf(f," %g\n};\n",gt_alpha5_root(Nfilter));
|
||||
fclose(f);
|
||||
endfunction
|
||||
|
||||
function pilot_coeff_file(filename)
|
||||
global pilot_coeff;
|
||||
global Npilotcoeff;
|
||||
|
||||
f=fopen(filename,"wt");
|
||||
fprintf(f,"/* Generated by pilot_coeff_file() Octave function */\n\n");
|
||||
fprintf(f,"const float pilot_coeff[]={\n");
|
||||
for m=1:Npilotcoeff-1
|
||||
fprintf(f," %g,\n",pilot_coeff(m));
|
||||
endfor
|
||||
fprintf(f," %g\n};\n",pilot_coeff(Npilotcoeff));
|
||||
fclose(f);
|
||||
endfunction
|
||||
|
||||
|
||||
% Saves hanning window coeffs to a text file in the form of a C array
|
||||
|
||||
function hanning_file(filename)
|
||||
global Npilotlpf;
|
||||
|
||||
h = hanning(Npilotlpf);
|
||||
|
||||
f=fopen(filename,"wt");
|
||||
fprintf(f,"/* Generated by hanning_file() Octave function */\n\n");
|
||||
fprintf(f,"const float hanning[]={\n");
|
||||
for m=1:Npilotlpf-1
|
||||
fprintf(f," %g,\n", h(m));
|
||||
endfor
|
||||
fprintf(f," %g\n};\n", h(Npilotlpf));
|
||||
fclose(f);
|
||||
endfunction
|
||||
|
||||
|
||||
function png_file(fig, pngfilename)
|
||||
figure(fig);
|
||||
|
||||
pngname = sprintf("%s.png",pngfilename);
|
||||
print(pngname, '-dpng', "-S500,500")
|
||||
pngname = sprintf("%s_large.png",pngfilename);
|
||||
print(pngname, '-dpng', "-S800,600")
|
||||
endfunction
|
||||
|
||||
% Initialise ----------------------------------------------------
|
||||
|
||||
global pilot_bit;
|
||||
pilot_bit = 0; % current value of pilot bit
|
||||
|
||||
global tx_filter_memory;
|
||||
tx_filter_memory = zeros(Nc+1, Nfilter);
|
||||
global rx_filter_memory;
|
||||
rx_filter_memory = zeros(Nc+1, Nfilter);
|
||||
|
||||
% phasors used for up and down converters
|
||||
|
||||
global freq;
|
||||
freq = zeros(Nc+1,1);
|
||||
for c=1:Nc/2
|
||||
carrier_freq = (-Nc/2 - 1 + c)*Fsep + Fcentre;
|
||||
freq(c) = exp(j*2*pi*carrier_freq/Fs);
|
||||
end
|
||||
for c=Nc/2+1:Nc
|
||||
carrier_freq = (-Nc/2 + c)*Fsep + Fcentre;
|
||||
freq(c) = exp(j*2*pi*carrier_freq/Fs);
|
||||
end
|
||||
|
||||
freq(Nc+1) = exp(j*2*pi*Fcentre/Fs);
|
||||
|
||||
% Spread initial FDM carrier phase out as far as possible. This
|
||||
% helped PAPR for a few dB. We don't need to adjust rx phase as DQPSK
|
||||
% takes care of that.
|
||||
|
||||
global phase_tx;
|
||||
%phase_tx = ones(Nc+1,1);
|
||||
phase_tx = exp(j*2*pi*(0:Nc)/(Nc+1));
|
||||
global phase_rx;
|
||||
phase_rx = ones(Nc+1,1);
|
||||
|
||||
% Freq offset estimator constants
|
||||
|
||||
global Mpilotfft = 256;
|
||||
global Npilotcoeff = 30; % number of pilot LPF coeffs
|
||||
global pilot_coeff = fir1(Npilotcoeff-1, 200/(Fs/2))'; % 200Hz LPF
|
||||
global Npilotbaseband = Npilotcoeff + M + M/P; % number of pilot baseband samples reqd for pilot LPF
|
||||
global Npilotlpf = 4*M; % number of samples we DFT pilot over, pilot est window
|
||||
|
||||
% pilot LUT, used for copy of pilot at rx
|
||||
|
||||
global pilot_lut;
|
||||
pilot_lut = generate_pilot_lut();
|
||||
pilot_lut_index = 1;
|
||||
prev_pilot_lut_index = 3*M+1;
|
||||
|
||||
% Freq offset estimator states
|
||||
|
||||
global pilot_baseband1;
|
||||
global pilot_baseband2;
|
||||
pilot_baseband1 = zeros(1, Npilotbaseband); % pilot baseband samples
|
||||
pilot_baseband2 = zeros(1, Npilotbaseband); % pilot baseband samples
|
||||
global pilot_lpf1
|
||||
global pilot_lpf2
|
||||
pilot_lpf1 = zeros(1, Npilotlpf); % LPF pilot samples
|
||||
pilot_lpf2 = zeros(1, Npilotlpf); % LPF pilot samples
|
||||
|
||||
% Timing estimator states
|
||||
|
||||
global rx_filter_mem_timing;
|
||||
rx_filter_mem_timing = zeros(Nc+1, Nt*P);
|
||||
global rx_baseband_mem_timing;
|
||||
rx_baseband_mem_timing = zeros(Nc+1, Nfiltertiming);
|
||||
|
||||
% Test bit stream constants
|
||||
|
||||
global Ntest_bits = Nc*Nb*4; % length of test sequence
|
||||
global test_bits = rand(1,Ntest_bits) > 0.5;
|
||||
|
||||
% Test bit stream state variables
|
||||
|
||||
global current_test_bit = 1;
|
||||
current_test_bit = 1;
|
||||
global rx_test_bits_mem;
|
||||
rx_test_bits_mem = zeros(1,Ntest_bits);
|
||||
|
217
libs/libcodec2/octave/fdmdv_demod.m
Normal file
217
libs/libcodec2/octave/fdmdv_demod.m
Normal file
@ -0,0 +1,217 @@
|
||||
% fdmdv_demod.m
|
||||
%
|
||||
% Demodulator function for FDMDV modem (Octave version). Requires
|
||||
% 8kHz sample rate raw files as input
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
function fdmdv_demod(rawfilename, nbits, pngname)
|
||||
|
||||
fdmdv; % include modem code
|
||||
|
||||
modulation = 'dqpsk';
|
||||
|
||||
fin = fopen(rawfilename, "rb");
|
||||
gain = 1000;
|
||||
frames = nbits/(Nc*Nb);
|
||||
|
||||
prev_rx_symbols = ones(Nc+1,1);
|
||||
foff_phase = 1;
|
||||
|
||||
% BER stats
|
||||
|
||||
total_bit_errors = 0;
|
||||
total_bits = 0;
|
||||
bit_errors_log = [];
|
||||
sync_log = [];
|
||||
test_frame_sync_log = [];
|
||||
test_frame_sync_state = 0;
|
||||
|
||||
% SNR states
|
||||
|
||||
sig_est = zeros(Nc+1,1);
|
||||
noise_est = zeros(Nc+1,1);
|
||||
|
||||
% logs of various states for plotting
|
||||
|
||||
rx_symbols_log = [];
|
||||
rx_timing_log = [];
|
||||
foff_log = [];
|
||||
rx_fdm_log = [];
|
||||
snr_est_log = [];
|
||||
|
||||
% misc states
|
||||
|
||||
nin = M; % timing correction for sample rate differences
|
||||
foff = 0;
|
||||
track_log = [];
|
||||
track = 0;
|
||||
fest_state = 0;
|
||||
|
||||
% Main loop ----------------------------------------------------
|
||||
|
||||
for f=1:frames
|
||||
|
||||
% obtain nin samples of the test input signal
|
||||
|
||||
for i=1:nin
|
||||
rx_fdm(i) = fread(fin, 1, "short")/gain;
|
||||
end
|
||||
|
||||
rx_fdm_log = [rx_fdm_log rx_fdm(1:nin)];
|
||||
|
||||
% frequency offset estimation and correction
|
||||
|
||||
[pilot prev_pilot pilot_lut_index prev_pilot_lut_index] = get_pilot(pilot_lut_index, prev_pilot_lut_index, nin);
|
||||
[foff_coarse S1 S2] = rx_est_freq_offset(rx_fdm, pilot, prev_pilot, nin);
|
||||
|
||||
if track == 0
|
||||
foff = foff_coarse;
|
||||
end
|
||||
foff_log = [ foff_log foff ];
|
||||
foff_rect = exp(j*2*pi*foff/Fs);
|
||||
|
||||
for i=1:nin
|
||||
foff_phase *= foff_rect';
|
||||
rx_fdm(i) = rx_fdm(i)*foff_phase;
|
||||
end
|
||||
|
||||
% baseband processing
|
||||
|
||||
rx_baseband = fdm_downconvert(rx_fdm, nin);
|
||||
rx_filt = rx_filter(rx_baseband, nin);
|
||||
|
||||
[rx_symbols rx_timing] = rx_est_timing(rx_filt, rx_baseband, nin);
|
||||
|
||||
rx_timing_log = [rx_timing_log rx_timing];
|
||||
nin = M;
|
||||
if rx_timing > 2*M/P
|
||||
nin += M/P;
|
||||
end
|
||||
if rx_timing < 0;
|
||||
nin -= M/P;
|
||||
end
|
||||
|
||||
if strcmp(modulation,'dqpsk')
|
||||
rx_symbols_log = [rx_symbols_log rx_symbols.*conj(prev_rx_symbols)*exp(j*pi/4)];
|
||||
else
|
||||
rx_symbols_log = [rx_symbols_log rx_symbols];
|
||||
endif
|
||||
[rx_bits sync f_err pd] = qpsk_to_bits(prev_rx_symbols, rx_symbols, modulation);
|
||||
[sig_est noise_est] = snr_update(sig_est, noise_est, pd);
|
||||
snr_est = calc_snr(sig_est, noise_est);
|
||||
snr_est_log = [snr_est_log snr_est];
|
||||
foff -= 0.5*f_err;
|
||||
prev_rx_symbols = rx_symbols;
|
||||
sync_log = [sync_log sync];
|
||||
|
||||
% freq est state machine
|
||||
|
||||
[track fest_state] = freq_state(sync, fest_state);
|
||||
track_log = [track_log track];
|
||||
|
||||
% count bit errors if we find a test frame
|
||||
|
||||
[test_frame_sync bit_errors] = put_test_bits(rx_bits);
|
||||
if (test_frame_sync == 1)
|
||||
total_bit_errors = total_bit_errors + bit_errors;
|
||||
total_bits = total_bits + Ntest_bits;
|
||||
bit_errors_log = [bit_errors_log bit_errors/Ntest_bits];
|
||||
else
|
||||
bit_errors_log = [bit_errors_log 0];
|
||||
end
|
||||
|
||||
% test frame sync state machine, just for more informative plots
|
||||
|
||||
next_test_frame_sync_state = test_frame_sync_state;
|
||||
if (test_frame_sync_state == 0)
|
||||
if (test_frame_sync == 1)
|
||||
next_test_frame_sync_state = 1;
|
||||
test_frame_count = 0;
|
||||
end
|
||||
end
|
||||
|
||||
if (test_frame_sync_state == 1)
|
||||
% we only expect another test_frame_sync pulse every 4 symbols
|
||||
test_frame_count++;
|
||||
if (test_frame_count == 4)
|
||||
test_frame_count = 0;
|
||||
if ((test_frame_sync == 0))
|
||||
next_test_frame_sync_state = 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
test_frame_sync_state = next_test_frame_sync_state;
|
||||
test_frame_sync_log = [test_frame_sync_log test_frame_sync_state];
|
||||
|
||||
end
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Print Stats
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
ber = total_bit_errors / total_bits;
|
||||
|
||||
printf("%d bits %d errors BER: %1.4f\n",total_bits, total_bit_errors, ber);
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Plots
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
xt = (1:frames)/Rs;
|
||||
secs = frames/Rs;
|
||||
|
||||
figure(1)
|
||||
clf;
|
||||
[n m] = size(rx_symbols_log);
|
||||
plot(real(rx_symbols_log(1:Nc+1,15:m)),imag(rx_symbols_log(1:Nc+1,15:m)),'+')
|
||||
axis([-2 2 -2 2]);
|
||||
title('Scatter Diagram');
|
||||
|
||||
figure(2)
|
||||
clf;
|
||||
subplot(211)
|
||||
plot(xt, rx_timing_log)
|
||||
title('timing offset (samples)');
|
||||
subplot(212)
|
||||
plot(xt, foff_log, '-;freq offset;')
|
||||
hold on;
|
||||
plot(xt, track_log*75, 'r;course-fine;');
|
||||
hold off;
|
||||
title('Freq offset (Hz)');
|
||||
grid
|
||||
|
||||
figure(3)
|
||||
clf;
|
||||
subplot(211)
|
||||
[a b] = size(rx_fdm_log);
|
||||
xt1 = (1:b)/Fs;
|
||||
plot(xt1, rx_fdm_log);
|
||||
title('Rx FDM Signal');
|
||||
subplot(212)
|
||||
spec(rx_fdm_log,8000);
|
||||
title('FDM Rx Spectrogram');
|
||||
|
||||
figure(4)
|
||||
clf;
|
||||
subplot(311)
|
||||
stem(xt, sync_log)
|
||||
axis([0 secs 0 1.5]);
|
||||
title('BPSK Sync')
|
||||
subplot(312)
|
||||
stem(xt, bit_errors_log);
|
||||
title('Bit Errors for test frames')
|
||||
subplot(313)
|
||||
plot(xt, test_frame_sync_log);
|
||||
axis([0 secs 0 1.5]);
|
||||
title('Test Frame Sync')
|
||||
|
||||
figure(5)
|
||||
clf;
|
||||
plot(xt, snr_est_log);
|
||||
title('SNR Estimates')
|
||||
|
||||
endfunction
|
128
libs/libcodec2/octave/fdmdv_demod_c.m
Normal file
128
libs/libcodec2/octave/fdmdv_demod_c.m
Normal file
@ -0,0 +1,128 @@
|
||||
% fdmdv_demod_c.m
|
||||
%
|
||||
% Plots Octave dump file information from C FDMDV demodulator program,
|
||||
% to give a similar set of plots to fdmdv_demod.m. Useful for off
|
||||
% line analysis of demod performance.
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
function fdmdv_demod_c(dumpfilename, bits)
|
||||
|
||||
fdmdv; % include modem code
|
||||
|
||||
frames = bits/(Nc*Nb);
|
||||
|
||||
load(dumpfilename);
|
||||
|
||||
% BER stats
|
||||
|
||||
total_bit_errors = 0;
|
||||
total_bits = 0;
|
||||
bit_errors_log = [];
|
||||
sync_log = [];
|
||||
test_frame_sync_log = [];
|
||||
test_frame_sync_state = 0;
|
||||
|
||||
% Run thru received bits to look for test pattern
|
||||
|
||||
bits_per_frame = Nc*Nb;
|
||||
|
||||
for f=1:frames
|
||||
|
||||
rx_bits = rx_bits_log_c((f-1)*bits_per_frame+1:f*bits_per_frame);
|
||||
|
||||
% count bit errors if we find a test frame
|
||||
|
||||
[test_frame_sync bit_errors] = put_test_bits(rx_bits);
|
||||
if (test_frame_sync == 1)
|
||||
total_bit_errors = total_bit_errors + bit_errors;
|
||||
total_bits = total_bits + Ntest_bits;
|
||||
bit_errors_log = [bit_errors_log bit_errors/Ntest_bits];
|
||||
else
|
||||
bit_errors_log = [bit_errors_log 0];
|
||||
end
|
||||
|
||||
% test frame sync state machine, just for more informative plots
|
||||
|
||||
next_test_frame_sync_state = test_frame_sync_state;
|
||||
if (test_frame_sync_state == 0)
|
||||
if (test_frame_sync == 1)
|
||||
next_test_frame_sync_state = 1;
|
||||
test_frame_count = 0;
|
||||
end
|
||||
end
|
||||
|
||||
if (test_frame_sync_state == 1)
|
||||
% we only expect another test_frame_sync pulse every 4 symbols
|
||||
test_frame_count++;
|
||||
if (test_frame_count == 4)
|
||||
test_frame_count = 0;
|
||||
if ((test_frame_sync == 0))
|
||||
next_test_frame_sync_state = 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
test_frame_sync_state = next_test_frame_sync_state;
|
||||
test_frame_sync_log = [test_frame_sync_log test_frame_sync_state];
|
||||
end
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Plots
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
xt = (1:frames)/Rs;
|
||||
secs = frames/Rs;
|
||||
|
||||
figure(1)
|
||||
clf;
|
||||
plot(real(rx_symbols_log_c(1:Nc+1,15:frames)),imag(rx_symbols_log_c(1:Nc+1,15:frames)),'+')
|
||||
axis([-2 2 -2 2]);
|
||||
title('Scatter Diagram');
|
||||
|
||||
figure(2)
|
||||
clf;
|
||||
subplot(211)
|
||||
plot(xt, rx_timing_log_c(1:frames))
|
||||
title('timing offset (samples)');
|
||||
subplot(212)
|
||||
plot(xt, foff_log_c(1:frames), '-;freq offset;')
|
||||
hold on;
|
||||
plot(xt, coarse_fine_log_c(1:frames)*75, 'r;course-fine;');
|
||||
hold off;
|
||||
title('Freq offset (Hz)');
|
||||
grid
|
||||
|
||||
figure(3)
|
||||
clf;
|
||||
subplot(211)
|
||||
b = M*frames;
|
||||
xt1 = (1:b)/Fs;
|
||||
plot(xt1, rx_fdm_log_c(1:b));
|
||||
title('Rx FDM Signal');
|
||||
subplot(212)
|
||||
spec(rx_fdm_log_c(1:b),8000);
|
||||
title('FDM Rx Spectrogram');
|
||||
|
||||
figure(4)
|
||||
clf;
|
||||
subplot(311)
|
||||
stem(xt, sync_bit_log_c(1:frames))
|
||||
axis([0 secs 0 1.5]);
|
||||
title('BPSK Sync')
|
||||
subplot(312)
|
||||
stem(xt, bit_errors_log);
|
||||
title('Bit Errors for test frames')
|
||||
subplot(313)
|
||||
plot(xt, test_frame_sync_log);
|
||||
axis([0 secs 0 1.5]);
|
||||
title('Test Frame Sync')
|
||||
|
||||
figure(5)
|
||||
clf;
|
||||
plot(xt, snr_est_log_c(1:frames));
|
||||
title('SNR Estimates')
|
||||
|
||||
endfunction
|
32
libs/libcodec2/octave/fdmdv_mod.m
Normal file
32
libs/libcodec2/octave/fdmdv_mod.m
Normal file
@ -0,0 +1,32 @@
|
||||
% fdmdv_mod.m
|
||||
%
|
||||
% Modulator function for FDMDV modem, uses test frames as input and
|
||||
% outputs a raw file of 16 bit shorts at a sample rate of 8 kHz.
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
function tx_fdm = fdmdv_mod(rawfilename, nbits)
|
||||
|
||||
fdmdv; % include modem code
|
||||
|
||||
frames = floor(nbits/(Nc*Nb))
|
||||
tx_fdm = [];
|
||||
gain = 1000; % Scale up to 16 bit shorts
|
||||
prev_tx_symbols = ones(Nc+1,1);
|
||||
|
||||
for i=1:frames
|
||||
tx_bits = get_test_bits(Nc*Nb);
|
||||
tx_symbols = bits_to_qpsk(prev_tx_symbols, tx_bits,'dqpsk');
|
||||
prev_tx_symbols = tx_symbols;
|
||||
tx_baseband = tx_filter(tx_symbols);
|
||||
tx_fdm = [tx_fdm real(fdm_upconvert(tx_baseband))];
|
||||
end
|
||||
|
||||
tx_fdm *= gain;
|
||||
fout = fopen(rawfilename,"wb");
|
||||
fwrite(fout, tx_fdm, "short");
|
||||
fclose(fout);
|
||||
endfunction
|
318
libs/libcodec2/octave/fdmdv_ut.m
Normal file
318
libs/libcodec2/octave/fdmdv_ut.m
Normal file
@ -0,0 +1,318 @@
|
||||
% fdmdv_ut.m
|
||||
%
|
||||
% Unit Test program for FDMDV modem. Useful for general development as it has
|
||||
% both tx and rx sides, and basic AWGN channel simulation.
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
fdmdv; % load modem code
|
||||
|
||||
% Simulation Parameters --------------------------------------
|
||||
|
||||
frames = 25;
|
||||
EbNo_dB = 7.3;
|
||||
Foff_hz = 0;
|
||||
modulation = 'dqpsk';
|
||||
hpa_clip = 150;
|
||||
|
||||
% ------------------------------------------------------------
|
||||
|
||||
tx_filt = zeros(Nc,M);
|
||||
rx_symbols_log = [];
|
||||
rx_phase_log = 0;
|
||||
rx_timing_log = 0;
|
||||
tx_pwr = 0;
|
||||
noise_pwr = 0;
|
||||
rx_fdm_log = [];
|
||||
rx_baseband_log = [];
|
||||
rx_bits_offset = zeros(Nc*Nb*2);
|
||||
prev_tx_symbols = ones(Nc+1,1);
|
||||
prev_rx_symbols = ones(Nc+1,1);
|
||||
ferr = 0;
|
||||
foff = 0;
|
||||
foff_log = [];
|
||||
tx_baseband_log = [];
|
||||
tx_fdm_log = [];
|
||||
|
||||
% BER stats
|
||||
|
||||
total_bit_errors = 0;
|
||||
total_bits = 0;
|
||||
bit_errors_log = [];
|
||||
sync_log = [];
|
||||
test_frame_sync_log = [];
|
||||
test_frame_sync_state = 0;
|
||||
|
||||
% SNR estimation states
|
||||
|
||||
sig_est = zeros(Nc+1,1);
|
||||
noise_est = zeros(Nc+1,1);
|
||||
|
||||
% fixed delay simuation
|
||||
|
||||
Ndelay = M+20;
|
||||
rx_fdm_delay = zeros(Ndelay,1);
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Eb/No calculations. We need to work out Eb/No for each FDM carrier.
|
||||
% Total power is sum of power in all FDM carriers
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
C = 1; % power of each FDM carrier (energy/sample). Total Carrier power should = Nc*C = Nc
|
||||
N = 1; % total noise power (energy/sample) of noise source across entire bandwidth
|
||||
|
||||
% Eb = Carrier power * symbol time / (bits/symbol)
|
||||
% = C *(1/Rs) / 2
|
||||
Eb_dB = 10*log10(C) - 10*log10(Rs) - 10*log10(2);
|
||||
|
||||
No_dBHz = Eb_dB - EbNo_dB;
|
||||
|
||||
% Noise power = Noise spectral density * bandwidth
|
||||
% Noise power = Noise spectral density * Fs/2 for real signals
|
||||
N_dB = No_dBHz + 10*log10(Fs/2);
|
||||
Ngain_dB = N_dB - 10*log10(N);
|
||||
Ngain = 10^(Ngain_dB/20);
|
||||
|
||||
% C/No = Carrier Power/noise spectral density
|
||||
% = power per carrier*number of carriers / noise spectral density
|
||||
CNo_dB = 10*log10(C) + 10*log10(Nc) - No_dBHz;
|
||||
|
||||
% SNR in equivalent 3000 Hz SSB channel
|
||||
|
||||
B = 3000;
|
||||
SNR = CNo_dB - 10*log10(B);
|
||||
|
||||
% freq offset simulation states
|
||||
|
||||
phase_offset = 1;
|
||||
freq_offset = exp(j*2*pi*Foff_hz/Fs);
|
||||
foff_phase = 1;
|
||||
t = 0;
|
||||
foff = 0;
|
||||
fest_state = 0;
|
||||
track = 0;
|
||||
track_log = [];
|
||||
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Main loop
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
for f=1:frames
|
||||
|
||||
% -------------------
|
||||
% Modulator
|
||||
% -------------------
|
||||
|
||||
tx_bits = get_test_bits(Nc*Nb);
|
||||
tx_symbols = bits_to_qpsk(prev_tx_symbols, tx_bits, modulation);
|
||||
prev_tx_symbols = tx_symbols;
|
||||
tx_baseband = tx_filter(tx_symbols);
|
||||
tx_baseband_log = [tx_baseband_log tx_baseband];
|
||||
tx_fdm = fdm_upconvert(tx_baseband);
|
||||
tx_pwr = 0.9*tx_pwr + 0.1*real(tx_fdm)*real(tx_fdm)'/(M);
|
||||
|
||||
% -------------------
|
||||
% Channel simulation
|
||||
% -------------------
|
||||
|
||||
% frequency offset
|
||||
|
||||
%Foff_hz += 1/Rs;
|
||||
Foff = Foff_hz;
|
||||
for i=1:M
|
||||
% Time varying freq offset
|
||||
%Foff = Foff_hz + 100*sin(t*2*pi/(300*Fs));
|
||||
%t++;
|
||||
freq_offset = exp(j*2*pi*Foff/Fs);
|
||||
phase_offset *= freq_offset;
|
||||
tx_fdm(i) = phase_offset*tx_fdm(i);
|
||||
end
|
||||
|
||||
tx_fdm = real(tx_fdm);
|
||||
|
||||
% HPA non-linearity
|
||||
|
||||
tx_fdm(find(abs(tx_fdm) > hpa_clip)) = hpa_clip;
|
||||
tx_fdm_log = [tx_fdm_log tx_fdm];
|
||||
|
||||
rx_fdm = tx_fdm;
|
||||
|
||||
% AWGN noise
|
||||
|
||||
noise = Ngain*randn(1,M);
|
||||
noise_pwr = 0.9*noise_pwr + 0.1*noise*noise'/M;
|
||||
rx_fdm += noise;
|
||||
rx_fdm_log = [rx_fdm_log rx_fdm];
|
||||
|
||||
% Delay
|
||||
|
||||
rx_fdm_delay(1:Ndelay-M) = rx_fdm_delay(M+1:Ndelay);
|
||||
rx_fdm_delay(Ndelay-M+1:Ndelay) = rx_fdm;
|
||||
%rx_fdm_delay = rx_fdm;
|
||||
|
||||
% -------------------
|
||||
% Demodulator
|
||||
% -------------------
|
||||
|
||||
% frequency offset estimation and correction, need to call rx_est_freq_offset even in track
|
||||
% mode to keep states updated
|
||||
|
||||
[pilot prev_pilot pilot_lut_index prev_pilot_lut_index] = get_pilot(pilot_lut_index, prev_pilot_lut_index, M);
|
||||
[foff_course S1 S2] = rx_est_freq_offset(rx_fdm_delay, pilot, prev_pilot, M);
|
||||
if track == 0
|
||||
foff = foff_course;
|
||||
end
|
||||
foff_log = [ foff_log foff ];
|
||||
foff_rect = exp(j*2*pi*foff/Fs);
|
||||
|
||||
for i=1:M
|
||||
foff_phase *= foff_rect';
|
||||
rx_fdm_delay(i) = rx_fdm_delay(i)*foff_phase;
|
||||
end
|
||||
|
||||
% baseband processing
|
||||
|
||||
rx_baseband = fdm_downconvert(rx_fdm_delay(1:M), M);
|
||||
rx_baseband_log = [rx_baseband_log rx_baseband];
|
||||
rx_filt = rx_filter(rx_baseband, M);
|
||||
|
||||
[rx_symbols rx_timing] = rx_est_timing(rx_filt, rx_baseband, M);
|
||||
rx_timing_log = [rx_timing_log rx_timing];
|
||||
|
||||
%rx_phase = rx_est_phase(rx_symbols);
|
||||
%rx_phase_log = [rx_phase_log rx_phase];
|
||||
%rx_symbols = rx_symbols*exp(j*rx_phase);
|
||||
|
||||
[rx_bits sync foff_fine pd] = qpsk_to_bits(prev_rx_symbols, rx_symbols, modulation);
|
||||
if strcmp(modulation,'dqpsk')
|
||||
%rx_symbols_log = [rx_symbols_log rx_symbols.*conj(prev_rx_symbols)*exp(j*pi/4)];
|
||||
rx_symbols_log = [rx_symbols_log pd];
|
||||
else
|
||||
rx_symbols_log = [rx_symbols_log rx_symbols];
|
||||
endif
|
||||
foff -= 0.5*ferr;
|
||||
prev_rx_symbols = rx_symbols;
|
||||
sync_log = [sync_log sync];
|
||||
|
||||
% freq est state machine
|
||||
|
||||
[track fest_state] = freq_state(sync, fest_state);
|
||||
track_log = [track_log track];
|
||||
|
||||
% Update SNR est
|
||||
|
||||
[sig_est noise_est] = snr_update(sig_est, noise_est, pd);
|
||||
|
||||
% count bit errors if we find a test frame
|
||||
% Allow 15 frames for filter memories to fill and time est to settle
|
||||
|
||||
[test_frame_sync bit_errors] = put_test_bits(rx_bits);
|
||||
if test_frame_sync == 1
|
||||
total_bit_errors = total_bit_errors + bit_errors;
|
||||
total_bits = total_bits + Ntest_bits;
|
||||
bit_errors_log = [bit_errors_log bit_errors];
|
||||
else
|
||||
bit_errors_log = [bit_errors_log 0];
|
||||
end
|
||||
|
||||
% test frame sync state machine, just for more informative plots
|
||||
|
||||
next_test_frame_sync_state = test_frame_sync_state;
|
||||
if (test_frame_sync_state == 0)
|
||||
if (test_frame_sync == 1)
|
||||
next_test_frame_sync_state = 1;
|
||||
test_frame_count = 0;
|
||||
end
|
||||
end
|
||||
|
||||
if (test_frame_sync_state == 1)
|
||||
% we only expect another test_frame_sync pulse every 4 symbols
|
||||
test_frame_count++;
|
||||
if (test_frame_count == 4)
|
||||
test_frame_count = 0;
|
||||
if ((test_frame_sync == 0))
|
||||
next_test_frame_sync_state = 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
test_frame_sync_state = next_test_frame_sync_state;
|
||||
test_frame_sync_log = [test_frame_sync_log test_frame_sync_state];
|
||||
end
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Print Stats
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
ber = total_bit_errors / total_bits;
|
||||
|
||||
% Peak to Average Power Ratio calcs from http://www.dsplog.com
|
||||
|
||||
papr = max(tx_fdm_log.*conj(tx_fdm_log)) / mean(tx_fdm_log.*conj(tx_fdm_log));
|
||||
papr_dB = 10*log10(papr);
|
||||
|
||||
% Note Eb/No set point is for Nc data carriers only, exclduing pilot.
|
||||
% This is convenient for testing BER versus Eb/No. Measured Eb/No
|
||||
% includes power of pilot. Similar for SNR, first number is SNR excluding
|
||||
% pilot pwr for Eb/No set point, 2nd value is measured SNR which will be a little
|
||||
% higher as pilot power is included.
|
||||
|
||||
printf("Eb/No (meas): %2.2f (%2.2f) dB\n", EbNo_dB, 10*log10(0.25*tx_pwr*Fs/(Rs*Nc*noise_pwr)));
|
||||
printf("bits........: %d\n", total_bits);
|
||||
printf("errors......: %d\n", total_bit_errors);
|
||||
printf("BER.........: %1.4f\n", ber);
|
||||
printf("PAPR........: %1.2f dB\n", papr_dB);
|
||||
printf("SNR...(meas): %2.2f (%2.2f) dB\n", SNR, calc_snr(sig_est, noise_est));
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Plots
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
figure(1)
|
||||
clf;
|
||||
[n m] = size(rx_symbols_log);
|
||||
plot(real(rx_symbols_log(1:Nc+1,15:m)),imag(rx_symbols_log(1:Nc+1,15:m)),'+')
|
||||
axis([-3 3 -3 3]);
|
||||
title('Scatter Diagram');
|
||||
|
||||
figure(2)
|
||||
clf;
|
||||
subplot(211)
|
||||
plot(rx_timing_log)
|
||||
title('timing offset (samples)');
|
||||
subplot(212)
|
||||
plot(foff_log, '-;freq offset;')
|
||||
hold on;
|
||||
plot(track_log*75, 'r;course-fine;');
|
||||
hold off;
|
||||
title('Freq offset (Hz)');
|
||||
|
||||
figure(3)
|
||||
clf;
|
||||
subplot(211)
|
||||
plot(real(tx_fdm_log));
|
||||
title('FDM Tx Signal');
|
||||
subplot(212)
|
||||
Nfft=Fs;
|
||||
S=fft(rx_fdm_log,Nfft);
|
||||
SdB=20*log10(abs(S));
|
||||
plot(SdB(1:Fs/4))
|
||||
title('FDM Rx Spectrum');
|
||||
|
||||
figure(4)
|
||||
clf;
|
||||
subplot(311)
|
||||
stem(sync_log)
|
||||
axis([0 frames 0 1.5]);
|
||||
title('BPSK Sync')
|
||||
subplot(312)
|
||||
stem(bit_errors_log);
|
||||
title('Bit Errors for test frames')
|
||||
subplot(313)
|
||||
plot(test_frame_sync_log);
|
||||
axis([0 frames 0 1.5]);
|
||||
title('Test Frame Sync')
|
||||
|
40
libs/libcodec2/octave/gen_rn_coeffs.m
Normal file
40
libs/libcodec2/octave/gen_rn_coeffs.m
Normal file
@ -0,0 +1,40 @@
|
||||
% gen_rn_coeffs.m
|
||||
% David Rowe 13 april 2012
|
||||
%
|
||||
% Generate root raised cosine (Root Nyquist) filter coefficients
|
||||
% thanks http://www.dsplog.com/db-install/wp-content/uploads/2008/05/raised_cosine_filter.m
|
||||
|
||||
function coeffs = gen_rn_coeffs(alpha, T, Rs, Nsym, M)
|
||||
|
||||
Ts = 1/Rs;
|
||||
|
||||
n = -Nsym*Ts/2:T:Nsym*Ts/2;
|
||||
Nfilter = Nsym*M;
|
||||
Nfiltertiming = M+Nfilter+M;
|
||||
|
||||
sincNum = sin(pi*n/Ts); % numerator of the sinc function
|
||||
sincDen = (pi*n/Ts); % denominator of the sinc function
|
||||
sincDenZero = find(abs(sincDen) < 10^-10);
|
||||
sincOp = sincNum./sincDen;
|
||||
sincOp(sincDenZero) = 1; % sin(pix/(pix) =1 for x =0
|
||||
|
||||
cosNum = cos(alpha*pi*n/Ts);
|
||||
cosDen = (1-(2*alpha*n/Ts).^2);
|
||||
cosDenZero = find(abs(cosDen)<10^-10);
|
||||
cosOp = cosNum./cosDen;
|
||||
cosOp(cosDenZero) = pi/4;
|
||||
gt_alpha5 = sincOp.*cosOp;
|
||||
Nfft = 4096;
|
||||
GF_alpha5 = fft(gt_alpha5,Nfft)/M;
|
||||
|
||||
% sqrt causes stop band to be amplified, this hack pushes it down again
|
||||
|
||||
for i=1:Nfft
|
||||
if (abs(GF_alpha5(i)) < 0.02)
|
||||
GF_alpha5(i) *= 0.001;
|
||||
endif
|
||||
end
|
||||
GF_alpha5_root = sqrt(abs(GF_alpha5)) .* exp(j*angle(GF_alpha5));
|
||||
ifft_GF_alpha5_root = ifft(GF_alpha5_root);
|
||||
coeffs = real((ifft_GF_alpha5_root(1:Nfilter)));
|
||||
endfunction
|
@ -11,13 +11,17 @@ kexc = [ 8, -16, 26, -48, 86, -162, 294, -502, 718, -728, 184 672, -610, -67
|
||||
kexc = shift(kexc,sh);
|
||||
kexc = [kexc(1:sh) zeros(1,512-25) kexc(sh+1:25)];
|
||||
figure(1)
|
||||
clf
|
||||
plot(kexc)
|
||||
figure(2)
|
||||
G = fft(kexc);
|
||||
subplot(211)
|
||||
plot((1:256)*(4000/256),unwrap(angle(G(1:256))))
|
||||
subplot(212)
|
||||
plot(20*log10(abs(G)))
|
||||
|
||||
f=fopen("glottal.c","wt");
|
||||
fprintf(f,"float glottal[]={\n");
|
||||
fprintf(f,"const float glottal[]={\n");
|
||||
for m=1:255
|
||||
fprintf(f," %f,\n",angle(G(m)));
|
||||
endfor
|
||||
|
12
libs/libcodec2/octave/hp_filt.m
Normal file
12
libs/libcodec2/octave/hp_filt.m
Normal file
@ -0,0 +1,12 @@
|
||||
% hp_filt.m
|
||||
% David Rowe 20 Feb 2012
|
||||
|
||||
function hp_filt(in_file, out_file)
|
||||
fin = fopen(in_file,"rb");
|
||||
s = fread(fin,Inf,"short");
|
||||
b = fir1(256, 300/4000, "high");
|
||||
freqz(b);
|
||||
s_hpf = filter(b,1,s);
|
||||
fout = fopen(out_file,"wb");
|
||||
fwrite(fout, s_hpf, "short");
|
||||
endfunction
|
46
libs/libcodec2/octave/lpcpf.m
Normal file
46
libs/libcodec2/octave/lpcpf.m
Normal file
@ -0,0 +1,46 @@
|
||||
% lpcpf.m
|
||||
% David Rowe Aug 27 2012
|
||||
% Experiments with LPC post filtering
|
||||
|
||||
function lpcpf(ak_filename, f)
|
||||
aks = load(ak_filename);
|
||||
|
||||
ak = aks(f,:);
|
||||
[tmp p] = size(ak);
|
||||
p -= 1;
|
||||
|
||||
A = freqz(1,ak, 4000);
|
||||
AdB = 20*log10(abs(A));
|
||||
|
||||
gamma = 0.5;
|
||||
gammas = gamma .^ (0:p);
|
||||
W = freqz(ak .* gammas,1, 4000);
|
||||
WdB = 20*log10(abs(W));
|
||||
|
||||
beta = 0.2;
|
||||
R = abs(freqz(ak .* gammas, ak, 4000));
|
||||
%P = (R/max(R)) .^ beta;
|
||||
P = R .^ beta;
|
||||
AP = abs(A) .* P;
|
||||
|
||||
eA = sum(abs(A) .^ 2);
|
||||
eAP = sum(AP .^ 2);
|
||||
gain = sqrt(eA/eAP)
|
||||
AP *= gain;
|
||||
|
||||
PdB = 20*log10(P);
|
||||
|
||||
APdB = 20*log10(AP);
|
||||
10*log10(sum(AP .^ 2))/10*log10(sum(abs(A) .^ 2))
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
plot(AdB);
|
||||
hold on;
|
||||
plot(WdB,'g');
|
||||
plot(PdB,'r');
|
||||
plot(APdB,'b.');
|
||||
hold off;
|
||||
|
||||
endfunction
|
||||
|
@ -7,14 +7,19 @@ function lsp_pdf(lsp)
|
||||
|
||||
% LSPs
|
||||
|
||||
figure(3);
|
||||
figure(1);
|
||||
clf;
|
||||
[x,y] = hist(lsp(:,1),100);
|
||||
plot(y*4000/pi,x,";1;");
|
||||
plot(y*4000/pi,x,"+;1;");
|
||||
hold on;
|
||||
for i=2:c
|
||||
for i=2:5
|
||||
[x,y] = hist(lsp(:,i),100);
|
||||
legend = sprintf(";%d;",i);
|
||||
legend = sprintf("+%d;%d;",i,i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
endfor
|
||||
for i=6:c
|
||||
[x,y] = hist(lsp(:,i),100);
|
||||
legend = sprintf("+%d;%d;",i-5,i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
endfor
|
||||
hold off;
|
||||
@ -22,29 +27,65 @@ function lsp_pdf(lsp)
|
||||
|
||||
% LSP differences
|
||||
|
||||
figure(4);
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211)
|
||||
[x,y] = hist(lsp(:,1),100);
|
||||
plot(y,x,";1;");
|
||||
plot(y*4000/pi,x,"1;1;");
|
||||
hold on;
|
||||
for i=2:5
|
||||
[x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
|
||||
legend = sprintf(";%d;",i);
|
||||
plot(y,x,legend);
|
||||
legend = sprintf("%d;%d;",i,i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
|
||||
subplot(212)
|
||||
[x,y] = hist(lsp(:,6)-lsp(:,5),100);
|
||||
plot(y,x,";6;");
|
||||
plot(y*4000/pi,x,"1;6;");
|
||||
hold on;
|
||||
for i=7:c
|
||||
[x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
|
||||
legend = sprintf(";%d;",i);
|
||||
plot(y,x,legend);
|
||||
legend = sprintf("%d;%d;",i-5,i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
|
||||
% LSP differences delta from last frame
|
||||
|
||||
lspd(:,1) = lsp(:,1);
|
||||
lspd(:,2:10) = lsp(:,2:10) - lsp(:,1:9);
|
||||
|
||||
[m,n] = size(lspd);
|
||||
lspdd = lspd(5:m,:) - lspd(1:m-4,:);
|
||||
|
||||
figure(3);
|
||||
clf;
|
||||
subplot(211)
|
||||
for i=1:5
|
||||
[x,y] = hist(lspdd(:,i),100);
|
||||
legend = sprintf("%d;%d;",i,i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
hold on;
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
axis([-200 200 0 35000]);
|
||||
|
||||
subplot(212)
|
||||
for i=6:10
|
||||
[x,y] = hist(lspdd(:,i),100);
|
||||
legend = sprintf("%d;%d;",i-5,i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
hold on;
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
axis([-200 200 0 16000]);
|
||||
|
||||
figure(4);
|
||||
clf;
|
||||
plot((4000/pi)*(lsp(2:r,3)-lsp(1:r-1,3)))
|
||||
endfunction
|
||||
|
40
libs/libcodec2/octave/lspwarp.m
Normal file
40
libs/libcodec2/octave/lspwarp.m
Normal file
@ -0,0 +1,40 @@
|
||||
% lspwarp.m
|
||||
% David Rowe Sep 2012
|
||||
%
|
||||
% Experimenting with non-linear LSP frequency axis for LSP quantisation
|
||||
% Plots a scaled mel axis.
|
||||
|
||||
1;
|
||||
|
||||
function mel = freq2mel(f)
|
||||
mel = 70*log10(1 + f/700);
|
||||
endfunction
|
||||
|
||||
function freq = mel2freq(m)
|
||||
freq = 700*(10 ^ (m/70) - 1);
|
||||
endfunction
|
||||
|
||||
x = []; y = [];
|
||||
|
||||
for freq = 100:25:4000
|
||||
mel = freq2mel(freq);
|
||||
x = [x freq];
|
||||
y = [y mel];
|
||||
end
|
||||
|
||||
plot(x,y)
|
||||
grid
|
||||
|
||||
mel_start = floor(freq2mel(100));
|
||||
mel_end = floor(freq2mel(4000));
|
||||
|
||||
x = []; y = [];
|
||||
for mel=mel_start:mel_end
|
||||
freq = mel2freq(mel);
|
||||
x = [x freq];
|
||||
y = [y mel];
|
||||
end
|
||||
|
||||
hold on;
|
||||
plot(x,y, '+')
|
||||
hold off;
|
@ -6,8 +6,8 @@
|
||||
function phase2(samname, png)
|
||||
N = 16000;
|
||||
|
||||
f=45;
|
||||
model = load("../src/hts1a_model.txt");
|
||||
f=43;
|
||||
model = load("../src/hts1a_phase_model.txt");
|
||||
phase = load("../src/hts1a_phase_phase.txt");
|
||||
Wo = model(f,1);
|
||||
P=2*pi/Wo;
|
||||
@ -15,13 +15,13 @@ function phase2(samname, png)
|
||||
A = model(f,3:(L+2));
|
||||
phi = phase(f,1:L);
|
||||
phi = zeros(1,L);
|
||||
for m=L/2:L
|
||||
phi(m) = 2*pi*rand(1,1);
|
||||
end
|
||||
phi(3) = -pi/2;
|
||||
phi(4) = -pi/4;
|
||||
phi(5) = pi/2;
|
||||
|
||||
s = zeros(1,N);
|
||||
|
||||
for m=1:L
|
||||
for m=3:5
|
||||
s_m = A(m)*cos(m*Wo*(0:(N-1)) + phi(m));
|
||||
s = s + s_m;
|
||||
endfor
|
||||
@ -30,6 +30,13 @@ function phase2(samname, png)
|
||||
clf;
|
||||
plot(s(1:250));
|
||||
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211)
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(A),'+');
|
||||
subplot(212)
|
||||
plot((1:L)*Wo*4000/pi, phi,'+');
|
||||
|
||||
fs=fopen(samname,"wb");
|
||||
fwrite(fs,s,"short");
|
||||
fclose(fs);
|
||||
|
47
libs/libcodec2/octave/phasesecord.m
Normal file
47
libs/libcodec2/octave/phasesecord.m
Normal file
@ -0,0 +1,47 @@
|
||||
% phasesecord.m
|
||||
% David Rowe Aug 2012
|
||||
% Used to experiment with aproximations of phase of 2nd order systems
|
||||
|
||||
function phasesecord(w,beta)
|
||||
|
||||
a = [1 -2*cos(w)*beta beta*beta];
|
||||
b = 1;
|
||||
|
||||
[h w1] = freqz(b,a);
|
||||
|
||||
figure(1)
|
||||
subplot(211)
|
||||
plot(abs(h))
|
||||
subplot(212)
|
||||
plot(angle(h))
|
||||
|
||||
% for beta close to 1, we approximate 3 dB points as 1-beta above
|
||||
% and below the resonance freq. Note this fails if w=0 as there is a
|
||||
% double pole. Lets sample the freq response at the 3dB points and
|
||||
% w:
|
||||
|
||||
ws = [w-(1-beta) w w+(1-beta)];
|
||||
[h w1] = freqz(b,a,ws);
|
||||
|
||||
% gain as a fraction of max, should be 3dB. Within 1.3 dB or for w > pi/8,
|
||||
% gets innacurate near w=0 due to 2nd pole
|
||||
|
||||
printf("mag measured...:"); printf("% 4.3f ", abs(h)/max(abs(h)));
|
||||
|
||||
% measured angle, 45 deg from angle at w
|
||||
|
||||
printf("\nangle measured.: "); printf("% 5.3f ", angle(h));
|
||||
|
||||
% Our estimate of angle, (pi+w) is phase at resonance, at lower 3dB
|
||||
% phase is pi/4 ahead, at upper 3B pi/4 behind. -pi/2 is contribution of
|
||||
% other pole at at -w to phase
|
||||
|
||||
ph_lower = (pi+w) + pi/4 - pi/2;
|
||||
ph_res =(pi+w) - pi/2;
|
||||
ph_upper = (pi+w) - pi/4 - pi/2;
|
||||
ph_ests = [ph_lower ph_res ph_upper];
|
||||
ph_ests = ph_ests - 2*pi*(floor(ph_ests/(2*pi)) + 0.5);
|
||||
printf("\nangle estimated:"); printf("% 5.3f ", ph_ests);
|
||||
printf("\n");
|
||||
endfunction
|
||||
|
@ -1,6 +1,9 @@
|
||||
% Copyright David Rowe 2009
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% Plots a raw speech sample file, you can optionally specify the start and end
|
||||
% samples and create a large and small PNGs
|
||||
|
||||
function pl(samname1, start_sam, end_sam, pngname)
|
||||
|
||||
@ -19,7 +22,7 @@ function pl(samname1, start_sam, end_sam, pngname)
|
||||
figure(1);
|
||||
clf;
|
||||
plot(s(st:en));
|
||||
axis([1 en-st min(s) max(s)]);
|
||||
axis([1 en-st 1.1*min(s) 1.1*max(s)]);
|
||||
|
||||
if (nargin == 4)
|
||||
|
||||
|
@ -4,8 +4,16 @@
|
||||
%
|
||||
% Plot ampltiude modelling information from dump files.
|
||||
|
||||
function plamp(samname, f)
|
||||
function plamp(samname, f, samname2)
|
||||
|
||||
% switch some stuff off to unclutter display
|
||||
|
||||
plot_lsp = 0;
|
||||
plot_snr = 0;
|
||||
plot_vsnr = 0;
|
||||
plot_sw = 0;
|
||||
plot_pw = 0;
|
||||
|
||||
sn_name = strcat(samname,"_sn.txt");
|
||||
Sn = load(sn_name);
|
||||
|
||||
@ -17,6 +25,16 @@ function plamp(samname, f)
|
||||
Sw_ = load(sw__name);
|
||||
endif
|
||||
|
||||
ew_name = strcat(samname,"_ew.txt");
|
||||
if (file_in_path(".",ew_name))
|
||||
Ew = load(ew_name);
|
||||
endif
|
||||
|
||||
rk_name = strcat(samname,"_rk.txt");
|
||||
if (file_in_path(".",rk_name))
|
||||
Rk = load(rk_name);
|
||||
endif
|
||||
|
||||
model_name = strcat(samname,"_model.txt");
|
||||
model = load(model_name);
|
||||
|
||||
@ -50,12 +68,24 @@ function plamp(samname, f)
|
||||
snr = load(snr_name);
|
||||
endif
|
||||
|
||||
% optional second file, for exploring post filter
|
||||
|
||||
model2q_name = " ";
|
||||
if nargin == 3
|
||||
model2q_name = strcat(samname2,"_qmodel.txt");
|
||||
if file_in_path(".",modelq_name)
|
||||
model2q = load(model2q_name);
|
||||
end
|
||||
end
|
||||
|
||||
Ew_on = 1;
|
||||
k = ' ';
|
||||
do
|
||||
figure(1);
|
||||
clf;
|
||||
% s = [ Sn(2*(f-2)-1,:) Sn(2*(f-2),:) ];
|
||||
s = [ Sn(2*f-1,:) Sn(2*f,:) ];
|
||||
size(s);
|
||||
plot(s);
|
||||
axis([1 length(s) -20000 20000]);
|
||||
|
||||
@ -66,13 +96,14 @@ function plamp(samname, f)
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Am),";Am;r");
|
||||
axis([1 4000 -10 80]);
|
||||
hold on;
|
||||
% plot((0:255)*4000/256, Sw(f-2,:),";Sw;");
|
||||
plot((0:255)*4000/256, Sw(f,:),";Sw;");
|
||||
|
||||
if plot_sw
|
||||
plot((0:255)*4000/256, Sw(f,:),";Sw;");
|
||||
end
|
||||
|
||||
if (file_in_path(".",modelq_name))
|
||||
Amq = modelq(f,3:(L+2));
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Amq),";Amq;g" );
|
||||
if (file_in_path(".",pw_name))
|
||||
if (file_in_path(".",pw_name) && plot_pw)
|
||||
plot((0:255)*4000/256, 10*log10(Pw(f,:)),";Pw;c");
|
||||
endif
|
||||
signal = Am * Am';
|
||||
@ -82,8 +113,13 @@ function plamp(samname, f)
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Amq) - 20*log10(Am), Am_err_label);
|
||||
endif
|
||||
|
||||
if (file_in_path(".",snr_name))
|
||||
snr_label = sprintf(";phase SNR %4.2f dB;",snr(f));
|
||||
if file_in_path(".",model2q_name)
|
||||
Amq2 = model2q(f,3:(L+2));
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Amq2),";Amq2;m" );
|
||||
end
|
||||
|
||||
if (file_in_path(".",snr_name) && plot_vsnr)
|
||||
snr_label = sprintf(";Voicing SNR %4.2f dB;",snr(f));
|
||||
plot(1,1,snr_label);
|
||||
endif
|
||||
|
||||
@ -96,11 +132,11 @@ function plamp(samname, f)
|
||||
noise = (orig-synth) * (orig-synth)';
|
||||
snr_phase = 10*log10(signal/noise);
|
||||
|
||||
phase_err_label = sprintf(";phase_err SNR %4.2f dB;",snr_phase);
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(orig-synth), phase_err_label);
|
||||
%phase_err_label = sprintf(";phase_err SNR %4.2f dB;",snr_phase);
|
||||
%plot((1:L)*Wo*4000/pi, 20*log10(orig-synth), phase_err_label);
|
||||
endif
|
||||
|
||||
if (file_in_path(".",lsp_name))
|
||||
if (file_in_path(".",lsp_name) && plot_lsp)
|
||||
for l=1:10
|
||||
plot([lsp(f,l)*4000/pi lsp(f,l)*4000/pi], [60 80], 'r');
|
||||
endfor
|
||||
@ -108,33 +144,21 @@ function plamp(samname, f)
|
||||
|
||||
hold off;
|
||||
|
||||
if (file_in_path(".",phase_name))
|
||||
figure(3);
|
||||
plot((1:L)*Wo*4000/pi, phase(f,1:L), ";phase;");
|
||||
axis;
|
||||
if (file_in_path(".",phase_name_))
|
||||
hold on;
|
||||
plot((1:L)*Wo*4000/pi, phase_(f,1:L), ";phase_;");
|
||||
hold off;
|
||||
endif
|
||||
figure(2);
|
||||
endif
|
||||
|
||||
% autocorrelation function to research voicing est
|
||||
|
||||
%M = length(s);
|
||||
%sw = s .* hanning(M)';
|
||||
%for k=0:159
|
||||
% R(k+1) = sw(1:320-k) * sw(1+k:320)';
|
||||
%endfor
|
||||
%figure(4);
|
||||
%R_label = sprintf(";R(k) %3.2f;",max(R(20:159))/R(1));
|
||||
%plot(R/R(1),R_label);
|
||||
%grid
|
||||
%if (file_in_path(".",phase_name))
|
||||
%figure(3);
|
||||
%plot((1:L)*Wo*4000/pi, phase(f,1:L), ";phase;");
|
||||
%axis;
|
||||
%if (file_in_path(".",phase_name_))
|
||||
%hold on;
|
||||
%plot((1:L)*Wo*4000/pi, phase_(f,1:L), ";phase_;");
|
||||
%hold off;
|
||||
%endif
|
||||
%figure(2);
|
||||
%endif
|
||||
|
||||
% interactive menu
|
||||
|
||||
printf("\rframe: %d menu: n-next b-back p-png q-quit ", f);
|
||||
printf("\rframe: %d menu: n-next b-back p-png q-quit e-toggle Ew", f);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
if (k == 'n')
|
||||
@ -143,6 +167,13 @@ function plamp(samname, f)
|
||||
if (k == 'b')
|
||||
f = f - 1;
|
||||
endif
|
||||
if (k == 'e')
|
||||
if (Ew_on == 1)
|
||||
Ew_on = 0;
|
||||
else
|
||||
Ew_on = 1;
|
||||
endif
|
||||
endif
|
||||
|
||||
% optional print to PNG
|
||||
|
||||
@ -157,7 +188,7 @@ function plamp(samname, f)
|
||||
pngname = sprintf("%s_%d_sw.png",samname,f);
|
||||
print(pngname, '-dpng', "-S500,500")
|
||||
pngname = sprintf("%s_%d_sw_large.png",samname,f);
|
||||
print(pngname, '-dpng', "-S800,600")
|
||||
print(pngname, '-dpng', "-S1200,800")
|
||||
endif
|
||||
|
||||
until (k == 'q')
|
||||
|
150
libs/libcodec2/octave/pllpcpf.m
Normal file
150
libs/libcodec2/octave/pllpcpf.m
Normal file
@ -0,0 +1,150 @@
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% Plot amplitude modelling information from dump files to test and develop
|
||||
% LPC post filter.
|
||||
|
||||
function pllpcpf(samname, f)
|
||||
|
||||
% switch some stuff off to unclutter display
|
||||
|
||||
plot_Am = 0;
|
||||
plot_Amq = 0;
|
||||
plot_err = 0;
|
||||
plot_lsp = 0;
|
||||
plot_snr = 0;
|
||||
plot_vsnr = 0;
|
||||
plot_sw = 0;
|
||||
plot_pw = 1;
|
||||
plot_pwb = 1;
|
||||
plot_rw = 1;
|
||||
|
||||
sn_name = strcat(samname,"_sn.txt");
|
||||
Sn = load(sn_name);
|
||||
|
||||
sw_name = strcat(samname,"_sw.txt");
|
||||
Sw = load(sw_name);
|
||||
|
||||
sw__name = strcat(samname,"_sw_.txt");
|
||||
if (file_in_path(".",sw__name))
|
||||
Sw_ = load(sw__name);
|
||||
endif
|
||||
|
||||
model_name = strcat(samname,"_model.txt");
|
||||
model = load(model_name);
|
||||
|
||||
modelq_name = strcat(samname,"_qmodel.txt");
|
||||
if (file_in_path(".",modelq_name))
|
||||
modelq = load(modelq_name);
|
||||
endif
|
||||
|
||||
% Pw (LPC synth filter spectrum) before post filter
|
||||
|
||||
pwb_name = strcat(samname,"_pwb.txt");
|
||||
if (file_in_path(".",pwb_name))
|
||||
Pwb = load(pwb_name);
|
||||
endif
|
||||
|
||||
% Rw (Post filter spectrum)
|
||||
|
||||
rw_name = strcat(samname,"_rw.txt");
|
||||
if (file_in_path(".",rw_name))
|
||||
Rw = load(rw_name);
|
||||
endif
|
||||
|
||||
% Pw (LPC synth filter spectrum) after post filter
|
||||
|
||||
pw_name = strcat(samname,"_pw.txt");
|
||||
if (file_in_path(".",pw_name))
|
||||
Pw = load(pw_name);
|
||||
endif
|
||||
|
||||
|
||||
Ew_on = 1;
|
||||
k = ' ';
|
||||
do
|
||||
figure(1);
|
||||
clf;
|
||||
s = [ Sn(2*f-1,:) Sn(2*f,:) ];
|
||||
size(s);
|
||||
plot(s);
|
||||
axis([1 length(s) -20000 20000]);
|
||||
|
||||
figure(2);
|
||||
clf;
|
||||
Wo = model(f,1);
|
||||
L = model(f,2);
|
||||
Am = model(f,3:(L+2));
|
||||
if plot_Am
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Am),";Am;r");
|
||||
end
|
||||
axis([1 4000 -10 80]);
|
||||
hold on;
|
||||
if plot_sw
|
||||
plot((0:255)*4000/256, Sw(f,:),";Sw;");
|
||||
end
|
||||
|
||||
if (file_in_path(".",modelq_name))
|
||||
|
||||
Amq = modelq(f,3:(L+2));
|
||||
if plot_Amq
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Amq),";Amq;g" );
|
||||
end
|
||||
|
||||
if (file_in_path(".",pwb_name) && plot_pwb)
|
||||
plot((0:255)*4000/256, 10*log10(Pwb(f,:)),";Pwb;r");
|
||||
endif
|
||||
|
||||
if (file_in_path(".",rw_name) && plot_rw)
|
||||
plot((0:255)*4000/256, 10*log10(Rw(f,:)),";Rw;b");
|
||||
endif
|
||||
|
||||
if (file_in_path(".",pw_name) && plot_pw)
|
||||
plot((0:255)*4000/256, 10*log10(Pw(f,:)),";Pw;g.");
|
||||
endif
|
||||
|
||||
signal = Am * Am';
|
||||
noise = (Am-Amq) * (Am-Amq)';
|
||||
snr1 = 10*log10(signal/noise);
|
||||
Am_err_label = sprintf(";Am error SNR %4.2f dB;m",snr1);
|
||||
if plot_err
|
||||
plot((1:L)*Wo*4000/pi, 20*log10(Amq) - 20*log10(Am), Am_err_label);
|
||||
end
|
||||
endif
|
||||
|
||||
|
||||
hold off;
|
||||
|
||||
% interactive menu
|
||||
|
||||
printf("\rframe: %d menu: n-next b-back p-png q-quit", f);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
if (k == 'n')
|
||||
f = f + 1;
|
||||
endif
|
||||
if (k == 'b')
|
||||
f = f - 1;
|
||||
endif
|
||||
|
||||
% optional print to PNG
|
||||
|
||||
if (k == 'p')
|
||||
figure(1);
|
||||
pngname = sprintf("%s_%d_sn.png",samname,f);
|
||||
print(pngname, '-dpng', "-S500,500")
|
||||
pngname = sprintf("%s_%d_sn_large.png",samname,f);
|
||||
print(pngname, '-dpng', "-S800,600")
|
||||
|
||||
figure(2);
|
||||
pngname = sprintf("%s_%d_sw.png",samname,f);
|
||||
print(pngname, '-dpng', "-S500,500")
|
||||
pngname = sprintf("%s_%d_sw_large.png",samname,f);
|
||||
print(pngname, '-dpng', "-S1200,800")
|
||||
endif
|
||||
|
||||
until (k == 'q')
|
||||
printf("\n");
|
||||
|
||||
endfunction
|
46
libs/libcodec2/octave/pllsp.m
Normal file
46
libs/libcodec2/octave/pllsp.m
Normal file
@ -0,0 +1,46 @@
|
||||
% Copyright David Rowe 2010
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% Plots a bunch of information related to LSP quantisation:
|
||||
% - speech file
|
||||
% - LSPs before and after quantisation
|
||||
% - SNR for each frame
|
||||
%
|
||||
% Note: there is a 160 sample (two frame delay) from the when a sample
|
||||
% enters the input buffer until it is at the centre of the analysis window
|
||||
|
||||
function pllsp(rawfile,
|
||||
dumpfile_prefix_lpc_only,
|
||||
dumpfile_prefix_lsp,
|
||||
start_f, end_f)
|
||||
|
||||
fs=fopen(rawfile,"rb");
|
||||
s=fread(fs,Inf,"short");
|
||||
|
||||
lpc_snr_name = strcat(dumpfile_prefix_lpc_only,"_lpc_snr.txt");
|
||||
lpc10_snr = load(lpc_snr_name);
|
||||
lpc_snr_name = strcat(dumpfile_prefix_lsp,"_lpc_snr.txt");
|
||||
lsp_snr = load(lpc_snr_name);
|
||||
|
||||
lsp_name = strcat(dumpfile_prefix_lsp,"_lsp.txt");
|
||||
lsps = load(lsp_name);
|
||||
[m,n]=size(lsps);
|
||||
lsp = lsps(1:2:m,:);
|
||||
lsp_ = lsps(2:2:m,:);
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
subplot(211);
|
||||
sp = s((start_f-2)*80:(end_f-2)*80);
|
||||
plot(sp);
|
||||
|
||||
subplot(212);
|
||||
plot(lpc10_snr((start_f+1):end_f)-lsp_snr((start_f+1):end_f));
|
||||
|
||||
figure(2);
|
||||
plot((4000/pi)*lsp((start_f+1):end_f,:));
|
||||
hold on;
|
||||
plot((4000/pi)*lsp_((start_f+1):end_f,:),'+-');
|
||||
hold off;
|
||||
endfunction
|
27
libs/libcodec2/octave/pllspdt.m
Normal file
27
libs/libcodec2/octave/pllspdt.m
Normal file
@ -0,0 +1,27 @@
|
||||
% pllspdt.m
|
||||
% Copyright David Rowe 2010
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% Test script to plot differences in LSps between frames
|
||||
|
||||
function pllspdt(rawfile,dumpfile_prefix_lsp,lspn, start_f, end_f)
|
||||
|
||||
fs=fopen(rawfile,"rb");
|
||||
s=fread(fs,Inf,"short");
|
||||
|
||||
lsp_name = strcat(dumpfile_prefix_lsp,"_lsp.txt");
|
||||
lsps = load(lsp_name);
|
||||
[m,n]=size(lsps);
|
||||
lsp = lsps(1:2:m,:);
|
||||
lsp_ = lsps(2:2:m,:);
|
||||
lspdt = lsp(2:m/2,:) - lsp(1:m/2-1,:);
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
sp = s((start_f-2)*80:(end_f-2)*80);
|
||||
plot(sp);
|
||||
|
||||
figure(2);
|
||||
plot((4000/pi)*lspdt((start_f+1):end_f,lspn));
|
||||
endfunction
|
@ -112,7 +112,7 @@ function plphase(samname, f)
|
||||
axis;
|
||||
if (file_in_path(".", phase_name_))
|
||||
hold on;
|
||||
plot((1:L)*Wo*4000/pi, phase_(f,1:L)*180/pi, "g;phase_;");
|
||||
plot((1:L)*Wo*4000/pi, phase_(f,1:L)*180/pi, "g;phase after;");
|
||||
grid
|
||||
hold off;
|
||||
endif
|
||||
|
65
libs/libcodec2/octave/plppe.m
Normal file
65
libs/libcodec2/octave/plppe.m
Normal file
@ -0,0 +1,65 @@
|
||||
% Copyright David Rowe 2009
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% Plot two sparse phase prediction error text files.
|
||||
% Generate data from print_pred_error, print_pred_error_sparse_wo_correction1 etc
|
||||
|
||||
function plppe(ppe1_file, ppe2_file, f)
|
||||
|
||||
ppe1 = load(ppe1_file);
|
||||
ppe2 = load(ppe2_file);
|
||||
|
||||
std1 = std(nonzeros(ppe1(:,40:80)));
|
||||
std2 = std(nonzeros(ppe2(:,40:80)));
|
||||
|
||||
printf("std dev for %s is %4.3f\n", ppe1_file, std1);
|
||||
printf("std dev for %s is %4.3f\n", ppe2_file, std2);
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
subplot(211)
|
||||
hist(nonzeros(ppe1(:,40:80)),20);
|
||||
subplot(212)
|
||||
hist(nonzeros(ppe2(:,40:80)),20);
|
||||
|
||||
k = ' ';
|
||||
do
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211)
|
||||
L = length(nonzeros(ppe1(f,:)));
|
||||
x = (1:L)*4000/L;
|
||||
std1 = std(nonzeros(ppe1(f,:)));
|
||||
legend = sprintf(";std dev %4.3f;", std1);
|
||||
plot(x, nonzeros(ppe1(f,:)),legend);
|
||||
axis([0 4000 -pi pi]);
|
||||
subplot(212)
|
||||
std2 = std(nonzeros(ppe2(f,:)));
|
||||
legend = sprintf(";std dev %4.3f;", std2);
|
||||
plot(x, nonzeros(ppe2(f,:)),legend);
|
||||
axis([0 4000 -pi pi]);
|
||||
|
||||
% interactive menu
|
||||
|
||||
printf("\rframe: %d menu: n-next b-back p-png q-quit ", f);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
if (k == 'n')
|
||||
f = f + 1;
|
||||
endif
|
||||
if (k == 'b')
|
||||
f = f - 1;
|
||||
endif
|
||||
|
||||
% optional print to PNG
|
||||
|
||||
if (k == 'p')
|
||||
pngname = sprintf("%s_%d",samname,f);
|
||||
png(pngname);
|
||||
endif
|
||||
|
||||
until (k == 'q')
|
||||
printf("\n");
|
||||
|
||||
endfunction
|
35
libs/libcodec2/octave/plsub.m
Normal file
35
libs/libcodec2/octave/plsub.m
Normal file
@ -0,0 +1,35 @@
|
||||
% Copyright David Rowe 2010
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
% plots the difference of two files
|
||||
|
||||
function plsub(samname1, samname2, start_sam, end_sam, pngname)
|
||||
|
||||
fs1=fopen(samname1,"rb");
|
||||
s1=fread(fs1,Inf,"short");
|
||||
fs2=fopen(samname2,"rb");
|
||||
s2=fread(fs2,Inf,"short");
|
||||
|
||||
st = 1;
|
||||
en = length(s1);
|
||||
if (nargin >= 3)
|
||||
st = start_sam;
|
||||
endif
|
||||
if (nargin >= 4)
|
||||
en = end_sam;
|
||||
endif
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
l1 = strcat("r;",samname1,";");
|
||||
plot(s1(st:en) - s2(st:en), l1);
|
||||
%axis([1 en-st min(s1(st:en)) max(s1(st:en))]);
|
||||
|
||||
if (nargin == 5)
|
||||
pngname = sprintf("%s.png",pngname);
|
||||
print(pngname, '-dpng', "-S500,500")
|
||||
pngname = sprintf("%s_large.png",pngname);
|
||||
print(pngname, '-dpng', "-S800,600")
|
||||
endif
|
||||
|
||||
endfunction
|
89
libs/libcodec2/octave/plvoicing.m
Normal file
89
libs/libcodec2/octave/plvoicing.m
Normal file
@ -0,0 +1,89 @@
|
||||
% Copyright David Rowe 2009
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
% Plot voicing information from sample and dump files.
|
||||
%
|
||||
% samfilename is the raw source file, e.g. "../raw/hts1a.raw"
|
||||
% samname is the dumpfile prefix, e.g. "../src/hts1a"
|
||||
%
|
||||
% There is a 160 sample (two frame delay) from the when a sample
|
||||
% enters the input buffer until it is at the centre of the analysis window
|
||||
|
||||
function plvoicing(samfilename, samname, start_f, end_f, pngname)
|
||||
|
||||
fs=fopen(samfilename,"rb");
|
||||
s=fread(fs,Inf,"short");
|
||||
|
||||
snr_name = strcat(samname,"_snr.txt");
|
||||
snr = load(snr_name);
|
||||
model_name = strcat(samname,"_model.txt");
|
||||
model = load(model_name);
|
||||
|
||||
Wo = model((start_f+1):end_f,1);
|
||||
F0 = Wo*4000/pi;
|
||||
dF0 = F0(1:length(Wo)-1) - F0(2:length(Wo));
|
||||
|
||||
% work out LP and HP energy
|
||||
|
||||
for f=(start_f+1):end_f
|
||||
L = model(f,2);
|
||||
Am = model(f,3:(L+2));
|
||||
L2 = floor(L/2);
|
||||
elow = Am(1:L2) * Am(1:L2)';
|
||||
ehigh = Am(L2:L) * Am(L2:L)';
|
||||
erat(f-(start_f+1)+1) = 10*log10(elow/ehigh);
|
||||
endfor
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
sp = s((start_f-2)*80:(end_f-2)*80);
|
||||
plot(sp);
|
||||
hold on;
|
||||
vhigh = snr((start_f+1):end_f) > 7;
|
||||
vlow = snr((start_f+1):end_f) > 4;
|
||||
|
||||
% test correction based on erat
|
||||
|
||||
vlowadj = vlow;
|
||||
|
||||
for f=1:length(erat)-1
|
||||
if (vlow(f) == 0)
|
||||
if (erat(f) > 10)
|
||||
vlowadj(f) = 1;
|
||||
endif
|
||||
endif
|
||||
if (vlow(f) == 1)
|
||||
if (erat(f) < -10)
|
||||
vlowadj(f) = 0;
|
||||
endif
|
||||
if (abs(dF0(f)) > 15)
|
||||
vlowadj(f) = 0;
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
x = 1:(end_f-start_f);
|
||||
plot(x*80,snr((start_f+1):end_f)*1000,';SNRdB x 1000;g+');
|
||||
plot(x*80,-8000 + vhigh*2000,';7dB thresh;g');
|
||||
plot(x*80,-11000 + vlowadj*2000,';vlow with corr;g');
|
||||
plot(x*80,erat*1000,';elow/ehigh in dB;r');
|
||||
plot(x*80,-14000 + vlow*2000,';4dB thresh;r');
|
||||
hold off;
|
||||
grid
|
||||
if (nargin == 5)
|
||||
print(pngname, "-dpng", "-S500,500")
|
||||
endif
|
||||
|
||||
figure(2)
|
||||
Wo = model((start_f+1):end_f,1);
|
||||
F0 = Wo*4000/pi;
|
||||
dF0 = F0(1:length(Wo)-1) - F0(2:length(Wo));
|
||||
%plot(dF0,'+--')
|
||||
%hold on;
|
||||
%plot([ 1 length(dF0) ], [10 10] ,'r')
|
||||
%plot([ 1 length(dF0) ], [-10 -10] ,'r')
|
||||
%axis([1 length(dF0) -50 50])
|
||||
%hold off;
|
||||
plot(F0,'+--')
|
||||
endfunction
|
101
libs/libcodec2/octave/sd.m
Normal file
101
libs/libcodec2/octave/sd.m
Normal file
@ -0,0 +1,101 @@
|
||||
% sd.m
|
||||
% David Rowe Aug 2012
|
||||
% Plots the spectal distorion between twofiles of LPCs. Used for LSP
|
||||
% quantisation tuning.
|
||||
|
||||
function sd(raw_filename, dump_file_prefix, f)
|
||||
|
||||
ak1_filename = sprintf("%s_ak.txt", dump_file_prefix);
|
||||
ak2_filename = sprintf("%s_ak_.txt", dump_file_prefix);
|
||||
ak1 = load(ak1_filename);
|
||||
ak2 = load(ak2_filename);
|
||||
|
||||
[ak1_r, ak1_c] = size(ak1);
|
||||
[ak2_r, ak2_c] = size(ak1);
|
||||
|
||||
frames = max([ak1_r ak2_r]);
|
||||
sd = zeros(1,frames);
|
||||
Ndft = 512;
|
||||
A1 = zeros(frames, Ndft);
|
||||
A2 = zeros(frames, Ndft);
|
||||
|
||||
% initial helicopter view of all frames
|
||||
|
||||
for i = 1:frames
|
||||
A1(i,:) = -20*log10(abs(fft(ak1(i,:),Ndft)));
|
||||
A2(i,:) = -20*log10(abs(fft(ak2(i,:),Ndft)));
|
||||
sd(i) = sum((A1(i,:) - A2(i,:)).^2)/Ndft;
|
||||
end
|
||||
printf("sd av %3.2f dB*dB\n", sum(sd)/frames);
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
subplot(211)
|
||||
fs=fopen(raw_filename,"rb");
|
||||
s = fread(fs,Inf,"short");
|
||||
plot(s);
|
||||
subplot(212)
|
||||
plot(sd);
|
||||
|
||||
% now enter single step mode so we can analyse each frame
|
||||
|
||||
sn_name = strcat(dump_file_prefix,"_sn.txt");
|
||||
Sn = load(sn_name);
|
||||
|
||||
lsp1_filename = sprintf("%s_lsp.txt", dump_file_prefix);
|
||||
lsp2_filename = sprintf("%s_lsp_.txt", dump_file_prefix);
|
||||
lsp1 = load(lsp1_filename);
|
||||
lsp2 = load(lsp2_filename);
|
||||
|
||||
weights_filename = sprintf("%s_weights.txt", dump_file_prefix);
|
||||
if file_in_path(".",weights_filename)
|
||||
weights = load(weights_filename);
|
||||
end
|
||||
|
||||
k = ' ';
|
||||
do
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211)
|
||||
s = [ Sn(2*f-1,:) Sn(2*f,:) ];
|
||||
size(s);
|
||||
plot(s);
|
||||
axis([1 length(s) -20000 20000]);
|
||||
|
||||
subplot(212);
|
||||
plot((1:Ndft/2)*4000/(Ndft/2), A1(f,1:(Ndft/2)),";A1;r");
|
||||
axis([1 4000 -20 40]);
|
||||
hold on;
|
||||
plot((1:Ndft/2)*4000/(Ndft/2), A2(f,1:(Ndft/2)),";A2;");
|
||||
if file_in_path(".",weights_filename)
|
||||
plot(lsp1(f,:)*4000/pi, weights(f,:),";weights;g+");
|
||||
end
|
||||
|
||||
for l=1:10
|
||||
plot([lsp1(f,l)*4000/pi lsp1(f,l)*4000/pi], [0 -10], 'r');
|
||||
plot([lsp2(f,l)*4000/pi lsp2(f,l)*4000/pi], [-10 -20], 'b');
|
||||
endfor
|
||||
plot(0,0,';lsp1;r');
|
||||
plot(0,0,';lsp2;b');
|
||||
sd_str = sprintf(";sd %3.2f dB*dB;", sd(f));
|
||||
plot(0,0,sd_str);
|
||||
|
||||
hold off;
|
||||
|
||||
% interactive menu
|
||||
|
||||
printf("\rframe: %d menu: n-next b-back q-quit", f);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
if (k == 'n')
|
||||
f = f + 1;
|
||||
endif
|
||||
if (k == 'b')
|
||||
f = f - 1;
|
||||
endif
|
||||
|
||||
until (k == 'q')
|
||||
printf("\n");
|
||||
|
||||
endfunction
|
||||
|
86
libs/libcodec2/octave/spec.m
Normal file
86
libs/libcodec2/octave/spec.m
Normal file
@ -0,0 +1,86 @@
|
||||
% spec.m
|
||||
% Jean Marc Valin
|
||||
%
|
||||
% Spectrogram function for Octave
|
||||
%
|
||||
% Copyright (c) John-Marc Valin 2012
|
||||
%
|
||||
% Redistribution and use in source and binary forms, with or without
|
||||
% modification, are permitted provided that the following conditions
|
||||
% are met:
|
||||
%
|
||||
% - Redistributions of source code must retain the above copyright
|
||||
% notice, this list of conditions and the following disclaimer.
|
||||
%
|
||||
% - Redistributions in binary form must reproduce the above copyright
|
||||
% notice, this list of conditions and the following disclaimer in the
|
||||
% documentation and/or other materials provided with the distribution.
|
||||
%
|
||||
% - Neither the name of Jean Marc Valin nor the names of its
|
||||
% contributors may be used to endorse or promote products derived from
|
||||
% this software without specific prior written permission.
|
||||
%
|
||||
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
% ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
% A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
% CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
% EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
% PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
% LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
% NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
% SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
function X = spec(x, Fs, framesize, start, stop)
|
||||
|
||||
|
||||
gr=[zeros(1024,1),[0:1023]'/1023,.68*[0:1023]'/1023];
|
||||
|
||||
%gr=[.4*[0:1023]'/1023,[0:1023]'/1023,.68*[0:1023]'/1023];
|
||||
|
||||
%t=[0:1023]'/1023;
|
||||
%t=(1+.25*t-cos(pi*t))/2.25;
|
||||
%gr = [zeros(1024,1),t,.68*t];
|
||||
|
||||
|
||||
%colormap(gr);
|
||||
|
||||
if nargin < 2 || isempty(Fs)
|
||||
Fs = 44100;
|
||||
end
|
||||
|
||||
if nargin < 3 || isempty(framesize)
|
||||
framesize = 2048;
|
||||
endif
|
||||
|
||||
offset = framesize/4;
|
||||
|
||||
X = 20*log10(abs(specgram(x, framesize, 48000, blackmanharris(framesize)', framesize-offset)));
|
||||
|
||||
XM=max(max(X));
|
||||
X = max(XM-120,X);
|
||||
%size(X)
|
||||
F = -[framesize/2-1:-1:0]/framesize*Fs;
|
||||
%F = [0:127]/128*24000;
|
||||
T=[1:size(X,2)]/Fs*offset;
|
||||
%imagesc(X(end:-1:1,:));
|
||||
|
||||
if nargin < 4 || isempty(start)
|
||||
istart=1;
|
||||
else
|
||||
istart = round(start*Fs/offset);
|
||||
end
|
||||
|
||||
if nargin < 5 || isempty(stop)
|
||||
istop = size(X,2);
|
||||
else
|
||||
istop = round(stop*Fs/offset);
|
||||
endif
|
||||
|
||||
istart = max(1,istart);
|
||||
istop = min(istop, size(X,2));
|
||||
|
||||
imagesc(T(1+istart:istop), F, X(end:-1:1,1+istart:istop));
|
||||
|
||||
X = X(:,1+istart:istop);
|
306
libs/libcodec2/octave/tfdmdv.m
Normal file
306
libs/libcodec2/octave/tfdmdv.m
Normal file
@ -0,0 +1,306 @@
|
||||
% tfdmdv.m
|
||||
%
|
||||
% Octave script that tests the C port of the FDMDV modem. This script loads
|
||||
% the output of unittest/tfdmdv.c and compares it to the output of the
|
||||
% reference versions of the same functions written in Octave.
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
fdmdv; % load modem code
|
||||
|
||||
% Generate reference vectors using Octave implementation of FDMDV modem
|
||||
|
||||
global passes;
|
||||
global fails;
|
||||
passes = fails = 0;
|
||||
frames = 25;
|
||||
prev_tx_symbols = ones(Nc+1,1);
|
||||
prev_rx_symbols = ones(Nc+1,1);
|
||||
foff_phase_rect = 1;
|
||||
coarse_fine = 0;
|
||||
fest_state = 0;
|
||||
channel = [];
|
||||
channel_count = 0;
|
||||
next_nin = M;
|
||||
sig_est = zeros(Nc+1,1);
|
||||
noise_est = zeros(Nc+1,1);
|
||||
|
||||
% Octave outputs we want to collect for comparison to C version
|
||||
|
||||
tx_bits_log = [];
|
||||
tx_symbols_log = [];
|
||||
tx_baseband_log = [];
|
||||
tx_fdm_log = [];
|
||||
pilot_baseband1_log = [];
|
||||
pilot_baseband2_log = [];
|
||||
pilot_lpf1_log = [];
|
||||
pilot_lpf2_log = [];
|
||||
S1_log = [];
|
||||
S2_log = [];
|
||||
foff_coarse_log = [];
|
||||
foff_fine_log = [];
|
||||
foff_log = [];
|
||||
rx_baseband_log = [];
|
||||
rx_filt_log = [];
|
||||
env_log = [];
|
||||
rx_timing_log = [];
|
||||
rx_symbols_log = [];
|
||||
rx_bits_log = [];
|
||||
sync_bit_log = [];
|
||||
coarse_fine_log = [];
|
||||
nin_log = [];
|
||||
sig_est_log = [];
|
||||
noise_est_log = [];
|
||||
|
||||
for f=1:frames
|
||||
|
||||
% modulator
|
||||
|
||||
tx_bits = get_test_bits(Nc*Nb);
|
||||
tx_bits_log = [tx_bits_log tx_bits];
|
||||
tx_symbols = bits_to_qpsk(prev_tx_symbols, tx_bits, 'dqpsk');
|
||||
prev_tx_symbols = tx_symbols;
|
||||
tx_symbols_log = [tx_symbols_log tx_symbols];
|
||||
tx_baseband = tx_filter(tx_symbols);
|
||||
tx_baseband_log = [tx_baseband_log tx_baseband];
|
||||
tx_fdm = fdm_upconvert(tx_baseband);
|
||||
tx_fdm_log = [tx_fdm_log tx_fdm];
|
||||
|
||||
% channel
|
||||
|
||||
nin = next_nin;
|
||||
%nin = 120;
|
||||
%nin = M;
|
||||
%if (f == 3)
|
||||
% nin = 120;
|
||||
%elseif (f == 4)
|
||||
% nin = 200;
|
||||
%else
|
||||
% nin = M;
|
||||
%end
|
||||
channel = [channel real(tx_fdm)];
|
||||
channel_count += M;
|
||||
rx_fdm = channel(1:nin);
|
||||
channel = channel(nin+1:channel_count);
|
||||
channel_count -= nin;
|
||||
|
||||
% demodulator
|
||||
|
||||
[pilot prev_pilot pilot_lut_index prev_pilot_lut_index] = get_pilot(pilot_lut_index, prev_pilot_lut_index, nin);
|
||||
|
||||
[foff_coarse S1 S2] = rx_est_freq_offset(rx_fdm, pilot, prev_pilot, nin);
|
||||
if coarse_fine == 0
|
||||
foff = foff_coarse;
|
||||
end
|
||||
foff_coarse_log = [foff_coarse_log foff_coarse];
|
||||
|
||||
pilot_baseband1_log = [pilot_baseband1_log pilot_baseband1];
|
||||
pilot_baseband2_log = [pilot_baseband2_log pilot_baseband2];
|
||||
pilot_lpf1_log = [pilot_lpf1_log pilot_lpf1];
|
||||
pilot_lpf2_log = [pilot_lpf2_log pilot_lpf2];
|
||||
S1_log = [S1_log S1];
|
||||
S2_log = [S2_log S2];
|
||||
|
||||
foff_rect = exp(j*2*pi*foff/Fs);
|
||||
|
||||
for i=1:nin
|
||||
foff_phase_rect *= foff_rect';
|
||||
rx_fdm_fcorr(i) = rx_fdm(i)*foff_phase_rect;
|
||||
end
|
||||
|
||||
rx_baseband = fdm_downconvert(rx_fdm_fcorr, nin);
|
||||
rx_baseband_log = [rx_baseband_log rx_baseband];
|
||||
|
||||
rx_filt = rx_filter(rx_baseband, nin);
|
||||
rx_filt_log = [rx_filt_log rx_filt];
|
||||
|
||||
[rx_symbols rx_timing env] = rx_est_timing(rx_filt, rx_baseband, nin);
|
||||
env_log = [env_log env];
|
||||
|
||||
rx_timing_log = [rx_timing_log rx_timing];
|
||||
rx_symbols_log = [rx_symbols_log rx_symbols];
|
||||
|
||||
next_nin = M;
|
||||
if rx_timing > 2*M/P
|
||||
next_nin += M/P;
|
||||
end
|
||||
if rx_timing < 0;
|
||||
next_nin -= M/P;
|
||||
end
|
||||
nin_log = [nin_log nin];
|
||||
|
||||
[rx_bits sync_bit foff_fine pd] = qpsk_to_bits(prev_rx_symbols, rx_symbols, 'dqpsk');
|
||||
|
||||
[sig_est noise_est] = snr_update(sig_est, noise_est, pd);
|
||||
sig_est_log = [sig_est_log sig_est];
|
||||
noise_est_log = [noise_est_log noise_est];
|
||||
|
||||
prev_rx_symbols = rx_symbols;
|
||||
rx_bits_log = [rx_bits_log rx_bits];
|
||||
foff_fine_log = [foff_fine_log foff_fine];
|
||||
sync_bit_log = [sync_bit_log sync_bit];
|
||||
foff -= 0.5*foff_fine;
|
||||
foff_log = [foff_log foff];
|
||||
|
||||
% freq est state machine
|
||||
|
||||
[coarse_fine fest_state] = freq_state(sync_bit, fest_state);
|
||||
coarse_fine_log = [coarse_fine_log coarse_fine];
|
||||
end
|
||||
|
||||
% Compare to the output from the C version
|
||||
|
||||
load ../unittest/tfdmdv_out.txt
|
||||
|
||||
% Helper functions to plot output of C verson and difference between Octave and C versions
|
||||
|
||||
function stem_sig_and_error(plotnum, subplotnum, sig, error, titlestr, axisvec)
|
||||
figure(plotnum)
|
||||
subplot(subplotnum)
|
||||
stem(sig);
|
||||
hold on;
|
||||
stem(error,'g');
|
||||
hold off;
|
||||
if nargin == 6
|
||||
axis(axisvec);
|
||||
end
|
||||
title(titlestr);
|
||||
endfunction
|
||||
|
||||
function plot_sig_and_error(plotnum, subplotnum, sig, error, titlestr, axisvec)
|
||||
figure(plotnum)
|
||||
subplot(subplotnum)
|
||||
plot(sig);
|
||||
hold on;
|
||||
plot(error,'g');
|
||||
hold off;
|
||||
if nargin == 6
|
||||
axis(axisvec);
|
||||
end
|
||||
title(titlestr);
|
||||
endfunction
|
||||
|
||||
% ---------------------------------------------------------------------------------------
|
||||
% Plot output and test each C function
|
||||
% ---------------------------------------------------------------------------------------
|
||||
|
||||
% fdmdv_get_test_bits() & bits_to_dqpsk_symbols()
|
||||
|
||||
n = 28;
|
||||
stem_sig_and_error(1, 211, tx_bits_log_c(1:n), tx_bits_log(1:n) - tx_bits_log_c(1:n), 'tx bits', [1 n -1.5 1.5])
|
||||
stem_sig_and_error(1, 212, real(tx_symbols_log_c(1:n/2)), real(tx_symbols_log(1:n/2) - tx_symbols_log_c(1:n/2)), 'tx symbols real', [1 n/2 -1.5 1.5])
|
||||
|
||||
% tx_filter()
|
||||
|
||||
diff = tx_baseband_log - tx_baseband_log_c;
|
||||
c=15;
|
||||
plot_sig_and_error(2, 211, real(tx_baseband_log_c(c,:)), real(sum(diff)), 'tx baseband real')
|
||||
plot_sig_and_error(2, 212, imag(tx_baseband_log_c(c,:)), imag(sum(diff)), 'tx baseband imag')
|
||||
|
||||
% fdm_upconvert()
|
||||
|
||||
plot_sig_and_error(3, 211, real(tx_fdm_log_c), real(tx_fdm_log - tx_fdm_log_c), 'tx fdm real')
|
||||
plot_sig_and_error(3, 212, imag(tx_fdm_log_c), imag(tx_fdm_log - tx_fdm_log_c), 'tx fdm imag')
|
||||
|
||||
% generate_pilot_lut()
|
||||
|
||||
plot_sig_and_error(4, 211, real(pilot_lut_c), real(pilot_lut - pilot_lut_c), 'pilot lut real')
|
||||
plot_sig_and_error(4, 212, imag(pilot_lut_c), imag(pilot_lut - pilot_lut_c), 'pilot lut imag')
|
||||
|
||||
% rx_est_freq_offset()
|
||||
|
||||
st=1; en = 3*Npilotbaseband;
|
||||
plot_sig_and_error(5, 211, real(pilot_baseband1_log(st:en)), real(pilot_baseband1_log(st:en) - pilot_baseband1_log_c(st:en)), 'pilot baseband1 real' )
|
||||
plot_sig_and_error(5, 212, real(pilot_baseband2_log(st:en)), real(pilot_baseband2_log(st:en) - pilot_baseband2_log_c(st:en)), 'pilot baseband2 real' )
|
||||
|
||||
st=1; en = 3*Npilotlpf;
|
||||
plot_sig_and_error(6, 211, real(pilot_lpf1_log(st:en)), real(pilot_lpf1_log(st:en) - pilot_lpf1_log_c(st:en)), 'pilot lpf1 real' )
|
||||
plot_sig_and_error(6, 212, real(pilot_lpf2_log(st:en)), real(pilot_lpf2_log(st:en) - pilot_lpf2_log_c(st:en)), 'pilot lpf2 real' )
|
||||
|
||||
plot_sig_and_error(7, 211, real(S1_log), real(S1_log - S1_log_c), 'S1 real' )
|
||||
plot_sig_and_error(7, 212, imag(S1_log), imag(S1_log - S1_log_c), 'S1 imag' )
|
||||
|
||||
plot_sig_and_error(8, 211, real(S2_log), real(S2_log - S2_log_c), 'S2 real' )
|
||||
plot_sig_and_error(8, 212, imag(S2_log), imag(S2_log - S2_log_c), 'S2 imag' )
|
||||
|
||||
plot_sig_and_error(9, 211, foff_coarse_log, foff_coarse_log - foff_coarse_log_c, 'Coarse Freq Offset' )
|
||||
plot_sig_and_error(9, 212, foff_fine_log, foff_fine_log - foff_fine_log_c, 'Fine Freq Offset' )
|
||||
|
||||
plot_sig_and_error(10, 211, foff_log, foff_log - foff_log_c, 'Freq Offset' )
|
||||
plot_sig_and_error(10, 212, coarse_fine_log, coarse_fine_log - coarse_fine_log_c, 'Freq Est Coarse(0) Fine(1)', [1 frames -0.5 1.5] )
|
||||
|
||||
c=15;
|
||||
plot_sig_and_error(11, 211, real(rx_baseband_log(c,:)), real(rx_baseband_log(c,:) - rx_baseband_log_c(c,:)), 'Rx baseband real' )
|
||||
plot_sig_and_error(11, 212, imag(rx_baseband_log(c,:)), imag(rx_baseband_log(c,:) - rx_baseband_log_c(c,:)), 'Rx baseband imag' )
|
||||
|
||||
plot_sig_and_error(12, 211, real(rx_filt_log(c,:)), real(rx_filt_log(c,:) - rx_filt_log_c(c,:)), 'Rx filt real' )
|
||||
plot_sig_and_error(12, 212, imag(rx_filt_log(c,:)), imag(rx_filt_log(c,:) - rx_filt_log_c(c,:)), 'Rx filt imag' )
|
||||
|
||||
st=1; en=3*Nt*P;
|
||||
plot_sig_and_error(13, 211, env_log(st:en), env_log(st:en) - env_log_c(st:en), 'env' )
|
||||
stem_sig_and_error(13, 212, real(rx_symbols_log(c,:)), real(rx_symbols_log(c,:) - rx_symbols_log_c(c,:)), 'rx symbols' )
|
||||
|
||||
st=10*28;
|
||||
en = 12*28;
|
||||
plot_sig_and_error(14, 211, rx_timing_log, rx_timing_log - rx_timing_log_c, 'Rx Timing' )
|
||||
stem_sig_and_error(14, 212, sync_bit_log_c, sync_bit_log - sync_bit_log_c, 'Sync bit', [1 n -1.5 1.5])
|
||||
|
||||
stem_sig_and_error(15, 211, rx_bits_log_c(st:en), rx_bits_log(st:en) - rx_bits_log_c(st:en), 'RX bits', [1 en-st -1.5 1.5])
|
||||
stem_sig_and_error(15, 212, nin_log_c, nin_log - nin_log_c, 'nin')
|
||||
|
||||
c = 1;
|
||||
plot_sig_and_error(16, 211, sig_est_log(c,:), sig_est_log(c,:) - sig_est_log_c(c,:), 'sig est for SNR' )
|
||||
plot_sig_and_error(16, 212, noise_est_log(c,:), noise_est_log(c,:) - noise_est_log_c(c,:), 'noise est for SNR' )
|
||||
|
||||
% ---------------------------------------------------------------------------------------
|
||||
% AUTOMATED CHECKS ------------------------------------------
|
||||
% ---------------------------------------------------------------------------------------
|
||||
|
||||
function check(a, b, test_name)
|
||||
global passes;
|
||||
global fails;
|
||||
|
||||
[m n] = size(a);
|
||||
printf("%s", test_name);
|
||||
for i=1:(25-length(test_name))
|
||||
printf(".");
|
||||
end
|
||||
printf(": ");
|
||||
|
||||
if sum(abs(a - b))/n < 1E-3
|
||||
printf("OK\n");
|
||||
passes++;
|
||||
else
|
||||
printf("FAIL\n");
|
||||
fails++;
|
||||
end
|
||||
endfunction
|
||||
|
||||
check(tx_bits_log, tx_bits_log_c, 'tx_bits');
|
||||
check(tx_symbols_log, tx_symbols_log_c, 'tx_symbols');
|
||||
check(tx_baseband_log, tx_baseband_log_c, 'tx_baseband');
|
||||
check(tx_fdm_log, tx_fdm_log_c, 'tx_fdm');
|
||||
check(pilot_lut, pilot_lut_c, 'pilot_lut');
|
||||
check(pilot_baseband1_log, pilot_baseband1_log_c, 'pilot lpf1');
|
||||
check(pilot_baseband2_log, pilot_baseband2_log_c, 'pilot lpf2');
|
||||
check(S1_log, S1_log_c, 'S1');
|
||||
check(S2_log, S2_log_c, 'S2');
|
||||
check(foff_coarse_log, foff_coarse_log_c, 'foff_coarse');
|
||||
check(foff_fine_log, foff_fine_log_c, 'foff_fine');
|
||||
check(foff_log, foff_log_c, 'foff');
|
||||
check(rx_baseband_log, rx_baseband_log_c, 'rx baseband');
|
||||
check(rx_filt_log, rx_filt_log_c, 'rx filt');
|
||||
check(env_log, env_log_c, 'env');
|
||||
check(rx_timing_log, rx_timing_log_c, 'rx_timing');
|
||||
check(rx_symbols_log, rx_symbols_log_c, 'rx_symbols');
|
||||
check(rx_bits_log, rx_bits_log_c, 'rx bits');
|
||||
check(sync_bit_log, sync_bit_log_c, 'sync bit');
|
||||
check(coarse_fine_log, coarse_fine_log_c, 'coarse_fine');
|
||||
check(nin_log, nin_log_c, 'nin');
|
||||
check(sig_est_log, sig_est_log_c, 'sig_est');
|
||||
check(noise_est_log, noise_est_log_c, 'noise_est');
|
||||
|
||||
printf("\npasses: %d fails: %d\n", passes, fails);
|
49
libs/libcodec2/octave/tget_spec.m
Normal file
49
libs/libcodec2/octave/tget_spec.m
Normal file
@ -0,0 +1,49 @@
|
||||
% tget-spec.m
|
||||
%
|
||||
% Used in conjunction with src/fdmdv_demod to test the
|
||||
% fdmdv_get_rx_spectrum() function.
|
||||
%
|
||||
% codec2-dev/src$ ./fdmdv_demod fdmdv_mod.raw tmp.c2 dump.txt
|
||||
% octave:3> tget_spec("../src/dump.txt")
|
||||
%
|
||||
% Copyright David Rowe 2012
|
||||
% This program is distributed under the terms of the GNU General Public License
|
||||
% Version 2
|
||||
%
|
||||
|
||||
function tfft_log(dumpfilename)
|
||||
|
||||
load(dumpfilename);
|
||||
|
||||
[rows cols] = size(rx_spec_log_c);
|
||||
Fs = 8000; low_freq = 0; high_freq = 2500;
|
||||
res = (Fs/2)/cols;
|
||||
st_bin = low_freq/res + 1;
|
||||
en_bin = high_freq/res;
|
||||
xaxis = (st_bin:en_bin)*res;
|
||||
|
||||
f_start = 2; f_end = 100;
|
||||
beta = 0.1;
|
||||
|
||||
av = zeros(f_end, en_bin-st_bin+1);
|
||||
for r=f_start:f_end
|
||||
x = (1-beta)*av(r-1,:) + beta*rx_spec_log_c(r,st_bin:en_bin);
|
||||
av(r,:) = x;
|
||||
end
|
||||
|
||||
% spectrogram (waterfall)
|
||||
|
||||
figure(1)
|
||||
clf;
|
||||
imagesc(av,[-40 0]);
|
||||
|
||||
% animated spectrum display
|
||||
|
||||
figure(2)
|
||||
clf;
|
||||
for r=f_start:f_end
|
||||
plot(xaxis, av(r,:))
|
||||
axis([ low_freq high_freq -40 0])
|
||||
sleep(0.1)
|
||||
end
|
||||
endfunction
|
52
libs/libcodec2/octave/twotone.m
Normal file
52
libs/libcodec2/octave/twotone.m
Normal file
@ -0,0 +1,52 @@
|
||||
% twotone.m
|
||||
% David Rowe Aug 2012
|
||||
% Used to experiment with combining phase of two tones
|
||||
|
||||
function cbphase
|
||||
|
||||
Wo = 100.0*pi/4000;
|
||||
L = floor(pi/Wo);
|
||||
phi = zeros(1,L);
|
||||
|
||||
% two harmonics
|
||||
|
||||
a = 20; b = 21;
|
||||
|
||||
% set up phases to whatever
|
||||
|
||||
phi(a) = -pi;
|
||||
phi(b) = -pi/2;
|
||||
|
||||
% synthesis the two-tone signal
|
||||
|
||||
N = 16000;
|
||||
Nplot = 250;
|
||||
s = zeros(1,N);
|
||||
|
||||
for m=a:b
|
||||
s_m = cos(m*Wo*(0:(N-1)) + phi(m));
|
||||
s = s + s_m;
|
||||
endfor
|
||||
|
||||
% now our theory says that this signal should be the same perceptually
|
||||
|
||||
phi_(a) = (phi(a) - phi(b))/2;
|
||||
phi_(b) = (phi(b) - phi(a))/2;
|
||||
|
||||
s_ = zeros(1,N);
|
||||
for m=a:b
|
||||
s_m = cos(m*Wo*(0:(N-1)) + phi_(m));
|
||||
s_ = s_ + s_m;
|
||||
endfor
|
||||
|
||||
% plot them and see if envelope has the same phase, but "carriers"
|
||||
% have different phase
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
subplot(211);
|
||||
plot(s(1:Nplot));
|
||||
subplot(212);
|
||||
plot(s_(1:Nplot),'r');
|
||||
endfunction
|
||||
|
76
libs/libcodec2/octave/twotone1.m
Normal file
76
libs/libcodec2/octave/twotone1.m
Normal file
@ -0,0 +1,76 @@
|
||||
% twotone1.m
|
||||
% David Rowe Aug 17 2012
|
||||
%
|
||||
% Used to experiment with combining phase of two tones. This version
|
||||
% sets up a complete synthetic speech signal then tries to combine the
|
||||
% phase of high frequency tones. Lets see if we can do this and keep perceptual
|
||||
% nature of signal the same.
|
||||
|
||||
function twotone1
|
||||
|
||||
% hts1a frame 47
|
||||
|
||||
Wo = 0.093168;
|
||||
L = 33;
|
||||
%A = [69.626907 460.218536 839.677429 2577.498047 972.647888 712.755066 489.048553 364.830536 409.230652 371.767487 489.112854 893.127014 2447.596680 752.878113 475.720520 234.452271 248.161606 232.171051 202.669891 323.914490 678.749451 362.958038 211.652512 170.764435 148.631790 169.261673 272.254150 176.872375 67.344391 99.022301 60.812035 34.319073 14.864757];
|
||||
A = zeros(1,L)*100;
|
||||
phi = [1.560274 1.508063 -1.565184 1.289117 -2.547365 1.412528 -1.303992 3.121130 1.087573 -1.158161 -2.928007 0.995093 -2.614023 0.246136 -2.267406 2.143802 -0.273431 -2.266897 1.685171 -0.668712 2.699722 -1.151891 2.406379 -0.046192 -2.718611 0.761067 -2.305014 0.133172 -1.428978 1.492630 -1.668385 1.539734 -1.336615];
|
||||
%phi = zeros(1,L);
|
||||
st = floor(L/2);
|
||||
%st = 1;
|
||||
|
||||
A(st:st+5) = 1000;
|
||||
|
||||
% now set up phase of signal with phase of upper frequency harmonic
|
||||
% pairs combined
|
||||
|
||||
phi_ = phi;
|
||||
for m=floor(L/2):2:L
|
||||
phi_(m) = (phi(m) - phi(m+1))/2;
|
||||
phi_(m+1) = (phi(m+1) - phi(m))/2;
|
||||
%phi_(m+1) = 0;
|
||||
end
|
||||
|
||||
% synthesise the signals
|
||||
|
||||
N = 16000;
|
||||
Nplot = 250;
|
||||
|
||||
s = zeros(1,N);
|
||||
for m=st:L
|
||||
s_m = A(m)*cos(m*Wo*(0:(N-1)) + phi(m));
|
||||
s = s + s_m;
|
||||
endfor
|
||||
|
||||
s_ = zeros(1,N);
|
||||
for m=st:L
|
||||
s_m = A(m)*cos(m*Wo*(0:(N-1)) + phi_(m));
|
||||
s_ = s_ + s_m;
|
||||
endfor
|
||||
|
||||
% plot them, expect to see similar time domain waveforms
|
||||
|
||||
figure(1);
|
||||
clf;
|
||||
subplot(211);
|
||||
plot(s(1:Nplot));
|
||||
subplot(212);
|
||||
plot(s_(1:Nplot),'r');
|
||||
|
||||
figure(2);
|
||||
clf;
|
||||
subplot(211);
|
||||
plot(s(1:Nplot)-s_(1:Nplot));
|
||||
|
||||
% save to disk
|
||||
|
||||
gain = 1;
|
||||
fs=fopen("twotone1_orig.raw","wb");
|
||||
fwrite(fs,gain*s,"short");
|
||||
fclose(fs);
|
||||
fs=fopen("twotone1_comb.raw","wb");
|
||||
fwrite(fs,gain*s_,"short");
|
||||
fclose(fs);
|
||||
|
||||
endfunction
|
||||
|
26
libs/libcodec2/octave/undersample.m
Normal file
26
libs/libcodec2/octave/undersample.m
Normal file
@ -0,0 +1,26 @@
|
||||
% undersample.m
|
||||
% David Rowe 5 Nov 2012
|
||||
% Testing algorithms for plotting undersampled data for fdmdv2 waveform displays
|
||||
|
||||
fs=fopen("../raw/hts1a.raw","rb");
|
||||
s = fread(fs,Inf,"short");
|
||||
|
||||
Fs1=8000;
|
||||
Fs2=200;
|
||||
|
||||
M=Fs1/Fs2;
|
||||
|
||||
samples=length(s)/M;
|
||||
s1=zeros(1,2*samples);
|
||||
for b=1:samples
|
||||
st = (b-1)*M + 1;
|
||||
en = b*M;
|
||||
s1(2*b-1) = max(s(st:en));
|
||||
s1(2*b) = min(s(st:en));
|
||||
end
|
||||
|
||||
subplot(211)
|
||||
plot(s)
|
||||
subplot(212)
|
||||
plot(s1);
|
||||
|
23
libs/libcodec2/portaudio/Makefile
Normal file
23
libs/libcodec2/portaudio/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
# Makefile for Portaudio test programs
|
||||
# Requires Portaudio V19
|
||||
|
||||
CFLAGS = -g -Wall -I../src
|
||||
LIBS = -lm -lportaudio -pthread
|
||||
SRC = ../src/fdmdv.c ../src/kiss_fft.c ../src/fifo.c
|
||||
|
||||
all: pa_rec pa_play pa_recplay pa_impresp
|
||||
|
||||
pa_rec: Makefile pa_rec.c $(SRC)
|
||||
gcc $(CFLAGS) pa_rec.c $(SRC) -o pa_rec $(LIBS)
|
||||
|
||||
pa_play: Makefile pa_play.c $(SRC)
|
||||
gcc $(CFLAGS) pa_play.c $(SRC) -o pa_play $(LIBS)
|
||||
|
||||
pa_recplay: Makefile pa_recplay.c $(SRC)
|
||||
gcc $(CFLAGS) pa_recplay.c $(SRC) -o pa_recplay $(LIBS)
|
||||
|
||||
pa_impresp: Makefile pa_impresp.c $(SRC)
|
||||
gcc $(CFLAGS) pa_impresp.c $(SRC) -o pa_impresp $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f pa_rec pa_play pa_recplay
|
254
libs/libcodec2/portaudio/pa_impresp.c
Normal file
254
libs/libcodec2/portaudio/pa_impresp.c
Normal file
@ -0,0 +1,254 @@
|
||||
/*
|
||||
pa_impresp.c
|
||||
David Rowe
|
||||
August 29 2012
|
||||
|
||||
Measures the impulse reponse of the path between the speaker and
|
||||
microphone. Used to explore why Codec audio quality is
|
||||
different through a speaker and headphones.
|
||||
|
||||
Modified from pa_playrec.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: paex_record.c 1752 2011-09-08 03:21:55Z philburk $
|
||||
*
|
||||
* This program uses the PortAudio Portable Audio Library.
|
||||
* For more information see: http://www.portaudio.com
|
||||
* Copyright (c) 1999-2000 Ross Bencina and Phil Burk
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files
|
||||
* (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "portaudio.h"
|
||||
#include "fdmdv.h"
|
||||
|
||||
#define SAMPLE_RATE 48000 /* 48 kHz sampling rate rec. as we
|
||||
can trust accuracy of sound
|
||||
card */
|
||||
#define N8 160 /* processing buffer size at 8 kHz */
|
||||
#define N48 (N8*FDMDV_OS) /* processing buffer size at 48 kHz */
|
||||
#define MEM8 (FDMDV_OS_TAPS/FDMDV_OS)
|
||||
#define NUM_CHANNELS 2 /* I think most sound cards prefer
|
||||
stereo, we will convert to mono
|
||||
as we sample */
|
||||
|
||||
#define IMPULSE_AMP 16384 /* amplitide of impulse */
|
||||
#define IMPULSE_PERIOD 0.1 /* period (dly between impulses) in secs */
|
||||
|
||||
/* state information passed to call back */
|
||||
|
||||
typedef struct {
|
||||
float in48k[FDMDV_OS_TAPS + N48];
|
||||
float in8k[MEM8 + N8];
|
||||
FILE *fimp;
|
||||
float *impulse_buf;
|
||||
int impulse_buf_length;
|
||||
int impulse_sample_count;
|
||||
int framesLeft;
|
||||
} paTestData;
|
||||
|
||||
|
||||
/*
|
||||
This routine will be called by the PortAudio engine when audio is
|
||||
required. It may be called at interrupt level on some machines so
|
||||
don't do anything that could mess up the system like calling
|
||||
malloc() or free().
|
||||
*/
|
||||
|
||||
static int callback( const void *inputBuffer, void *outputBuffer,
|
||||
unsigned long framesPerBuffer,
|
||||
const PaStreamCallbackTimeInfo* timeInfo,
|
||||
PaStreamCallbackFlags statusFlags,
|
||||
void *userData )
|
||||
{
|
||||
paTestData *data = (paTestData*)userData;
|
||||
int i;
|
||||
short *rptr = (short*)inputBuffer;
|
||||
short *wptr = (short*)outputBuffer;
|
||||
float *in8k = data->in8k;
|
||||
float *in48k = data->in48k;
|
||||
float out8k[N8];
|
||||
float out48k[N48];
|
||||
short out48k_short[N48];
|
||||
short out8k_short[N8];
|
||||
|
||||
(void) timeInfo;
|
||||
(void) statusFlags;
|
||||
|
||||
assert(inputBuffer != NULL);
|
||||
|
||||
/* just use left channel */
|
||||
|
||||
for(i=0; i<framesPerBuffer; i++,rptr+=2)
|
||||
data->in48k[i+FDMDV_OS_TAPS] = *rptr;
|
||||
|
||||
/* downsample and update filter memory */
|
||||
|
||||
fdmdv_48_to_8(out8k, &in48k[FDMDV_OS_TAPS], N8);
|
||||
for(i=0; i<FDMDV_OS_TAPS; i++)
|
||||
in48k[i] = in48k[i+framesPerBuffer];
|
||||
|
||||
/* write impulse response to disk */
|
||||
|
||||
for(i=0; i<N8; i++)
|
||||
out8k_short[i] = out8k[i];
|
||||
fwrite(out8k_short, sizeof(short), N8, data->fimp);
|
||||
|
||||
/* play side, read from impulse buffer */
|
||||
|
||||
for(i=0; i<N8; i++) {
|
||||
in8k[MEM8+i] = data->impulse_buf[data->impulse_sample_count];
|
||||
data->impulse_sample_count++;
|
||||
if (data->impulse_sample_count == data->impulse_buf_length)
|
||||
data->impulse_sample_count = 0;
|
||||
}
|
||||
|
||||
/* upsample and update filter memory */
|
||||
|
||||
fdmdv_8_to_48(out48k, &in8k[MEM8], N8);
|
||||
for(i=0; i<MEM8; i++)
|
||||
in8k[i] = in8k[i+N8];
|
||||
|
||||
assert(outputBuffer != NULL);
|
||||
|
||||
/* write signal to both channels */
|
||||
|
||||
for(i=0; i<N48; i++)
|
||||
out48k_short[i] = (short)out48k[i];
|
||||
for(i=0; i<framesPerBuffer; i++,wptr+=2) {
|
||||
wptr[0] = out48k_short[i];
|
||||
wptr[1] = out48k_short[i];
|
||||
}
|
||||
|
||||
data->framesLeft -= framesPerBuffer;
|
||||
if (data->framesLeft > 0)
|
||||
return paContinue;
|
||||
else
|
||||
return paComplete;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
PaStreamParameters inputParameters, outputParameters;
|
||||
PaStream* stream;
|
||||
PaError err = paNoError;
|
||||
paTestData data;
|
||||
int i, numSecs;
|
||||
|
||||
if (argc != 3) {
|
||||
printf("usage: %s impulseRawFile time(s)\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
data.fimp = fopen(argv[1], "wb");
|
||||
if (data.fimp == NULL) {
|
||||
printf("Error opening impulse output file %s\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
numSecs = atoi(argv[2]);
|
||||
data.framesLeft = numSecs * SAMPLE_RATE;
|
||||
|
||||
/* init filter states */
|
||||
|
||||
for(i=0; i<MEM8; i++)
|
||||
data.in8k[i] = 0.0;
|
||||
for(i=0; i<FDMDV_OS_TAPS; i++)
|
||||
data.in48k[i] = 0.0;
|
||||
|
||||
/* init imupulse */
|
||||
|
||||
data.impulse_buf_length = IMPULSE_PERIOD*(SAMPLE_RATE/FDMDV_OS);
|
||||
printf("%d\n",data.impulse_buf_length);
|
||||
data.impulse_buf = (float*)malloc(data.impulse_buf_length*sizeof(float));
|
||||
assert(data.impulse_buf != NULL);
|
||||
data.impulse_buf[0] = IMPULSE_AMP;
|
||||
for(i=1; i<data.impulse_buf_length; i++)
|
||||
data.impulse_buf[i] = 0;
|
||||
data.impulse_sample_count = 0;
|
||||
|
||||
err = Pa_Initialize();
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */
|
||||
if (inputParameters.device == paNoDevice) {
|
||||
fprintf(stderr,"Error: No default input device.\n");
|
||||
goto done;
|
||||
}
|
||||
inputParameters.channelCount = NUM_CHANNELS; /* stereo input */
|
||||
inputParameters.sampleFormat = paInt16;
|
||||
inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;
|
||||
inputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
|
||||
if (outputParameters.device == paNoDevice) {
|
||||
fprintf(stderr,"Error: No default output device.\n");
|
||||
goto done;
|
||||
}
|
||||
outputParameters.channelCount = NUM_CHANNELS; /* stereo output */
|
||||
outputParameters.sampleFormat = paInt16;
|
||||
outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
|
||||
outputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
/* Play some audio --------------------------------------------- */
|
||||
|
||||
err = Pa_OpenStream(
|
||||
&stream,
|
||||
&inputParameters,
|
||||
&outputParameters,
|
||||
SAMPLE_RATE,
|
||||
N48,
|
||||
paClipOff,
|
||||
callback,
|
||||
&data );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
err = Pa_StartStream( stream );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
while( ( err = Pa_IsStreamActive( stream ) ) == 1 )
|
||||
{
|
||||
Pa_Sleep(100);
|
||||
}
|
||||
if( err < 0 ) goto done;
|
||||
|
||||
err = Pa_CloseStream( stream );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
|
||||
done:
|
||||
Pa_Terminate();
|
||||
if( err != paNoError )
|
||||
{
|
||||
fprintf( stderr, "An error occured while using the portaudio stream\n" );
|
||||
fprintf( stderr, "Error number: %d\n", err );
|
||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||
err = 1; /* Always return 0 or 1, but no other return codes. */
|
||||
}
|
||||
|
||||
fclose(data.fimp);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
199
libs/libcodec2/portaudio/pa_play.c
Normal file
199
libs/libcodec2/portaudio/pa_play.c
Normal file
@ -0,0 +1,199 @@
|
||||
/*
|
||||
pa_play.c
|
||||
David Rowe
|
||||
July 8 2012
|
||||
|
||||
Converts samples from a 16 bit short 8000 Hz rawfile to 480000Hz
|
||||
sample rate and plays them using the default sound device. Used as
|
||||
an intermediate step in Portaudio integration.
|
||||
|
||||
Modified from paex_record.c Portaudio example. Original author
|
||||
author Phil Burk http://www.softsynth.com
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: paex_record.c 1752 2011-09-08 03:21:55Z philburk $
|
||||
*
|
||||
* This program uses the PortAudio Portable Audio Library.
|
||||
* For more information see: http://www.portaudio.com
|
||||
* Copyright (c) 1999-2000 Ross Bencina and Phil Burk
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files
|
||||
* (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "portaudio.h"
|
||||
#include "fdmdv.h"
|
||||
|
||||
#define SAMPLE_RATE 48000 /* 48 kHz sampling rate rec. as we
|
||||
can trust accuracy of sound
|
||||
card */
|
||||
#define N8 160 /* processing buffer size at 8 kHz */
|
||||
#define N48 (N8*FDMDV_OS) /* processing buffer size at 48 kHz */
|
||||
#define MEM8 (FDMDV_OS_TAPS/FDMDV_OS)
|
||||
#define NUM_CHANNELS 2 /* I think most sound cards prefer
|
||||
stereo, we will convert to mono
|
||||
as we sample */
|
||||
|
||||
/* state information passed to call back */
|
||||
|
||||
typedef struct {
|
||||
FILE *fin;
|
||||
float in8k[MEM8 + N8];
|
||||
} paTestData;
|
||||
|
||||
|
||||
/*
|
||||
This routine will be called by the PortAudio engine when audio is
|
||||
required. It may be called at interrupt level on some machines so
|
||||
don't do anything that could mess up the system like calling
|
||||
malloc() or free().
|
||||
*/
|
||||
|
||||
static int playCallback( const void *inputBuffer, void *outputBuffer,
|
||||
unsigned long framesPerBuffer,
|
||||
const PaStreamCallbackTimeInfo* timeInfo,
|
||||
PaStreamCallbackFlags statusFlags,
|
||||
void *userData )
|
||||
{
|
||||
paTestData *data = (paTestData*)userData;
|
||||
FILE *fin = data->fin;
|
||||
int i, nread;
|
||||
int finished;
|
||||
short *wptr = (short*)outputBuffer;
|
||||
float *in8k = data->in8k;
|
||||
float out48k[N48];
|
||||
short out48k_short[N48];
|
||||
short in8k_short[N8];
|
||||
|
||||
(void) outputBuffer; /* Prevent unused variable warnings. */
|
||||
(void) timeInfo;
|
||||
(void) statusFlags;
|
||||
(void) userData;
|
||||
|
||||
/* note Portaudio docs recs. against making systems calls like
|
||||
fwrite() in this callback but seems to work OK */
|
||||
|
||||
nread = fread(in8k_short, sizeof(short), N8, fin);
|
||||
if (nread == N8)
|
||||
finished = paContinue;
|
||||
else
|
||||
finished = paComplete;
|
||||
|
||||
for(i=0; i<N8; i++)
|
||||
in8k[MEM8+i] = in8k_short[i];
|
||||
|
||||
/* upsample and update filter memory */
|
||||
|
||||
fdmdv_8_to_48(out48k, &in8k[MEM8], N8);
|
||||
for(i=0; i<MEM8; i++)
|
||||
in8k[i] = in8k[i+N8];
|
||||
|
||||
assert(outputBuffer != NULL);
|
||||
|
||||
/* write signal to both channels */
|
||||
|
||||
for(i=0; i<N48; i++)
|
||||
out48k_short[i] = (short)out48k[i];
|
||||
for(i=0; i<framesPerBuffer; i++,wptr+=2) {
|
||||
wptr[0] = out48k_short[i];
|
||||
wptr[1] = out48k_short[i];
|
||||
}
|
||||
|
||||
return finished;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
PaStreamParameters outputParameters;
|
||||
PaStream* stream;
|
||||
PaError err = paNoError;
|
||||
paTestData data;
|
||||
int i;
|
||||
|
||||
if (argc != 2) {
|
||||
printf("usage: %s rawFile\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
data.fin = fopen(argv[1], "rt");
|
||||
if (data.fin == NULL) {
|
||||
printf("Error opening input raw file %s\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for(i=0; i<MEM8; i++)
|
||||
data.in8k[i] = 0.0;
|
||||
|
||||
err = Pa_Initialize();
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
outputParameters.device = Pa_GetDefaultOutputDevice(); /* default input device */
|
||||
if (outputParameters.device == paNoDevice) {
|
||||
fprintf(stderr,"Error: No default output device.\n");
|
||||
goto done;
|
||||
}
|
||||
outputParameters.channelCount = NUM_CHANNELS; /* stereo input */
|
||||
outputParameters.sampleFormat = paInt16;
|
||||
outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
|
||||
outputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
/* Play some audio --------------------------------------------- */
|
||||
|
||||
err = Pa_OpenStream(
|
||||
&stream,
|
||||
NULL,
|
||||
&outputParameters,
|
||||
SAMPLE_RATE,
|
||||
N48,
|
||||
paClipOff,
|
||||
playCallback,
|
||||
&data );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
err = Pa_StartStream( stream );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
while( ( err = Pa_IsStreamActive( stream ) ) == 1 )
|
||||
{
|
||||
Pa_Sleep(100);
|
||||
}
|
||||
if( err < 0 ) goto done;
|
||||
|
||||
err = Pa_CloseStream( stream );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
fclose(data.fin);
|
||||
|
||||
|
||||
done:
|
||||
Pa_Terminate();
|
||||
if( err != paNoError )
|
||||
{
|
||||
fprintf( stderr, "An error occured while using the portaudio stream\n" );
|
||||
fprintf( stderr, "Error number: %d\n", err );
|
||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||
err = 1; /* Always return 0 or 1, but no other return codes. */
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
212
libs/libcodec2/portaudio/pa_rec.c
Normal file
212
libs/libcodec2/portaudio/pa_rec.c
Normal file
@ -0,0 +1,212 @@
|
||||
/*
|
||||
pa_rec.c
|
||||
David Rowe
|
||||
July 6 2012
|
||||
|
||||
Records at 48000 Hz from default sound device, convertes to 8 kHz,
|
||||
and saves to raw file. Used to get experience with Portaudio.
|
||||
|
||||
Modified from paex_record.c Portaudio example. Original author
|
||||
author Phil Burk http://www.softsynth.com
|
||||
|
||||
To Build:
|
||||
|
||||
gcc paex_rec.c -o paex_rec -lm -lrt -lportaudio -pthread
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: paex_record.c 1752 2011-09-08 03:21:55Z philburk $
|
||||
*
|
||||
* This program uses the PortAudio Portable Audio Library.
|
||||
* For more information see: http://www.portaudio.com
|
||||
* Copyright (c) 1999-2000 Ross Bencina and Phil Burk
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files
|
||||
* (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "portaudio.h"
|
||||
#include "fdmdv.h"
|
||||
|
||||
#define SAMPLE_RATE 48000 /* 48 kHz sampling rate rec. as we
|
||||
can trust accuracy of sound
|
||||
card */
|
||||
#define N8 160 /* processing buffer size at 8 kHz */
|
||||
#define N48 (N8*FDMDV_OS) /* processing buffer size at 48 kHz */
|
||||
#define NUM_CHANNELS 2 /* I think most sound cards prefer
|
||||
stereo, we will convert to mono
|
||||
as we sample */
|
||||
|
||||
/* state information passed to call back */
|
||||
|
||||
typedef struct {
|
||||
FILE *fout;
|
||||
int framesLeft;
|
||||
float in48k[FDMDV_OS_TAPS + N48];
|
||||
} paTestData;
|
||||
|
||||
|
||||
/*
|
||||
This routine will be called by the PortAudio engine when audio is
|
||||
available. It may be called at interrupt level on some machines so
|
||||
don't do anything that could mess up the system like calling
|
||||
malloc() or free().
|
||||
*/
|
||||
|
||||
static int recordCallback( const void *inputBuffer, void *outputBuffer,
|
||||
unsigned long framesPerBuffer,
|
||||
const PaStreamCallbackTimeInfo* timeInfo,
|
||||
PaStreamCallbackFlags statusFlags,
|
||||
void *userData )
|
||||
{
|
||||
paTestData *data = (paTestData*)userData;
|
||||
FILE *fout = data->fout;
|
||||
int framesToCopy;
|
||||
int i;
|
||||
int finished;
|
||||
short *rptr = (short*)inputBuffer;
|
||||
float out8k[N8];
|
||||
short out8k_short[N8];
|
||||
|
||||
(void) outputBuffer; /* Prevent unused variable warnings. */
|
||||
(void) timeInfo;
|
||||
(void) statusFlags;
|
||||
(void) userData;
|
||||
|
||||
if (data->framesLeft < framesPerBuffer) {
|
||||
framesToCopy = data->framesLeft;
|
||||
finished = paComplete;
|
||||
}
|
||||
else {
|
||||
framesToCopy = framesPerBuffer;
|
||||
finished = paContinue;
|
||||
}
|
||||
data->framesLeft -= framesToCopy;
|
||||
|
||||
assert(inputBuffer != NULL);
|
||||
|
||||
/* just use left channel */
|
||||
|
||||
for(i=0; i<framesToCopy; i++,rptr+=2)
|
||||
data->in48k[i+FDMDV_OS_TAPS] = *rptr;
|
||||
|
||||
/* downsample and update filter memory */
|
||||
|
||||
fdmdv_48_to_8(out8k, &data->in48k[FDMDV_OS_TAPS], N8);
|
||||
for(i=0; i<FDMDV_OS_TAPS; i++)
|
||||
data->in48k[i] = data->in48k[i+framesToCopy];
|
||||
|
||||
/* save 8k to disk */
|
||||
|
||||
for(i=0; i<N8; i++)
|
||||
out8k_short[i] = (short)out8k[i];
|
||||
|
||||
/* note Portaudio docs recs. against making systems calls like
|
||||
fwrite() in this callback but seems to work OK */
|
||||
|
||||
fwrite(out8k_short, sizeof(short), N8, fout);
|
||||
|
||||
return finished;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
PaStreamParameters inputParameters;
|
||||
PaStream* stream;
|
||||
PaError err = paNoError;
|
||||
paTestData data;
|
||||
int i;
|
||||
int numSecs;
|
||||
|
||||
if (argc != 3) {
|
||||
printf("usage: %s rawFile time(s)\n", argv[0]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
data.fout = fopen(argv[1], "wt");
|
||||
if (data.fout == NULL) {
|
||||
printf("Error opening output raw file %s\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
numSecs = atoi(argv[2]);
|
||||
data.framesLeft = numSecs * SAMPLE_RATE;
|
||||
|
||||
for(i=0; i<FDMDV_OS_TAPS; i++)
|
||||
data.in48k[i] = 0.0;
|
||||
|
||||
err = Pa_Initialize();
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
printf( "PortAudio version number = %d\nPortAudio version text = '%s'\n",
|
||||
Pa_GetVersion(), Pa_GetVersionText() );
|
||||
|
||||
inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */
|
||||
if (inputParameters.device == paNoDevice) {
|
||||
fprintf(stderr,"Error: No default input device.\n");
|
||||
goto done;
|
||||
}
|
||||
inputParameters.channelCount = NUM_CHANNELS; /* stereo input */
|
||||
inputParameters.sampleFormat = paInt16;
|
||||
inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;
|
||||
inputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
/* Record some audio --------------------------------------------- */
|
||||
|
||||
err = Pa_OpenStream(
|
||||
&stream,
|
||||
&inputParameters,
|
||||
NULL, /* &outputParameters, */
|
||||
SAMPLE_RATE,
|
||||
N48,
|
||||
paClipOff, /* we won't output out of range samples so don't bother clipping them */
|
||||
recordCallback,
|
||||
&data );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
err = Pa_StartStream( stream );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
while( ( err = Pa_IsStreamActive( stream ) ) == 1 )
|
||||
{
|
||||
Pa_Sleep(100);
|
||||
}
|
||||
if( err < 0 ) goto done;
|
||||
|
||||
err = Pa_CloseStream( stream );
|
||||
if( err != paNoError ) goto done;
|
||||
|
||||
fclose(data.fout);
|
||||
|
||||
|
||||
done:
|
||||
Pa_Terminate();
|
||||
if( err != paNoError )
|
||||
{
|
||||
fprintf( stderr, "An error occured while using the portaudio stream\n" );
|
||||
fprintf( stderr, "Error number: %d\n", err );
|
||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||
err = 1; /* Always return 0 or 1, but no other return codes. */
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user