diff --git a/configure.in b/configure.in index 132db4e6..2bff1d55 100755 --- a/configure.in +++ b/configure.in @@ -52,6 +52,10 @@ dnl Checks for some external libraries that need to be installed AC_LANG(C++) +dnl CELT ------------------------------------------------------------------------ +AC_DEFINE([USE_ALLOCA], [], [Make use of alloca]) + + dnl QT4 ------------------------------------------------------------------------- dnl The QT4 check code was taken from the FreeMat-3.0 code by Samit Basu PKG_CHECK_MODULES(QT, QtCore QtGui QtNetwork QtXml >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no") diff --git a/linux/Makefile.am b/linux/Makefile.am index 07796908..ba739fd5 100755 --- a/linux/Makefile.am +++ b/linux/Makefile.am @@ -1,10 +1,3 @@ -# First compile additional libraries where the code is in our repository ------- -# CELT -SUBDIRS = ../libs/celt/libcelt - -LIB_INCL_DIRS = -I../libs/celt/libcelt - -# Now we can deal with the actual llcon code ----------------------------------- bin_PROGRAMS = llcon llcon_SOURCES = ../src/buffer.cpp \ @@ -26,6 +19,27 @@ llcon_SOURCES = ../src/buffer.cpp \ ../src/serverlogging.cpp \ ../src/soundbase.cpp \ sound.cpp \ + ../libs/celt/bands.c \ + ../libs/celt/celt.c \ + ../libs/celt/cwrs.c \ + ../libs/celt/ecintrin.h \ + ../libs/celt/entcode.c \ + ../libs/celt/entdec.c \ + ../libs/celt/entenc.c \ + ../libs/celt/header.c \ + ../libs/celt/kfft_single.c \ + ../libs/celt/kiss_fft.c \ + ../libs/celt/kiss_fftr.c \ + ../libs/celt/laplace.c \ + ../libs/celt/mdct.c \ + ../libs/celt/modes.c \ + ../libs/celt/pitch.c \ + ../libs/celt/psy.c \ + ../libs/celt/quant_bands.c \ + ../libs/celt/rangedec.c \ + ../libs/celt/rangeenc.c \ + ../libs/celt/rate.c \ + ../libs/celt/vq.c ../src/buffer.h \ ../src/global.h \ ../src/socket.h \ @@ -51,6 +65,36 @@ llcon_SOURCES = ../src/buffer.cpp \ ../src/chatdlgbase.ui \ ../src/aboutdlgbase.ui \ sound.h \ + ../libs/celt/celt.h \ + ../libs/celt/celt_types.h \ + ../libs/celt/celt_header.h + ../libs/celt/_kiss_fft_guts.h \ + ../libs/celt/arch.h \ + ../libs/celt/bands.h \ + ../libs/celt/fixed_c5x.h \ + ../libs/celt/fixed_c6x.h \ + ../libs/celt/cwrs.h \ + ../libs/celt/ecintrin.h \ + ../libs/celt/entcode.h \ + ../libs/celt/entdec.h \ + ../libs/celt/entenc.h \ + ../libs/celt/fixed_generic.h \ + ../libs/celt/float_cast.h \ + ../libs/celt/kfft_double.h \ + ../libs/celt/kfft_single.h \ + ../libs/celt/kiss_fft.h \ + ../libs/celt/kiss_fftr.h \ + ../libs/celt/laplace.h \ + ../libs/celt/mdct.h \ + ../libs/celt/mfrngcod.h \ + ../libs/celt/mathops.h \ + ../libs/celt/modes.h \ + ../libs/celt/os_support.h \ + ../libs/celt/pitch.h \ + ../libs/celt/psy.h \ + ../libs/celt/quant_bands.h \ + ../libs/celt/rate.h \ + ../libs/celt/stack_alloc.h vq.h ../src/resources.qrc \ ../src/res/gig.png \ ../src/res/mainicon.png \ @@ -190,4 +234,4 @@ moc/resources.cpp: ../src/resources.qrc $(QT_RCC) ../src/resources.qrc -o moc/resources.cpp -llcon_CXXFLAGS=-I../src $(LIB_INCL_DIRS) $(QT_CFLAGS) -DQT_THREAD_SUPPORT -D_REENTRANT -g +llcon_CXXFLAGS=-I../src -I../libs/celt $(LIB_INCL_DIRS) $(QT_CFLAGS) -DQT_THREAD_SUPPORT -D_REENTRANT -g diff --git a/src/server.cpp b/src/server.cpp index e34c14c2..be9ea44e 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -112,6 +112,17 @@ CServer::CServer ( const QString& strLoggingFileName, { int i; + // create CELT encoder/decoder for each channel + for ( i = 0; i < USED_NUM_CHANNELS; i++ ) + { + // init audio endocder/decoder (mono) + CeltMode[i] = celt_mode_create ( + SYSTEM_SAMPLE_RATE, 1, SYSTEM_BLOCK_FRAME_SAMPLES, NULL ); + + CeltEncoder[i] = celt_encoder_create ( CeltMode[i] ); + CeltDecoder[i] = celt_decoder_create ( CeltMode[i] ); + } + // enable all channels (for the server all channel must be enabled the // entire life time of the software for ( i = 0; i < USED_NUM_CHANNELS; i++ ) @@ -164,17 +175,6 @@ CServer::CServer ( const QString& strLoggingFileName, QString().number( static_cast ( iPortNumber ) ) ); } - // create CELT encoder/decoder for each channel - for ( i = 0; i < USED_NUM_CHANNELS; i++ ) - { - // init audio endocder/decoder (mono) - CeltMode[i] = celt_mode_create ( - SYSTEM_SAMPLE_RATE, 1, SYSTEM_BLOCK_FRAME_SAMPLES, NULL ); - - CeltEncoder[i] = celt_encoder_create ( CeltMode[i] ); - CeltDecoder[i] = celt_decoder_create ( CeltMode[i] ); - } - // connections ------------------------------------------------------------- // connect timer timeout signal diff --git a/windows/llcon.vcproj b/windows/llcon.vcproj index 89ac47a2..c3f23b02 100755 --- a/windows/llcon.vcproj +++ b/windows/llcon.vcproj @@ -48,7 +48,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -