From: drowe67 Date: Wed, 10 Jun 2015 10:41:04 +0000 (+0000) Subject: fixed a few small bugs, running OK on stored files now, updated cmake instructions... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=60829538e4f1c36f8962aa5617e01bdd727934a8;p=freetel-svn-tracking.git fixed a few small bugs, running OK on stored files now, updated cmake instructions so asserts enabled git-svn-id: https://svn.code.sf.net/p/freetel/code@2178 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2-dev/README.txt b/fdmdv2-dev/README.txt index ef46a239..16f86bcb 100644 --- a/fdmdv2-dev/README.txt +++ b/fdmdv2-dev/README.txt @@ -20,7 +20,7 @@ $ make Then you can use your local codec-dev, something like: -$ cmake -DBOOTSTRAP_WXWIDGETS=TRUE -DCODEC2_INCLUDE_DIRS=/home/david/codec2-dev/src -DCODEC2_LIBRARY=/home/david/codec2-dev/build_linux/src/libcodec2.so -DUSE_STATIC_CODEC2=FALSE -DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../ +$ cmake -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=TRUE -DCODEC2_INCLUDE_DIRS=/home/david/codec2-dev/src -DCODEC2_LIBRARY=/home/david/codec2-dev/build_linux/src/libcodec2.so -DUSE_STATIC_CODEC2=FALSE -DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../ OR build a local copy of codec2-dev: @@ -112,4 +112,21 @@ configure emacs: (function (lambda () (setq c-basic-offset 4) ))) +==== +TODO +==== + +[ ] FreeDV 700 mode + [ ] Playfile bug + [ ] integrate freedv API + [ ] add 700 to freedv API + [ ] how to handle Fs=7500 Hz? + [ ] test mode + + how to plot error histogram +[ ] Small fixes + [ ] long varicode default + [ ] option to _not_ require checksum + [ ] Waterfall direction + [ ] bump ver number +[ ] Presence/spotting hooks diff --git a/fdmdv2-dev/src/fdmdv2_defines.h b/fdmdv2-dev/src/fdmdv2_defines.h index ba11f029..ebe0f8a6 100644 --- a/fdmdv2-dev/src/fdmdv2_defines.h +++ b/fdmdv2-dev/src/fdmdv2_defines.h @@ -59,7 +59,7 @@ #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 N48 (N8*SAMPLE_RATE/FS) // processing buffer size at 48 kHz #define NUM_CHANNELS 2 // I think most sound cards prefer stereo we will convert to mono #define VOX_TONE_FREQ 1000.0 // optional left channel vox tone freq #define VOX_TONE_AMP 30000 // optional left channel vox tone amp diff --git a/fdmdv2-dev/src/fdmdv2_main.cpp b/fdmdv2-dev/src/fdmdv2_main.cpp index 013fded8..78523884 100644 --- a/fdmdv2-dev/src/fdmdv2_main.cpp +++ b/fdmdv2-dev/src/fdmdv2_main.cpp @@ -1474,7 +1474,7 @@ void MainFrame::OnPlayFileToMicIn(wxCommandEvent& event) //------------------------------------------------------------------------- // OnPlayFileFromRadio() -// This puppy "plays" a recorded file into the denmonulator input, allowing us +// This puppy "plays" a recorded file into the demodulator input, allowing us // to replay off air signals. //------------------------------------------------------------------------- void MainFrame::OnPlayFileFromRadio(wxCommandEvent& event) @@ -1544,6 +1544,7 @@ void MainFrame::OnPlayFileFromRadio(wxCommandEvent& event) g_loopPlayFileFromRadio = static_cast(ctrl)->getLoopPlayFileToMicIn(); SetStatusText(wxT("Playing File: ") + fileName + wxT(" into From Radio") , 0); + printf("OnPlayFileFromRadio:: Playing File\n"); g_playFileFromRadio = true; } } @@ -2763,6 +2764,7 @@ int resample(SRC_STATE *src, SRC_DATA src_data; float input[N48*2]; float output[N48*2]; + int ret; assert(src != NULL); assert(length_input_short <= N48*2); @@ -2777,7 +2779,8 @@ int resample(SRC_STATE *src, src_data.end_of_input = 0; src_data.src_ratio = (float)output_sample_rate/input_sample_rate; - src_process(src, &src_data); + ret = src_process(src, &src_data); + assert(ret == 0); assert(src_data.output_frames_gen <= length_output_short); src_float_to_short_array(output, output_short, src_data.output_frames_gen); @@ -2875,8 +2878,8 @@ void txRxProcessing() g_mutexProtectingCallbackData.Lock(); if (g_playFileFromRadio && (g_sfPlayFileFromRadio != NULL)) { - int n = sf_read_short(g_sfPlayFileFromRadio, in8k_short, n8k); - if (n != N8) { + unsigned int n = sf_read_short(g_sfPlayFileFromRadio, in8k_short, n8k); + if (n != n8k) { if (g_loopPlayFileFromRadio) sf_seek(g_sfPlayFileFromRadio, 0, SEEK_SET); else { diff --git a/fdmdv2-dev/src/version.h b/fdmdv2-dev/src/version.h index b942ef4f..944dab99 100644 --- a/fdmdv2-dev/src/version.h +++ b/fdmdv2-dev/src/version.h @@ -2,10 +2,10 @@ #define FREEDV_VER_DOT_H 1 #define FREEDV_VERSION_MAJOR 0 -#define FREEDV_VERSION_MINOR 97 -#define FREEDV_VERSION_PATCH 1 +#define FREEDV_VERSION_MINOR 98 +#define FREEDV_VERSION_PATCH 0 #define FREEDV_VERSION_SUFFIX "Beta" -#define FREEDV_VERSION "0.97.1 Beta" +#define FREEDV_VERSION "0.98.0 Beta" #endif //FREEDV_VER_DOT_H