From: drowe67 Date: Tue, 1 Jul 2014 04:08:12 +0000 (+0000) Subject: removing a bunch of old unused directories X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=c35f16f450fd56b821922bfee17cf5fcc8d5a039;p=freetel-svn-tracking.git removing a bunch of old unused directories git-svn-id: https://svn.code.sf.net/p/freetel/code@1720 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/CMakeLists.txt b/codec2-dev/CMakeLists.txt index ae10d9c2..c98bb330 100644 --- a/codec2-dev/CMakeLists.txt +++ b/codec2-dev/CMakeLists.txt @@ -84,7 +84,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall") #a option(BUILD_SHARED_LIBS "Build shared library. Set to OFF for static library." ON) -option(UNITTEST "Build unittest binaries." OFF) +option(UNITTEST "Build unittest binaries." ON) option(INSTALL_EXAMPLES "Install example code." OFF) if(INSTALL_EXAMPLES) install(DIRECTORY octave raw script voicing wav diff --git a/codec2-dev/README_fdmdv.txt b/codec2-dev/README_fdmdv.txt index 81c8c4df..110703a0 100644 --- a/codec2-dev/README_fdmdv.txt +++ b/codec2-dev/README_fdmdv.txt @@ -33,7 +33,7 @@ $ cd src 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 - + $ ./fdmdv_get_test_bits - 14000 | ./fdmdv_mod - - | ./fdmdv_demod - - 14 demod_dump.txt | ./fdmdv_put_test_bits - Use Octave to look at plots of 1 second (1400 bits) of modem operation: diff --git a/codec2-dev/fltk/Makefile b/codec2-dev/fltk/Makefile deleted file mode 100644 index f29d2cd6..00000000 --- a/codec2-dev/fltk/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/codec2-dev/fltk/fl_fdmdv.cxx b/codec2-dev/fltk/fl_fdmdv.cxx deleted file mode 100644 index 30c67aab..00000000 --- a/codec2-dev/fltk/fl_fdmdv.cxx +++ /dev/null @@ -1,1158 +0,0 @@ -/* - fl_fdmdv.cxx - Created 14 June 2012 - David Rowe - - Fltk 1.3 based GUI program to prototype FDMDV & Codec 2 integration - issues such as: - - + spectrum, waterfall, and other FDMDV GUI displays - + integration with real time audio I/O using portaudio - + what we do with audio when out of sync -*/ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "portaudio.h" - -#include "fdmdv.h" -#include "codec2.h" - -#define MIN_DB -40.0 -#define MAX_DB 0.0 -#define BETA 0.1 // constant for time averageing spectrum data -#define MIN_HZ 0 -#define MAX_HZ 4000 -#define WATERFALL_SECS_Y 5 // number of seconds respresented by y axis of waterfall -#define DT 0.02 // time between samples -#define FS 8000 // FDMDV modem sample rate - -#define SCATTER_MEM (FDMDV_NSYM)*50 -#define SCATTER_X_MAX 3.0 -#define SCATTER_Y_MAX 3.0 - -// main window params - -#define W 1200 -#define W3 (W/3) -#define H 600 -#define H2 (H/2) -#define SP 20 - -// sound card - -#define SAMPLE_RATE 48000 /* 48 kHz sampling rate rec. as we - can trust accuracy of sound - card */ -#define N8 FDMDV_NOM_SAMPLES_PER_FRAME /* processing buffer size at 8 kHz */ -#define MEM8 (FDMDV_OS_TAPS/FDMDV_OS) -#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 */ - -#define BITS_PER_CODEC_FRAME (2*FDMDV_BITS_PER_FRAME) -#define BYTES_PER_CODEC_FRAME (BITS_PER_CODEC_FRAME/8) - -// forward class declarations - -class Spectrum; -class Waterfall; -class Scatter; -class Scalar; - -// Globals -------------------------------------- - -char *fin_name = NULL; -char *fout_name = NULL; -char *sound_dev_name = NULL; -FILE *fin = NULL; -FILE *fout = NULL; -struct FDMDV *fdmdv; -struct CODEC2 *codec2; -float av_mag[FDMDV_NSPEC]; // shared between a few classes - -// GUI variables -------------------------------- - -Fl_Group *agroup; -Fl_Window *window; -Fl_Window *zoomSpectrumWindow = NULL; -Fl_Window *zoomWaterfallWindow = NULL; -Spectrum *aSpectrum; -Spectrum *aZoomedSpectrum; -Waterfall *aWaterfall; -Waterfall *aZoomedWaterfall; -Scatter *aScatter; -Scalar *aTimingEst; -Scalar *aFreqEst; -Scalar *aSNR; -int zoom_spectrum = 0; - -// Main processing loop states ------------------ - -float Ts = 0.0; -short input_buf[2*FDMDV_NOM_SAMPLES_PER_FRAME]; -int n_input_buf = 0; -int nin = FDMDV_NOM_SAMPLES_PER_FRAME; -short *output_buf; -int n_output_buf = 0; -int codec_bits[2*FDMDV_BITS_PER_FRAME]; -int state = 0; - -// Portaudio states ----------------------------- - -PaStream *stream = NULL; -PaError err; - -typedef struct { - float in48k[FDMDV_OS_TAPS + N48]; - float in8k[MEM8 + N8]; -} paCallBackData; - -// Class for each window type ------------------ - -class Spectrum: public Fl_Box { -protected: - int handle(int event) { - - // detect a left mouse down if inside the spectrum window - - if ((event == FL_NO_EVENT) && (Fl::event_button() == 1)) { - if ((Fl::event_x() > x()) && (Fl::event_x() < (x() + w())) && - (Fl::event_y() > y()) && (Fl::event_y() < (y() + h()))) { - - // show zoomed spectrum window - - zoomSpectrumWindow->show(); - } - - } - return 0; - } - - void draw() { - float x_px_per_point = 0.0; - float y_px_per_dB = 0.0; - int i, x1, y1, x2, y2; - float mag1, mag2; - char label[20]; - float px_per_hz; - - Fl_Box::draw(); - fl_color(FL_BLACK); - fl_rectf(x(),y(),w(),h()); - fl_color(FL_GREEN); - fl_line_style(FL_SOLID); - - fl_push_clip(x(),y(),w(),h()); - //printf("%d %d\n", w(), h()); - x_px_per_point = (float)w()/FDMDV_NSPEC; - y_px_per_dB = (float)h()/(MAX_DB - MIN_DB); - - // plot spectrum - - for(i=0; i x()) && (Fl::event_x() < (x() + w())) && - (Fl::event_y() > y()) && (Fl::event_y() < (y() + h()))) { - - // show zoomed spectrum window - - zoomWaterfallWindow->show(); - } - - } - return 0; - } - - // map val to a rgb colour - // from http://eddiema.ca/2011/01/21/c-sharp-heatmaps/ - - unsigned heatmap(float val, float min, float max) { - unsigned r = 0; - unsigned g = 0; - unsigned b = 0; - - val = (val - min) / (max - min); - if(val <= 0.2) { - b = (unsigned)((val / 0.2) * 255); - } else if(val > 0.2 && val <= 0.7) { - b = (unsigned)((1.0 - ((val - 0.2) / 0.5)) * 255); - } - if(val >= 0.2 && val <= 0.6) { - g = (unsigned)(((val - 0.2) / 0.4) * 255); - } else if(val > 0.6 && val <= 0.9) { - g = (unsigned)((1.0 - ((val - 0.6) / 0.3)) * 255); - } - if(val >= 0.5) { - r = (unsigned)(((val - 0.5) / 0.5) * 255); - } - - //printf("%f %x %x %x\n", val, r, g, b); - - return (b << 16) + (g << 8) + r; - } - - void draw() { - float spec_index_per_px, intensity_per_dB; - int px_per_sec; - int index, dy, dy_blocks, bytes_in_row_of_blocks, b; - int px, py, intensity; - unsigned *last_row, *pdest, *psrc; - - /* detect resizing of window */ - - if ((h() != prev_h) || (w() != prev_w)) { - delete pixel_buf; - new_pixel_buf(w(), h()); - } - - Fl_Box::draw(); - - // determine dy, the height of one "block" - - px_per_sec = (float)h()/WATERFALL_SECS_Y; - dy = DT*px_per_sec; - - // number of dy high blocks in spectrogram - - dy_blocks = h()/dy; - - // shift previous bit map - - bytes_in_row_of_blocks = dy*w()*sizeof(unsigned); - - for(b=0; b 255) intensity = 255; - if (intensity < 0) intensity = 0; - - if (greyscale) { - for(py=0; py (h()/2 - 10)) - y1 = h()/2 - 10; - if (y1 < -(h()/2 - 10)) - y1 = -(h()/2 - 10); - return y1; - } - - void draw() { - float x_scale; - float y_scale; - int i, x1, y1, x2, y2; - char label[100]; - - Fl_Box::draw(); - - /* detect resizing of window */ - - if ((h() != prev_h) || (w() != prev_w) || (x() != prev_x) || (y() != prev_y)) { - fl_color(FL_BLACK); - fl_rectf(x(),y(),w(),h()); - prev_h = h(); prev_w = w(); prev_x = x(); prev_y = y(); - } - - fl_push_clip(x(),y(),w(),h()); - - x_scale = (float)w()/x_max; - y_scale = (float)h()/(2.0*y_max); - - // erase last sample - - fl_color(FL_BLACK); - x1 = x_scale * index + x(); - y1 = y_scale * mem[index]; - y1 = clip(y1); - y1 = y() + h()/2 - y1; - fl_point(x1, y1); - - // draw new sample - - fl_color(FL_GREEN); - x1 = x_scale * index + x(); - y1 = y_scale * new_sample; - y1 = clip(y1); - y1 = y() + h()/2 - y1; - fl_point(x1, y1); - mem[index] = new_sample; - - index++; - if (index >= x_max) - index = 0; - - // y axis graticule - - step = 10; - - while ((2.0*y_max/step) > 10) - step *= 2.0; - while ((2.0*y_max/step) < 4) - step /= 2.0; - - fl_color(FL_DARK_GREEN); - fl_line_style(FL_DOT); - for(i=-y_max; i= *nin) { - - // demod per frame processing - - for(i=0; i<*nin; i++) - rx_fdm[i] = (float)input_buf[i]/FDMDV_SCALE; - nin_prev = *nin; - fdmdv_demod(fdmdv, rx_bits, &sync_bit, rx_fdm, nin); - *n_input_buf -= nin_prev; - assert(*n_input_buf >= 0); - - // shift input buffer - - for(i=0; i<*n_input_buf; i++) - input_buf[i] = input_buf[i+nin_prev]; - - // compute rx spectrum & get demod stats, and update GUI plot data - - fdmdv_get_rx_spectrum(fdmdv, rx_spec, rx_fdm, nin_prev); - fdmdv_get_demod_stats(fdmdv, &stats); - new_data(rx_spec); - aScatter->add_new_samples(stats.rx_symbols); - aTimingEst->add_new_sample(stats.rx_timing); - aFreqEst->add_new_sample(stats.foff); - aSNR->add_new_sample(stats.snr_est); - - /* - State machine to: - - + Mute decoded audio when out of sync. The demod is synced - when we are using the fine freq estimate and SNR is above - a thresh. - - + Decode codec bits only if we have a 0,1 sync bit - sequence. Collects two frames of demod bits to decode - one frame of codec bits. - */ - - next_state = *state; - switch (*state) { - case 0: - /* mute output audio when out of sync */ - - if (*n_output_buf < 2*codec2_samples_per_frame(c2) - N8) { - for(i=0; i 3.0)) - next_state = 1; - - break; - case 1: - if (sync_bit == 0) { - next_state = 2; - - /* first half of frame of codec bits */ - - memcpy(codec_bits, rx_bits, FDMDV_BITS_PER_FRAME*sizeof(int)); - } - else - next_state = 1; - - if (stats.fest_coarse_fine == 0) - next_state = 0; - - break; - case 2: - next_state = 1; - - if (stats.fest_coarse_fine == 0) - next_state = 0; - - if (sync_bit == 1) { - /* second half of frame of codec bits */ - - memcpy(&codec_bits[FDMDV_BITS_PER_FRAME], rx_bits, FDMDV_BITS_PER_FRAME*sizeof(int)); - - /* pack bits, MSB received first */ - - bit = 7; byte = 0; - memset(packed_bits, 0, BYTES_PER_CODEC_FRAME); - for(i=0; i= DT) { - *Ts -= DT; - if (!zoomSpectrumWindow->shown() && !zoomWaterfallWindow->shown()) { - aSpectrum->redraw(); - aWaterfall->redraw(); - aScatter->redraw(); - aTimingEst->redraw(); - aFreqEst->redraw(); - aSNR->redraw(); - } - if (zoomSpectrumWindow->shown()) - aZoomedSpectrum->redraw(); - if (zoomWaterfallWindow->shown()) - aZoomedWaterfall->redraw(); - } -} - - -/* - idle() is the FLTK function that gets continusouly called when FLTK - is not doing GUI work. We use this function for providing file - input to update the GUI when simulating real time operation. -*/ - -void idle(void*) { - int ret, i; - - if (fin_name != NULL) { - ret = fread(&input_buf[n_input_buf], - sizeof(short), - FDMDV_NOM_SAMPLES_PER_FRAME, - fin); - n_input_buf += FDMDV_NOM_SAMPLES_PER_FRAME; - - per_frame_rx_processing(output_buf, &n_output_buf, - codec_bits, - input_buf, &n_input_buf, - &nin, &state, codec2); - - if (fout_name != NULL) { - if (n_output_buf >= N8) { - ret = fwrite(output_buf, sizeof(short), N8, fout); - n_output_buf -= N8; - assert(n_output_buf >= 0); - - /* shift speech sample output buffer */ - - for(i=0; iin8k; - float *in48k = cbData->in48k; - float out8k[N8]; - float out48k[N48]; - short out48k_short[N48]; - - (void) timeInfo; - (void) statusFlags; - - assert(inputBuffer != NULL); - - /* Convert input model samples from 48 to 8 kHz ------------ */ - - /* just use left channel */ - - for(i=0; i= N8) { - if (state == 0) { - for(i=0; i= 0); - - /* shift speech samples in output buffer */ - - for(i=0; i<(uint)n_output_buf; i++) - output_buf[i] = output_buf[i+N8]; - - /* Convert output speech to 48 kHz sample rate ------------- */ - - /* upsample and update filter memory */ - - fdmdv_8_to_48(out48k, &in8k[MEM8], N8); - for(i=0; i= argc) - return 0; - fin_name = argv[i+1]; - i += 2; - return 2; - } - if (argv[i][1] == 'o') { - if ((i+1) >= argc) - return 0; - fout_name = argv[i+1]; - i += 2; - return 2; - } - if (argv[i][1] == 's') { - if ((i+1) >= argc) - return 0; - sound_dev_name = argv[i+1]; - i += 2; - return 2; - } - return 0; -} - -/*------------------------------------------------------------*\ - - MAIN - -\*------------------------------------------------------------*/ - -int main(int argc, char **argv) { - int ret; - int i; - PaStreamParameters inputParameters, outputParameters; - paCallBackData cbData; - - i = 1; - Fl::args(argc,argv,i,arg_callback); - - if (argc == 1) { - printf("usage: %s [-i inputFdmdvRawFile] [-o outputRawSoundFile] [-s inputSoundDevice]\n", argv[0]); - exit(0); - } - - if (fin_name != NULL) { - fin = fopen(fin_name,"rb"); - if (fin == NULL) { - fprintf(stderr, "Error opening input fdmdv raw file %s\n", fin_name); - exit(1); - } - } - - if (fout_name != NULL) { - fout = fopen(fout_name,"wb"); - if (fout == NULL) { - fprintf(stderr, "Error opening output speech raw file %s\n", fout_name); - exit(1); - } - } - - for(i=0; idefaultLowInputLatency; - inputParameters.hostApiSpecificStreamInfo = NULL; - - outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */ - if (outputParameters.device == paNoDevice) { - fprintf(stderr,"Error: No default output device.\n"); - goto pa_error; - } - outputParameters.channelCount = NUM_CHANNELS; /* stereo output */ - outputParameters.sampleFormat = paInt16; - outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency; - outputParameters.hostApiSpecificStreamInfo = NULL; - - err = Pa_OpenStream( - &stream, - &inputParameters, - &outputParameters, - SAMPLE_RATE, - N48, - paClipOff, - callback, - &cbData); - - if( err != paNoError ) goto pa_error; - } - - /*------------------------------------------------------------------------*\ - - Init GUI - - \*------------------------------------------------------------------------*/ - - // recommended to prevent dithering and stopped display being - // covered by black flickering squares - - Fl::visual(FL_RGB); - - // set up main window - - window = new Fl_Window(W, SP+H2+SP+SP+H2+SP, "fl_fmdv"); - //window->size_range(100, 100); - //window->resizable(); - aSpectrum = new Spectrum(SP, SP, W3-2*SP, H2); - aWaterfall = new Waterfall(SP, SP+H2+SP+SP, W3-2*SP, H2); - aScatter = new Scatter(W3+SP, SP, W3-2*SP, H2); - aTimingEst = new Scalar(W3+SP, SP+H2+SP+SP, W3-2*SP, H2, 100, 80, "Timing Est"); - aFreqEst = new Scalar(2*W3+SP, SP, W3-2*SP, H2, 100, 100, "Frequency Est"); - aSNR = new Scalar(2*W3+SP, SP+H2+SP+SP, W3-2*SP, H2, 100, 20, "SNR"); - - Fl::add_idle(idle); - - window->end(); - - // set up zoomed spectrum window - - zoomSpectrumWindow = new Fl_Window(W, H, "Spectrum"); - aZoomedSpectrum = new Spectrum(SP, SP, W-2*SP, H-2*SP); - zoomSpectrumWindow->end(); - - // set up zoomed waterfall window - - zoomWaterfallWindow = new Fl_Window(W, H, "Waterfall"); - aZoomedWaterfall = new Waterfall(SP, SP, W-2*SP, H-2*SP); - zoomWaterfallWindow->end(); - - if (sound_dev_name != NULL) { - err = Pa_StartStream( stream ); - if( err != paNoError ) goto pa_error; - } - - // show the main window and start running - - window->show(argc, argv); - Fl::run(); - - if (sound_dev_name != NULL) { - err = Pa_StopStream( stream ); - if( err != paNoError ) goto pa_error; - Pa_CloseStream( stream ); - Pa_Terminate(); - } - - fdmdv_destroy(fdmdv); - codec2_destroy(codec2); - free(output_buf); - - if (fin_name != NULL) - fclose(fin); - if (fout_name != NULL) - fclose(fout); - - return ret; - - // Portaudio error handling - -pa_error: - if( stream ) { - Pa_AbortStream( stream ); - Pa_CloseStream( stream ); - } - Pa_Terminate(); - 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 ) ); - return -1; -} diff --git a/codec2-dev/portaudio/Makefile b/codec2-dev/portaudio/Makefile deleted file mode 100644 index 39255b6c..00000000 --- a/codec2-dev/portaudio/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# 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 diff --git a/codec2-dev/portaudio/pa_impresp.c b/codec2-dev/portaudio/pa_impresp.c deleted file mode 100644 index 7317e07e..00000000 --- a/codec2-dev/portaudio/pa_impresp.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - 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 -#include -#include -#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; iin48k[i+FDMDV_OS_TAPS] = *rptr; - - /* downsample and update filter memory */ - - fdmdv_48_to_8(out8k, &in48k[FDMDV_OS_TAPS], N8); - for(i=0; ifimp); - - /* play side, read from impulse buffer */ - - for(i=0; iimpulse_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; iframesLeft -= 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; idefaultLowInputLatency; - 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; -} - diff --git a/codec2-dev/portaudio/pa_play.c b/codec2-dev/portaudio/pa_play.c deleted file mode 100644 index 00ea0868..00000000 --- a/codec2-dev/portaudio/pa_play.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - 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 -#include -#include -#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; idefaultLowOutputLatency; - 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; -} - diff --git a/codec2-dev/portaudio/pa_rec.c b/codec2-dev/portaudio/pa_rec.c deleted file mode 100644 index 00023b02..00000000 --- a/codec2-dev/portaudio/pa_rec.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - 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 -#include -#include -#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; iin48k[i+FDMDV_OS_TAPS] = *rptr; - - /* downsample and update filter memory */ - - fdmdv_48_to_8(out8k, &data->in48k[FDMDV_OS_TAPS], N8); - for(i=0; iin48k[i] = data->in48k[i+framesToCopy]; - - /* save 8k to disk */ - - for(i=0; idefaultLowInputLatency; - 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; -} - diff --git a/codec2-dev/portaudio/pa_recplay.c b/codec2-dev/portaudio/pa_recplay.c deleted file mode 100644 index 6bfcd08b..00000000 --- a/codec2-dev/portaudio/pa_recplay.c +++ /dev/null @@ -1,270 +0,0 @@ -/* - pa_recplay.c - David Rowe - July 8 2012 - - Echos audio from sound card input to sound card output. Samples at - 48 kHz, converts to 8 kHz, converts back to 48kHz, and plays 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 -#include -#include -#include "portaudio.h" -#include "fdmdv.h" -#include "fifo.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 MAX_FPB 2048 /* maximum value of framesPerBuffer */ - -/* state information passed to call back */ - -typedef struct { - float in48k[FDMDV_OS_TAPS + N48]; - float in8k[MEM8 + N8]; - struct FIFO *infifo; - struct FIFO *outfifo; -} 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 in48k_short[N48]; - short indata[MAX_FPB]; - short outdata[MAX_FPB]; - - (void) timeInfo; - (void) statusFlags; - - assert(inputBuffer != NULL); - assert(outputBuffer != NULL); - - /* - framesPerBuffer is portaudio-speak for number of samples we - actually get from the record side and need to provide to the - play side. On Linux (at least) it was found that - framesPerBuffer may not always be what we ask for in the - framesPerBuffer field of Pa_OpenStream. For example a request - for 960 sample buffers lead to framesPerBuffer = 1024. - - To perform the 48 to 8 kHz conversion we need an integer - multiple of FDMDV_OS samples to support the interpolation and - decimation. As we can't guarantee the size of framesPerBuffer - we do a little FIFO buffering. - */ - - //printf("framesPerBuffer: %d N48 %d\n", framesPerBuffer, N48); - - /* assemble a mono buffer (just use left channel) and write to FIFO */ - - assert(framesPerBuffer < MAX_FPB); - for(i=0; iinfifo, indata, framesPerBuffer); - - /* while we have enough samples available ... */ - - //printf("infifo before: %d\n", fifo_n(data->infifo)); - while (fifo_read(data->infifo, in48k_short, N48) == 0) { - - /* convert to float */ - - for(i=0; ioutfifo, out48k_short, N48); - } - //printf("infifo after: %d\n", fifo_n(data->infifo)); - //printf("outfifo : %d\n", fifo_n(data->outfifo)); - - - /* OK now set up output samples */ - - if (fifo_read(data->outfifo, outdata, framesPerBuffer) == 0) { - - /* write signal to both channels */ - - for(i=0; idefaultLowInputLatency; - 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, - 512, - 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. */ - } - - fifo_destroy(data.infifo); - fifo_destroy(data.outfifo); - - return err; -} - diff --git a/codec2-dev/raw/sine1k_2Hz_spread.raw b/codec2-dev/raw/sine1k_2Hz_spread.raw index 2ab521fc..1b8ad9ca 100644 Binary files a/codec2-dev/raw/sine1k_2Hz_spread.raw and b/codec2-dev/raw/sine1k_2Hz_spread.raw differ diff --git a/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw b/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw index d694d23f..4d3e09ec 100644 Binary files a/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw and b/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw differ diff --git a/codec2-dev/voicing/hts1a.v b/codec2-dev/voicing/hts1a.v deleted file mode 100644 index aedcc3e5..00000000 --- a/codec2-dev/voicing/hts1a.v +++ /dev/null @@ -1,299 +0,0 @@ -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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-0 -0 -0 -0 diff --git a/codec2-dev/voicing/morig.v b/codec2-dev/voicing/morig.v deleted file mode 100644 index b89a925c..00000000 --- a/codec2-dev/voicing/morig.v +++ /dev/null @@ -1,200 +0,0 @@ -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 diff --git a/codec2-dev/win32/Makefile b/codec2-dev/win32/Makefile deleted file mode 100644 index e13f8641..00000000 --- a/codec2-dev/win32/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# Win32 Makefile derived from the fine work of Peter Lawrence: -# http://code.google.com/p/codec2demo/ -# -# David Rowe June 2012 -# -# This makefile assumes the Linux version has been compiled first to generate -# the machine-generated codebook source files. It is designed to be cross compiled on -# Linux. -# - -# uncomment under Windows -#CC_PREFIX = -# uncomment under Linux (to cross-compile for Windows) -CC_PREFIX = i586-mingw32msvc- - -DLLNAME = codec2.dll -LIBNAME = codec2.lib - -CFLAGS = -O2 -Wall -D__CODEC2_WIN32__ - -HDRS = ../src/codec2.h ../src/codec2_fdmdv.h - -OBJS = dump.o lpc.o nlp.o postfilter.o sine.o codec2.o fdmdv.o kiss_fft.o interp.o lsp.o phase.o quantise.o pack.o codebook.o codebookd.o codebookvq.o codebookjnd.o codebookjvm.o codebookdt.o codebookge.o - -all: $(DLLNAME) c2demo.exe c2enc.exe c2dec.exe fdmdv_get_test_bits.exe fdmdv_mod.exe fdmdv_demod.exe fdmdv_put_test_bits.exe - -$(DLLNAME): $(OBJS) - $(CC_PREFIX)gcc -shared -o $(DLLNAME) $(OBJS) -Wl,--out-implib,$(LIBNAME) - -%.o: ../src/%.c $(HDRS) Makefile - $(CC_PREFIX)gcc $(CFLAGS) -D__CODEC2_BUILDING_DLL__ -c $< -o $@ - -c2demo.exe: ../src/c2demo.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< -o $@ $(LIBNAME) - -c2enc.exe: ../src/c2enc.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< -o $@ $(LIBNAME) - -c2dec.exe: ../src/c2dec.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< -o $@ $(LIBNAME) - -fdmdv_get_test_bits.exe: ../src/fdmdv_get_test_bits.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< -o $@ $(LIBNAME) - -fdmdv_mod.exe: ../src/fdmdv_mod.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< -o $@ $(LIBNAME) - -fdmdv_demod.exe: ../src/fdmdv_demod.c ../src/octave.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< ../src/octave.c -o $@ $(LIBNAME) - -fdmdv_put_test_bits.exe: ../src/fdmdv_put_test_bits.c $(DLLNAME) $(LIBNAME) - $(CC_PREFIX)gcc $(CFLAGS) $< -o $@ $(LIBNAME) - -clean: - rm -f $(DLLNAME) $(LIBNAME) - rm -f *.o *.exe - diff --git a/codec2-dev/win32/c2dec.exe b/codec2-dev/win32/c2dec.exe deleted file mode 100755 index 94528174..00000000 Binary files a/codec2-dev/win32/c2dec.exe and /dev/null differ diff --git a/codec2-dev/win32/c2demo.exe b/codec2-dev/win32/c2demo.exe deleted file mode 100755 index 8caf2cf4..00000000 Binary files a/codec2-dev/win32/c2demo.exe and /dev/null differ diff --git a/codec2-dev/win32/c2enc.exe b/codec2-dev/win32/c2enc.exe deleted file mode 100755 index e1e0b342..00000000 Binary files a/codec2-dev/win32/c2enc.exe and /dev/null differ diff --git a/codec2-dev/win32/codec2.dll b/codec2-dev/win32/codec2.dll deleted file mode 100755 index bab3d45c..00000000 Binary files a/codec2-dev/win32/codec2.dll and /dev/null differ diff --git a/codec2-dev/win32/codec2.lib b/codec2-dev/win32/codec2.lib deleted file mode 100644 index 639dd801..00000000 Binary files a/codec2-dev/win32/codec2.lib and /dev/null differ