mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Compile on debian
Modify Fedora Core spec to support fedora core 6 (libsamplerate, libeXosip2)
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2006-11-30 Yan Morin
|
||||||
|
|
||||||
|
* Fix .spec problem on fedora core 6
|
||||||
|
|
||||||
|
* Fix "selecting #0" device in sflphoned
|
||||||
|
|
||||||
|
* Fix using #8 when there is only 2 out devices)
|
||||||
|
|
||||||
2006-09-09 Yan Morin
|
2006-09-09 Yan Morin
|
||||||
|
|
||||||
* Fixing gentoo problem (qtdir for moc/uic/qembed, Key_Mode_switch)
|
* Fixing gentoo problem (qtdir for moc/uic/qembed, Key_Mode_switch)
|
||||||
|
7
README
7
README
@ -59,7 +59,10 @@ Required libraries and tools:
|
|||||||
http://portaudio.com/archives/pa_snapshot_v19.tar.gz
|
http://portaudio.com/archives/pa_snapshot_v19.tar.gz
|
||||||
or
|
or
|
||||||
svn co https://www.portaudio.com/repos/portaudio/branches/v19-devel portaudio
|
svn co https://www.portaudio.com/repos/portaudio/branches/v19-devel portaudio
|
||||||
|
or
|
||||||
|
cd tools/ ./portaudio.sh
|
||||||
|
- autoconf
|
||||||
|
|
||||||
Optional libraries:
|
Optional libraries:
|
||||||
- zeroconf: (tested with mDNSResponder87)
|
- zeroconf: (tested with mDNSResponder87)
|
||||||
http://developer.apple.com/darwin/projects/bonjour/
|
http://developer.apple.com/darwin/projects/bonjour/
|
||||||
@ -74,6 +77,8 @@ Some of the required libraries may be downloaded from
|
|||||||
|
|
||||||
See tools/config.sh for details
|
See tools/config.sh for details
|
||||||
|
|
||||||
|
So in debian, you need:
|
||||||
|
apt-get install autoconf automake1.9 libtool libosip2-dev libexosip2-dev libccrtp-dev libcommoncpp2-dev pkg-config libqt3-mt-dev libsamplerate-dev libasound2-dev
|
||||||
|
|
||||||
|
|
||||||
Building the dependencies
|
Building the dependencies
|
||||||
|
@ -23,7 +23,7 @@ AC_CONFIG_SRCDIR([config.h.in])
|
|||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
dnl What to generate
|
dnl What to generate
|
||||||
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
dnl AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
AC_CONFIG_FILES([libs/Makefile \
|
AC_CONFIG_FILES([libs/Makefile \
|
||||||
libs/taxidermy/Makefile \
|
libs/taxidermy/Makefile \
|
||||||
@ -46,7 +46,7 @@ AC_CONFIG_FILES([skins/Makefile \
|
|||||||
skins/gmetal/Makefile \
|
skins/gmetal/Makefile \
|
||||||
ringtones/Makefile])
|
ringtones/Makefile])
|
||||||
AC_CONFIG_FILES([platform/debian/changelog platform/rpm/sflphone.spec \
|
AC_CONFIG_FILES([platform/debian/changelog platform/rpm/sflphone.spec \
|
||||||
platform/fedora/sflphone.spec])
|
platform/fedora/sflphone.spec platform/fedora/sflphone-fc6.spec])
|
||||||
dnl the file stamp-h.in should be there before (instead of AC_CONFIG_HEADERS(config.h))
|
dnl the file stamp-h.in should be there before (instead of AC_CONFIG_HEADERS(config.h))
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
@ -80,6 +80,7 @@ AC_PROG_CPP
|
|||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
dnl will have to remove this
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
dnl Define C++ as default language
|
dnl Define C++ as default language
|
||||||
|
@ -43,13 +43,10 @@ libtaxidermy_la_SOURCES = \
|
|||||||
CLEANFILES = \
|
CLEANFILES = \
|
||||||
$(BUILT_SOURCES)
|
$(BUILT_SOURCES)
|
||||||
|
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/libs/ $(QT_CXXFLAGS) $(X_INCLUDES)
|
AM_CPPFLAGS = -I$(top_srcdir)/libs/ $(QT_CXXFLAGS) $(X_INCLUDES)
|
||||||
AM_LDFLAGS = $(QT_LDADD) $(X_LDFLAGS)
|
#AM_LDFLAGS = $(QT_LDADD) $(X_LDFLAGS)
|
||||||
libtaxidermy_la_LIBADD = $(QT_LDADD)
|
libtaxidermy_la_LIBADD = $(QT_LDADD)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%.h: %.ui
|
%.h: %.ui
|
||||||
$(UIC) -o $@ $<
|
$(UIC) -o $@ $<
|
||||||
|
|
||||||
|
@ -254,5 +254,5 @@ AC_SUBST(QT_CXXFLAGS)
|
|||||||
AC_SUBST(QT_LDADD)
|
AC_SUBST(QT_LDADD)
|
||||||
AC_SUBST(QT_GUILINK)
|
AC_SUBST(QT_GUILINK)
|
||||||
AC_SUBST(QASSISTANTCLIENT_LDADD)
|
AC_SUBST(QASSISTANTCLIENT_LDADD)
|
||||||
|
AC_SUBST(QT_LIBS)
|
||||||
])
|
])
|
||||||
|
52
platform/fedora/sflphone-fc6.spec.in
Normal file
52
platform/fedora/sflphone-fc6.spec.in
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
%define name sflphone
|
||||||
|
%define version @RPM_VERSION@
|
||||||
|
Autoreq: 0
|
||||||
|
|
||||||
|
Name: %name
|
||||||
|
Summary: A VoIP daemon with SIP protocol
|
||||||
|
Version: %version
|
||||||
|
Release: 1
|
||||||
|
License: GPL
|
||||||
|
Group: System Environment/Daemons
|
||||||
|
URL: http://www.sflphone.org/
|
||||||
|
Packager: Cyrille Béraud <cyrille.beraud@savoirfairelinux.com>
|
||||||
|
Source0: http://www.sflphone.org/releases/%{name}-%{version}.tar.gz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
|
Requires: commoncpp2 ccrtp libosip2 libeXosip2 libsamplerate qt
|
||||||
|
|
||||||
|
%description
|
||||||
|
SFLPhoned is a VoIP daeamon with SIP protocol.
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --prefix=%{_prefix}
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -fr %{buildroot}
|
||||||
|
|
||||||
|
%makeinstall
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{_bindir}/sflphone
|
||||||
|
%{_libexecdir}/sflphoned
|
||||||
|
%{_libexecdir}/sflphone-qt
|
||||||
|
%{_libexecdir}/sflphone-cli
|
||||||
|
%{_datadir}/sflphone/ringtones/*
|
||||||
|
%{_datadir}/sflphone/skins/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Nov 30 2006 Yan Morin <yan.morin@savoirfairelinux.com>
|
||||||
|
Packaging sflphone for Fedora Core 6
|
||||||
|
|
||||||
|
* Wed Sep 6 2006 Yan Morin <yan.morin@savoirfairelinux.com>
|
||||||
|
Packaging sflphone, sflphone-qt and sflphone-cli
|
||||||
|
|
||||||
|
* Mon Nov 21 2005 Yan Morin <yan.morin@savoirfairelinux.com>
|
||||||
|
- Final 0.6.0 version (Release / Source without alphatag)
|
||||||
|
|
@ -37,7 +37,7 @@ sflphoned_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone
|
|||||||
|
|
||||||
#sflphoned_LDFLAGS = -static
|
#sflphoned_LDFLAGS = -static
|
||||||
sflphoned_LDADD = ./libsflphone.la $(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) $(IAX_LIBS) $(EXOSIP_LIBS)
|
sflphoned_LDADD = ./libsflphone.la $(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD) $(IAX_LIBS) $(EXOSIP_LIBS)
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(IAX_CFLAGS) $(USER_INCLUDES) $(SAMPLERATE_FLAG)
|
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(IAX_CFLAGS) $(USER_INCLUDES)
|
||||||
|
|
||||||
#libsflphone_la_LDFLAGS= -version-info 0:1:0
|
#libsflphone_la_LDFLAGS= -version-info 0:1:0
|
||||||
libsflphone_la_LIBADD = \
|
libsflphone_la_LIBADD = \
|
||||||
@ -46,7 +46,7 @@ libsflphone_la_LIBADD = \
|
|||||||
./audio/libaudio.la \
|
./audio/libaudio.la \
|
||||||
./gui/libguiframework.la \
|
./gui/libguiframework.la \
|
||||||
./config/libconfig.la \
|
./config/libconfig.la \
|
||||||
$(IAX_LIBS) $(SAMPLERATE_LIB)
|
$(IAX_LIBS)
|
||||||
|
|
||||||
libsflphone_la_SOURCES =
|
libsflphone_la_SOURCES =
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@ SUBDIRS = gsm
|
|||||||
noinst_LTLIBRARIES = libaudio.la
|
noinst_LTLIBRARIES = libaudio.la
|
||||||
|
|
||||||
if USE_SPEEX
|
if USE_SPEEX
|
||||||
SPEEX_SOURCES=CodecSpeex.cpp
|
SPEEX_SOURCES_CPP=CodecSpeex.cpp
|
||||||
SPEEX_FLAG=-DHAVE_SPEEX
|
SPEEX_FLAG=-DHAVE_SPEEX
|
||||||
SPEEX_LIB=-lspeex
|
SPEEX_LIB=-lspeex
|
||||||
else
|
else
|
||||||
SPEEX_SOURCES=
|
SPEEX_SOURCES_CPP=
|
||||||
SPEEX_FLAG=
|
SPEEX_FLAG=
|
||||||
SPEEX_LIB=
|
SPEEX_LIB=
|
||||||
endif
|
endif
|
||||||
@ -15,11 +15,11 @@ endif
|
|||||||
libaudio_la_SOURCES = alaw.cpp audiofile.cpp g711.cpp tonelist.cpp \
|
libaudio_la_SOURCES = alaw.cpp audiofile.cpp g711.cpp tonelist.cpp \
|
||||||
audiortp.cpp dtmf.cpp tone.cpp audiocodec.cpp audiolayer.cpp audiodevice.cpp dtmfgenerator.cpp gsmcodec.cpp \
|
audiortp.cpp dtmf.cpp tone.cpp audiocodec.cpp audiolayer.cpp audiodevice.cpp dtmfgenerator.cpp gsmcodec.cpp \
|
||||||
tonegenerator.cpp ulaw.cpp codecDescriptor.cpp \
|
tonegenerator.cpp ulaw.cpp codecDescriptor.cpp \
|
||||||
audioloop.cpp ringbuffer.cpp $(SPEEX_SOURCES)
|
audioloop.cpp ringbuffer.cpp $(SPEEX_SOURCES_CPP)
|
||||||
|
|
||||||
AM_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccrtp1_CFLAGS) $(USER_INCLUDES)
|
AM_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs $(libccext2_CFLAGS) $(libccrtp1_CFLAGS) $(USER_INCLUDES)
|
||||||
libaudio_la_LIBADD = gsm/libgsm.la $(SPEEX_LIB) $(SAMPLERATE_LIB)
|
libaudio_la_LIBADD = gsm/libgsm.la $(SPEEX_LIB)
|
||||||
libaudio_la_CPPFLAGS = $(SPEEX_FLAG) $(SAMPLERATE_FLAG)
|
libaudio_la_CPPFLAGS = $(SPEEX_FLAG)
|
||||||
|
|
||||||
|
|
||||||
noinst_HEADERS = audioloop.h common.h ringbuffer.h alaw.h audiofile.h g711.h \
|
noinst_HEADERS = audioloop.h common.h ringbuffer.h alaw.h audiofile.h g711.h \
|
||||||
|
@ -120,14 +120,15 @@ AudioLayer::openDevice (int indexIn, int indexOut, int sampleRate)
|
|||||||
_debug("Portaudio detect no sound card.");
|
_debug("Portaudio detect no sound card.");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (indexIn >= nbDevice) {
|
// not good,
|
||||||
_debug(" Portaudio auto-select device #0 for input because device #%02d is not found\n", indexIn);
|
// if (indexIn >= nbDevice) {
|
||||||
indexIn = 0;
|
// _debug(" Portaudio auto-select device #0 for input because device #%02d is not found\n", indexIn);
|
||||||
}
|
// indexIn = 0;
|
||||||
if (indexOut >= nbDevice) {
|
// }
|
||||||
_debug(" Portaudio auto-select device #0 for output because device #%02d is not found\n", indexOut);
|
// if (indexOut >= nbDevice) {
|
||||||
indexOut = 0;
|
// _debug(" Portaudio auto-select device #0 for output because device #%02d is not found\n", indexOut);
|
||||||
}
|
// indexOut = 0;
|
||||||
|
// }
|
||||||
|
|
||||||
_debug(" Setting audiolayer: device in=%2d, out=%2d\n", indexIn, indexOut);
|
_debug(" Setting audiolayer: device in=%2d, out=%2d\n", indexIn, indexOut);
|
||||||
_debug(" : nb channel in=%2d, out=%2d\n", _inChannel, _outChannel);
|
_debug(" : nb channel in=%2d, out=%2d\n", _inChannel, _outChannel);
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
libexec_PROGRAMS = sflphone-cli
|
libexec_PROGRAMS = sflphone-cli
|
||||||
|
|
||||||
#-lncurses
|
#-lncurses
|
||||||
AM_LDFLAGS = $(LIBREADLINE)
|
sflphone_cli_LDADD = $(LIBREADLINE)
|
||||||
|
#AM_LDFLAGS = $(LIBREADLINE)
|
||||||
sflphone_cli_SOURCES = \
|
sflphone_cli_SOURCES = \
|
||||||
calls.c calls.h \
|
calls.c calls.h \
|
||||||
commons.h \
|
commons.h \
|
||||||
|
@ -1584,6 +1584,8 @@ Montreal, Quebec H2T 1S6, Canada</p></string>
|
|||||||
<variables>
|
<variables>
|
||||||
<variable access="private">int lastSIPAccount;</variable>
|
<variable access="private">int lastSIPAccount;</variable>
|
||||||
<variable access="private">int _cutStringCombo;</variable>
|
<variable access="private">int _cutStringCombo;</variable>
|
||||||
|
<variable access="private">std::map < int, int > _deviceInMap</variable>
|
||||||
|
<variable access="private">std::map < int, int > _deviceOutMap</variable>
|
||||||
</variables>
|
</variables>
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
#include "SkinManager.hpp"
|
#include "SkinManager.hpp"
|
||||||
#include "TransparentWidget.hpp"
|
#include "TransparentWidget.hpp"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
#define SIGNALISATIONS_IMAGE "signalisations.png"
|
#define SIGNALISATIONS_IMAGE "signalisations.png"
|
||||||
#define AUDIO_IMAGE "audio.png"
|
#define AUDIO_IMAGE "audio.png"
|
||||||
#define PREFERENCES_IMAGE "preferences.png"
|
#define PREFERENCES_IMAGE "preferences.png"
|
||||||
@ -152,8 +154,35 @@ ConfigurationPanel::generate()
|
|||||||
pulseLength->setValue(ConfigurationManager::instance().get(SIGNALISATION_SECTION,
|
pulseLength->setValue(ConfigurationManager::instance().get(SIGNALISATION_SECTION,
|
||||||
SIGNALISATION_PULSE_LENGTH).toUInt());
|
SIGNALISATION_PULSE_LENGTH).toUInt());
|
||||||
|
|
||||||
cboDriverChoiceOut->setCurrentItem(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT).toUInt());
|
|
||||||
cboDriverChoiceIn->setCurrentItem(ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN).toUInt());
|
// select the position index (combobox of the device index)
|
||||||
|
// deviceIndexOut can be 8, but be at position 0 in the combo box
|
||||||
|
int deviceIndexOut = ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT).toInt();
|
||||||
|
int deviceIndexIn = ConfigurationManager::instance().get(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN).toInt();
|
||||||
|
int positionIndexIn = 0;
|
||||||
|
int positionIndexOut = 0;
|
||||||
|
|
||||||
|
// search for deviceIndexIn, and get the positionIndex (key)
|
||||||
|
std::map< int, int >::iterator it = _deviceInMap.begin();
|
||||||
|
while (it != _deviceInMap.end()) {
|
||||||
|
if ( it->second == deviceIndexIn) {
|
||||||
|
// we found the deviceIndex
|
||||||
|
positionIndexIn = it->first;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
it++;
|
||||||
|
}
|
||||||
|
it = _deviceOutMap.begin();
|
||||||
|
while (it != _deviceOutMap.end()) {
|
||||||
|
if ( it->second == deviceIndexOut) {
|
||||||
|
// we found the deviceIndex
|
||||||
|
positionIndexOut = it->first;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
it++;
|
||||||
|
}
|
||||||
|
cboDriverChoiceIn->setCurrentItem(positionIndexIn);
|
||||||
|
cboDriverChoiceOut->setCurrentItem(positionIndexOut);
|
||||||
|
|
||||||
// fill cboDriverRate here
|
// fill cboDriverRate here
|
||||||
int nbRate = 5;
|
int nbRate = 5;
|
||||||
@ -195,11 +224,17 @@ void ConfigurationPanel::saveSlot()
|
|||||||
if (ringsChoice->currentText() != NULL) {
|
if (ringsChoice->currentText() != NULL) {
|
||||||
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_RINGTONE, ringsChoice->currentText());
|
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_RINGTONE, ringsChoice->currentText());
|
||||||
}
|
}
|
||||||
|
int cboPosition = 0;
|
||||||
|
int deviceIndex = 0;
|
||||||
if (cboDriverChoiceOut->currentText() != NULL) {
|
if (cboDriverChoiceOut->currentText() != NULL) {
|
||||||
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT, QString::number(cboDriverChoiceOut->currentItem()));
|
cboPosition = cboDriverChoiceOut->currentItem();
|
||||||
|
deviceIndex = _deviceOutMap[cboPosition]; // return 0 if not found and create it, by STL
|
||||||
|
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT, QString::number(deviceIndex));
|
||||||
}
|
}
|
||||||
if (cboDriverChoiceIn->currentText() != NULL) {
|
if (cboDriverChoiceIn->currentText() != NULL) {
|
||||||
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN, QString::number(cboDriverChoiceIn->currentItem()));
|
cboPosition = cboDriverChoiceIn->currentItem();
|
||||||
|
deviceIndex = _deviceInMap[cboPosition]; // return 0 if not found and create it, by STL
|
||||||
|
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN, QString::number(deviceIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkinManager::instance().load(SkinChoice->currentText());
|
SkinManager::instance().load(SkinChoice->currentText());
|
||||||
@ -307,7 +342,9 @@ void ConfigurationPanel::updateAudioDevicesIn()
|
|||||||
std::list< AudioDevice > audio = ConfigurationManager::instance().getAudioDevicesIn();
|
std::list< AudioDevice > audio = ConfigurationManager::instance().getAudioDevicesIn();
|
||||||
std::list< AudioDevice >::iterator pos;
|
std::list< AudioDevice >::iterator pos;
|
||||||
cbo->clear();
|
cbo->clear();
|
||||||
|
_deviceInMap.clear();
|
||||||
|
|
||||||
|
int iPos = 0;
|
||||||
for (pos = audio.begin(); pos != audio.end(); pos++) {
|
for (pos = audio.begin(); pos != audio.end(); pos++) {
|
||||||
QString hostApiName = pos->hostApiName;
|
QString hostApiName = pos->hostApiName;
|
||||||
QString deviceName = pos->deviceName;
|
QString deviceName = pos->deviceName;
|
||||||
@ -317,6 +354,8 @@ void ConfigurationPanel::updateAudioDevicesIn()
|
|||||||
}
|
}
|
||||||
QString name = hostApiName + QObject::tr(" (device #%1-%2Hz)").arg(pos->index).arg(pos->defaultRate);
|
QString name = hostApiName + QObject::tr(" (device #%1-%2Hz)").arg(pos->index).arg(pos->defaultRate);
|
||||||
cbo->insertItem(name);
|
cbo->insertItem(name);
|
||||||
|
_deviceInMap[iPos] = pos->index.toInt();
|
||||||
|
iPos++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +370,9 @@ void ConfigurationPanel::updateAudioDevices()
|
|||||||
std::list< AudioDevice > audio = ConfigurationManager::instance().getAudioDevicesOut();
|
std::list< AudioDevice > audio = ConfigurationManager::instance().getAudioDevicesOut();
|
||||||
std::list< AudioDevice >::iterator pos;
|
std::list< AudioDevice >::iterator pos;
|
||||||
cbo->clear();
|
cbo->clear();
|
||||||
|
_deviceOutMap.clear();
|
||||||
|
|
||||||
|
int iPos = 0;
|
||||||
for (pos = audio.begin(); pos != audio.end(); pos++) {
|
for (pos = audio.begin(); pos != audio.end(); pos++) {
|
||||||
QString hostApiName = pos->hostApiName;
|
QString hostApiName = pos->hostApiName;
|
||||||
QString deviceName = pos->deviceName;
|
QString deviceName = pos->deviceName;
|
||||||
@ -342,6 +383,8 @@ void ConfigurationPanel::updateAudioDevices()
|
|||||||
//DebugOutput::instance() << hostApiName << pos->defaultRate;
|
//DebugOutput::instance() << hostApiName << pos->defaultRate;
|
||||||
QString name = hostApiName + QObject::tr(" (device #%1-%2Hz)").arg(pos->index).arg(pos->defaultRate);
|
QString name = hostApiName + QObject::tr(" (device #%1-%2Hz)").arg(pos->index).arg(pos->defaultRate);
|
||||||
cbo->insertItem(name);
|
cbo->insertItem(name);
|
||||||
|
_deviceOutMap[iPos] = pos->index.toInt();
|
||||||
|
iPos++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,11 +422,17 @@ void
|
|||||||
ConfigurationPanel::slotTestSoundDriver()
|
ConfigurationPanel::slotTestSoundDriver()
|
||||||
{
|
{
|
||||||
// save driver in configuration manager
|
// save driver in configuration manager
|
||||||
|
int cboPosition = 0;
|
||||||
|
int deviceIndex = 0;
|
||||||
if (cboDriverChoiceOut->currentText() != NULL) {
|
if (cboDriverChoiceOut->currentText() != NULL) {
|
||||||
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT, QString::number(cboDriverChoiceOut->currentItem()));
|
cboPosition = cboDriverChoiceOut->currentItem();
|
||||||
|
deviceIndex = _deviceOutMap[cboPosition]; // return 0 if not found and create it, by STL
|
||||||
|
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEOUT, QString::number(deviceIndex));
|
||||||
}
|
}
|
||||||
if (cboDriverChoiceIn->currentText() != NULL) {
|
if (cboDriverChoiceIn->currentText() != NULL) {
|
||||||
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN, QString::number(cboDriverChoiceIn->currentItem()));
|
cboPosition = cboDriverChoiceIn->currentItem();
|
||||||
|
deviceIndex = _deviceInMap[cboPosition]; // return 0 if not found and create it, by STL
|
||||||
|
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_DEFAULT_DEVICEIN, QString::number(deviceIndex));
|
||||||
}
|
}
|
||||||
if (cboDriverRate->currentText() != NULL) {
|
if (cboDriverRate->currentText() != NULL) {
|
||||||
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_SAMPLERATE, cboDriverRate->currentText());
|
ConfigurationManager::instance().set(AUDIO_SECTION, AUDIO_SAMPLERATE, cboDriverRate->currentText());
|
||||||
|
@ -1,117 +1,117 @@
|
|||||||
libexec_PROGRAMS = sflphone-qt
|
libexec_PROGRAMS = sflphone-qt
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
BUILT_SOURCES = \
|
||||||
./ConfigurationPanelui.cpp \
|
ConfigurationPanelui.cpp \
|
||||||
./ConfigurationPanel.h \
|
ConfigurationPanel.h \
|
||||||
./ConfigurationPanelmocpp.cpp \
|
ConfigurationPanelmocpp.cpp \
|
||||||
./ConfigurationManagerImplmoc.cpp \
|
ConfigurationManagerImplmoc.cpp \
|
||||||
./ConfigurationPanelImplmoc.cpp \
|
ConfigurationPanelImplmoc.cpp \
|
||||||
./JPushButtonmoc.cpp \
|
JPushButtonmoc.cpp \
|
||||||
./Launchermoc.cpp \
|
Launchermoc.cpp \
|
||||||
./NumericKeypadmoc.cpp \
|
NumericKeypadmoc.cpp \
|
||||||
./PhoneLinemoc.cpp \
|
PhoneLinemoc.cpp \
|
||||||
./PhoneLineButtonmoc.cpp \
|
PhoneLineButtonmoc.cpp \
|
||||||
./PhoneLineManagerImplmoc.cpp \
|
PhoneLineManagerImplmoc.cpp \
|
||||||
./SFLLcdmoc.cpp \
|
SFLLcdmoc.cpp \
|
||||||
./SFLPhoneAppmoc.cpp \
|
SFLPhoneAppmoc.cpp \
|
||||||
./SFLPhoneWindowmoc.cpp \
|
SFLPhoneWindowmoc.cpp \
|
||||||
./SFLRequestmoc.cpp \
|
SFLRequestmoc.cpp \
|
||||||
./Requestmoc.cpp \
|
Requestmoc.cpp \
|
||||||
./Sessionmoc.cpp \
|
Sessionmoc.cpp \
|
||||||
./SessionIOmoc.cpp \
|
SessionIOmoc.cpp \
|
||||||
./TCPSessionIOmoc.cpp \
|
TCPSessionIOmoc.cpp \
|
||||||
./TransparentWidgetmoc.cpp \
|
TransparentWidgetmoc.cpp \
|
||||||
./VolumeControlmoc.cpp \
|
VolumeControlmoc.cpp \
|
||||||
./qmake_image_collection.cpp
|
qmake_image_collection.cpp
|
||||||
|
|
||||||
IMAGES = $(top_srcdir)/images/*.png
|
IMAGES = $(top_srcdir)/images/*.png
|
||||||
|
|
||||||
sflphone_qt_SOURCES = \
|
sflphone_qt_SOURCES = \
|
||||||
$(BUILT_SOURCES) \
|
$(BUILT_SOURCES) \
|
||||||
./Account.cpp \
|
Account.cpp \
|
||||||
./Account.hpp \
|
Account.hpp \
|
||||||
./Call.cpp \
|
Call.cpp \
|
||||||
./Call.hpp \
|
Call.hpp \
|
||||||
./CallManager.hpp \
|
CallManager.hpp \
|
||||||
./CallManagerImpl.cpp \
|
CallManagerImpl.cpp \
|
||||||
./CallManagerImpl.hpp \
|
CallManagerImpl.hpp \
|
||||||
./CallStatus.cpp \
|
CallStatus.cpp \
|
||||||
./CallStatus.hpp \
|
CallStatus.hpp \
|
||||||
./EventAccount.cpp \
|
EventAccount.cpp \
|
||||||
./EventAccount.hpp \
|
EventAccount.hpp \
|
||||||
./CallStatusFactory.hpp \
|
CallStatusFactory.hpp \
|
||||||
./ConfigurationManager.hpp \
|
ConfigurationManager.hpp \
|
||||||
./ConfigurationManagerImpl.cpp \
|
ConfigurationManagerImpl.cpp \
|
||||||
./ConfigurationManagerImpl.hpp \
|
ConfigurationManagerImpl.hpp \
|
||||||
./ConfigurationPanelImpl.cpp \
|
ConfigurationPanelImpl.cpp \
|
||||||
./ConfigurationPanelImpl.hpp \
|
ConfigurationPanelImpl.hpp \
|
||||||
./DebugOutput.hpp \
|
DebugOutput.hpp \
|
||||||
./DebugOutputImpl.cpp \
|
DebugOutputImpl.cpp \
|
||||||
./DebugOutputImpl.hpp \
|
DebugOutputImpl.hpp \
|
||||||
./Event.cpp \
|
Event.cpp \
|
||||||
./Event.hpp \
|
Event.hpp \
|
||||||
./EventFactory.hpp \
|
EventFactory.hpp \
|
||||||
./EventFactory.inl \
|
EventFactory.inl \
|
||||||
./Factory.hpp \
|
Factory.hpp \
|
||||||
./Factory.inl \
|
Factory.inl \
|
||||||
./JPushButton.cpp JPushButton.hpp \
|
JPushButton.cpp JPushButton.hpp \
|
||||||
./Launcher.cpp \
|
Launcher.cpp \
|
||||||
./Launcher.hpp \
|
Launcher.hpp \
|
||||||
./NumericKeypad.cpp \
|
NumericKeypad.cpp \
|
||||||
./NumericKeypad.hpp \
|
NumericKeypad.hpp \
|
||||||
./ObjectFactory.hpp \
|
ObjectFactory.hpp \
|
||||||
./ObjectFactory.inl \
|
ObjectFactory.inl \
|
||||||
./ObjectPool.hpp \
|
ObjectPool.hpp \
|
||||||
./ObjectPool.inl \
|
ObjectPool.inl \
|
||||||
./PhoneLine.cpp \
|
PhoneLine.cpp \
|
||||||
./PhoneLine.hpp \
|
PhoneLine.hpp \
|
||||||
./PhoneLineButton.cpp \
|
PhoneLineButton.cpp \
|
||||||
./PhoneLineButton.hpp \
|
PhoneLineButton.hpp \
|
||||||
./PhoneLineLocker.cpp \
|
PhoneLineLocker.cpp \
|
||||||
./PhoneLineLocker.hpp \
|
PhoneLineLocker.hpp \
|
||||||
./PhoneLineManager.hpp \
|
PhoneLineManager.hpp \
|
||||||
./PhoneLineManagerImpl.cpp \
|
PhoneLineManagerImpl.cpp \
|
||||||
./PhoneLineManagerImpl.hpp \
|
PhoneLineManagerImpl.hpp \
|
||||||
./QjListBoxPixmap.cpp \
|
QjListBoxPixmap.cpp \
|
||||||
./QjListBoxPixmap.hpp \
|
QjListBoxPixmap.hpp \
|
||||||
./Request.cpp \
|
Request.cpp \
|
||||||
./Request.hpp \
|
Request.hpp \
|
||||||
./Requester.hpp \
|
Requester.hpp \
|
||||||
./RequesterImpl.cpp \
|
RequesterImpl.cpp \
|
||||||
./RequesterImpl.hpp \
|
RequesterImpl.hpp \
|
||||||
./RequesterImpl.inl \
|
RequesterImpl.inl \
|
||||||
./SFLCallStatus.hpp \
|
SFLCallStatus.hpp \
|
||||||
./SFLEvents.cpp \
|
SFLEvents.cpp \
|
||||||
./SFLEvents.hpp \
|
SFLEvents.hpp \
|
||||||
./SFLLcd.cpp \
|
SFLLcd.cpp \
|
||||||
./SFLLcd.hpp \
|
SFLLcd.hpp \
|
||||||
./SFLPhoneApp.cpp \
|
SFLPhoneApp.cpp \
|
||||||
./SFLPhoneApp.hpp \
|
SFLPhoneApp.hpp \
|
||||||
./SFLPhoneWindow.cpp \
|
SFLPhoneWindow.cpp \
|
||||||
./SFLPhoneWindow.hpp \
|
SFLPhoneWindow.hpp \
|
||||||
./SFLRequest.cpp \
|
SFLRequest.cpp \
|
||||||
./SFLRequest.hpp \
|
SFLRequest.hpp \
|
||||||
./Session.cpp \
|
Session.cpp \
|
||||||
./Session.hpp \
|
Session.hpp \
|
||||||
./SessionFactory.hpp \
|
SessionFactory.hpp \
|
||||||
./SessionIO.hpp \
|
SessionIO.hpp \
|
||||||
./SessionIOFactory.hpp \
|
SessionIOFactory.hpp \
|
||||||
./SkinManager.hpp \
|
SkinManager.hpp \
|
||||||
./SkinManagerImpl.cpp \
|
SkinManagerImpl.cpp \
|
||||||
./SkinManagerImpl.hpp \
|
SkinManagerImpl.hpp \
|
||||||
./TCPSessionIO.cpp \
|
TCPSessionIO.cpp \
|
||||||
./TCPSessionIO.hpp \
|
TCPSessionIO.hpp \
|
||||||
./TCPSessionIOCreator.cpp \
|
TCPSessionIOCreator.cpp \
|
||||||
./TCPSessionIOCreator.hpp \
|
TCPSessionIOCreator.hpp \
|
||||||
./TransparentWidget.cpp \
|
TransparentWidget.cpp \
|
||||||
./TransparentWidget.hpp \
|
TransparentWidget.hpp \
|
||||||
./Url.cpp \
|
Url.cpp \
|
||||||
./Url.hpp \
|
Url.hpp \
|
||||||
./VolumeControl.cpp \
|
VolumeControl.cpp \
|
||||||
./VolumeControl.hpp \
|
VolumeControl.hpp \
|
||||||
./globals.h \
|
globals.h \
|
||||||
./main.cpp \
|
main.cpp \
|
||||||
./ConfigurationPanel.ui.h
|
ConfigurationPanel.ui.h
|
||||||
|
|
||||||
CLEANFILES = \
|
CLEANFILES = \
|
||||||
$(BUILT_SOURCES)
|
$(BUILT_SOURCES)
|
||||||
@ -122,6 +122,8 @@ sflphone_qt_LDADD = $(top_srcdir)/libs/taxidermy/libtaxidermy.la $(QT_LIBS)
|
|||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/libs/ $(QT_CXXFLAGS) $(X_INCLUDES) $(all_includes)
|
AM_CPPFLAGS = -I$(top_srcdir)/libs/ $(QT_CXXFLAGS) $(X_INCLUDES) $(all_includes)
|
||||||
AM_LDFLAGS = $(QT_LDADD) $(X_LDFLAGS) $(all_libraries)
|
AM_LDFLAGS = $(QT_LDADD) $(X_LDFLAGS) $(all_libraries)
|
||||||
|
#AM_CPPFLAGS = -I$(top_srcdir)/libs $(QT_CXXFLAGS)
|
||||||
|
#sflphone_qt_LDADD = $(QT_LDADD)
|
||||||
|
|
||||||
|
|
||||||
qmake_image_collection.cpp: $(IMAGES)
|
qmake_image_collection.cpp: $(IMAGES)
|
||||||
|
@ -1018,7 +1018,7 @@ ManagerImpl::initConfigFile (void)
|
|||||||
fill_config_int(SEND_DTMF_AS, SIP_INFO_STR);
|
fill_config_int(SEND_DTMF_AS, SIP_INFO_STR);
|
||||||
|
|
||||||
section = AUDIO;
|
section = AUDIO;
|
||||||
fill_config_int(DRIVER_NAME, DFT_DRIVER_STR);
|
//fill_config_int(DRIVER_NAME, DFT_DRIVER_STR);
|
||||||
fill_config_int(DRIVER_NAME_IN, DFT_DRIVER_STR);
|
fill_config_int(DRIVER_NAME_IN, DFT_DRIVER_STR);
|
||||||
fill_config_int(DRIVER_NAME_OUT, DFT_DRIVER_STR);
|
fill_config_int(DRIVER_NAME_OUT, DFT_DRIVER_STR);
|
||||||
fill_config_int(DRIVER_SAMPLE_RATE, DRIVER_SAMPLE_RATE_DEFAULT);
|
fill_config_int(DRIVER_SAMPLE_RATE, DRIVER_SAMPLE_RATE_DEFAULT);
|
||||||
@ -1081,7 +1081,7 @@ ManagerImpl::initAudioDriver(void)
|
|||||||
void
|
void
|
||||||
ManagerImpl::selectAudioDriver (void)
|
ManagerImpl::selectAudioDriver (void)
|
||||||
{
|
{
|
||||||
int noDevice = getConfigInt(AUDIO, DRIVER_NAME);
|
//int noDevice = getConfigInt(AUDIO, DRIVER_NAME);
|
||||||
int noDeviceIn = getConfigInt(AUDIO, DRIVER_NAME_IN);
|
int noDeviceIn = getConfigInt(AUDIO, DRIVER_NAME_IN);
|
||||||
int noDeviceOut = getConfigInt(AUDIO, DRIVER_NAME_OUT);
|
int noDeviceOut = getConfigInt(AUDIO, DRIVER_NAME_OUT);
|
||||||
int sampleRate = getConfigInt(AUDIO, DRIVER_SAMPLE_RATE);
|
int sampleRate = getConfigInt(AUDIO, DRIVER_SAMPLE_RATE);
|
||||||
@ -1092,9 +1092,10 @@ ManagerImpl::selectAudioDriver (void)
|
|||||||
// this is when no audio device in/out are set
|
// this is when no audio device in/out are set
|
||||||
// or the audio device in/out are set to 0
|
// or the audio device in/out are set to 0
|
||||||
// we take the nodevice instead
|
// we take the nodevice instead
|
||||||
if (noDeviceIn == 0 && noDeviceOut == 0) {
|
// remove this hack, how can we change the device to 0, if the noDevice is 1?
|
||||||
noDeviceIn = noDeviceOut = noDevice;
|
//if (noDeviceIn == 0 && noDeviceOut == 0) {
|
||||||
}
|
// noDeviceIn = noDeviceOut = noDevice;
|
||||||
|
//}
|
||||||
_debugInit(" AudioLayer Opening Device");
|
_debugInit(" AudioLayer Opening Device");
|
||||||
_audiodriver->setErrorMessage("");
|
_audiodriver->setErrorMessage("");
|
||||||
_audiodriver->openDevice(noDeviceIn, noDeviceOut, sampleRate);
|
_audiodriver->openDevice(noDeviceIn, noDeviceOut, sampleRate);
|
||||||
|
Reference in New Issue
Block a user