Commit 540715f9 authored by smorlat's avatar smorlat

update README.mingw

work in progress in equalizer.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@531 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 4e764810
Software to install
*******************
* mingw32
* msys
* automake*/autoconf*/libtool , uncompress in /
* gcc-part-core-4.3 gcc-part-c++-4.3, uncompress in /mingw
* download unzip for mingw
* gtk+bundle, uncompress in /usr/local
* libglade and libglade-dev >=2.6.3 from gnome ftp, uncompress in /usr/local
* download and install ActiveState perl
* linphone-deps from linphone website, uncompress in /usr/local
* install zip and unzip from http://www.info-zip.org/Zip.html#Downloads
* download unzip from mingw downloads, uncompress in /mingw
* install zip from http://www.info-zip.org/Zip.html#Downloads
(quicklink: ftp://ftp.dante.de/tex-archive/tools/zip/info-zip/WIN32/zip232xN.zip), and extract zip.exe to c:\msys\1.0\usr\local\bin
* gtk+bundle from http://www.gtk.org , uncompress in /usr/local
* libglade and libglade-dev >=2.6.3 from gnome ftp:
http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade-dev_2.6.3-1_win32.zip
http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade_2.6.3-1_win32.zip
uncompress in /usr/local
* download ActiveState perl and run the installer with default options.
* download lastest linphone-deps from linphone downloads, misc directory:
http://download.savannah.gnu.org/releases-noredirect/linphone/misc/)
uncompress in /usr/local
Building
********
......@@ -42,7 +50,7 @@ make
#make a binary zip of this plugin
make zip
cd coreapi/plugins/buddyloolup
cd coreapi/plugins/buddylookup
./autogen.sh
PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
make
......@@ -53,6 +61,12 @@ make zip
******************************************************
* Notes about linphone-deps generation *
******************************************************
Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
to find as windows binaries.
These notes are useful if you want to upgrade part of the software that is included in the
linphone-deps packages.
List of software included in linphone-deps:
libosip2 (compiled)
libeXosip2 (compiled)
......@@ -67,10 +81,14 @@ libxml2 (compiled)
libsoup (compiled)
- build ffmpeg
./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
make install DESTDIR=/c/output/
Copy to linphone-deps/
Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls.
- build libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup (that requires libxml2).
- building ffmpeg
./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
make install DESTDIR=/c/output/
Copy to linphone-deps/
Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls.
- building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup
(that requires libxml2).
./configure --enable-shared --disable-static && make && make install DESTDIR=/c/output
......@@ -18,6 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <mediastreamer2/msfilter.h>
#include <mediastreamer2/dsptools.h>
#define GAIN_ZERODB 22000
typedef struct _EqualizerState{
......@@ -28,11 +31,19 @@ typedef struct _EqualizerState{
int16_t *fir;
} EqualizerState;
static EqualizerState * equalizer_state_new(){
static void equalizer_flatten(EqualizerState *s){
int i;
for(i=0;i<s->nfft;i+=2)
s->fft_cpx[i]=GAIN_ZERODB;
}
static EqualizerState * equalizer_state_new(int nfft){
EqualizerState *s=ms_new0(EqualizerState,1);
int i;
s->rate=8000;
s->nfft=128;
s->nfft=nfft;
s->fft_cpx=ms_new0(int16_t,s->nfft);
equalizer_flatten(s);
s->fir_len=s->nfft;
s->fir=ms_new(int16_t,s->fir_len);
}
......@@ -83,3 +94,27 @@ static int16_t equalizer_set(EqualizerState *s, int freqhz, float gain){
s->fft_cpx[i*2]=gain_int16(gain);
}
}
static void dump_table(int16_t *t, int len){
int i;
for(i=0;i<len;i++)
ms_message("[%i]\t%i",i,t[i]);
}
static void apodize(int16_t *s, int len){
int i;
float x;
for(i=0;i<len;++i){
x=(float)i/
s[i]=cos
}
}
static void equalizer_compute_impulse_response(EqualizerState *s){
void *fft_handle=ms_fft_init(s->nfft);
ms_ifft(fft_handle,s->fft_cpx,s->fir);
ms_message("Inverse fft result:");
dump_table(s->fir,s->fir_len);
apodize(s->fir,s->fir_len);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment