morse2txt-checkins Mailing List for Morse code decoder (Page 8)
Morse code decoder.
Brought to you by:
kprox
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(22) |
Sep
(4) |
Oct
(32) |
Nov
(2) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(4) |
Feb
|
Mar
(9) |
Apr
(6) |
May
(10) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(22) |
Oct
(4) |
Nov
(6) |
Dec
(12) |
2009 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(5) |
May
(15) |
Jun
(13) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken P. <kp...@us...> - 2005-08-30 01:05:51
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27805/src Modified Files: utility.h Log Message: fix syntax error Index: utility.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/utility.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** utility.h 29 Aug 2005 20:00:39 -0000 1.3 --- utility.h 30 Aug 2005 01:05:42 -0000 1.4 *************** *** 8,12 **** * filename. */ ! int time_stamp(char *fn, char *event) #define UTILITY_H --- 8,12 ---- * filename. */ ! int time_stamp(char *fn, char *event); #define UTILITY_H |
From: Ken P. <kp...@us...> - 2005-08-29 20:00:48
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29544/src Modified Files: utility.h utility.c Log Message: add doxygen tags. pass in filename for the event log too. Index: utility.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/utility.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utility.c 29 Aug 2005 19:52:44 -0000 1.2 --- utility.c 29 Aug 2005 20:00:39 -0000 1.3 *************** *** 1,3 **** ! /* $Id$ */ #include <stdio.h> #include <sys/timeb.h> --- 1,5 ---- ! /* ! * $Id$ ! */ #include <stdio.h> #include <sys/timeb.h> *************** *** 7,16 **** #include "utility.h" ! int time_stamp(char *event) { struct timeb time_stamp; FILE *target = NULL; ! target = fopen ("bench.txt", "a"); if(target != NULL) { ftime(&time_stamp); --- 9,18 ---- #include "utility.h" ! int time_stamp(char *fn, char *event) { struct timeb time_stamp; FILE *target = NULL; ! target = fopen (fn, "a"); if(target != NULL) { ftime(&time_stamp); Index: utility.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/utility.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utility.h 29 Aug 2005 19:52:44 -0000 1.2 --- utility.h 29 Aug 2005 20:00:39 -0000 1.3 *************** *** 1,5 **** #ifndef UTILITY_H ! int time_stamp(char *event); #define UTILITY_H --- 1,12 ---- #ifndef UTILITY_H ! /** Log events to a file with timestamp. ! * @param fn Filename to save results to. ! * @param event Name of the event. ! * @returns errno Error for file access. ! * @note When calling this from threads, each thread must have a unique ! * filename. ! */ ! int time_stamp(char *fn, char *event) #define UTILITY_H |
From: Ken P. <kp...@us...> - 2005-08-29 19:52:57
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27647/src Modified Files: utility.h utility.c Log Message: remove unused utility function Index: utility.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/utility.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** utility.c 24 Feb 2005 02:19:37 -0000 1.1.1.1 --- utility.c 29 Aug 2005 19:52:44 -0000 1.2 *************** *** 7,20 **** #include "utility.h" - int verbose = 0; - - void debug_message_1(char *message, int parameter) - { - if(verbose) - { - printf("%s = %d\n", message, parameter); - } - } - int time_stamp(char *event) { --- 7,10 ---- Index: utility.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/utility.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** utility.h 24 Feb 2005 02:19:37 -0000 1.1.1.1 --- utility.h 29 Aug 2005 19:52:44 -0000 1.2 *************** *** 1,7 **** #ifndef UTILITY_H - extern int verbose; - - void debug_message_1(char *message, int parameter); int time_stamp(char *event); --- 1,4 ---- |
From: Ken P. <kp...@us...> - 2005-08-29 13:45:25
|
Update of /cvsroot/morse2txt/morse2txt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32307 Modified Files: ChangeLog Log Message: fix spelling error Index: ChangeLog =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ChangeLog 27 Aug 2005 01:05:27 -0000 1.6 --- ChangeLog 29 Aug 2005 13:45:13 -0000 1.7 *************** *** 4,8 **** - Fix initial busy and then freed audio device from prohibiting a re-start of morse code decoding (bug ID 1241589). ! - Add adio abstraction layer which is a stepping stone for ALSA support. Also a stepping stone for audio loopback, so morse2txt can be used for an audio dsp filter. --- 4,8 ---- - Fix initial busy and then freed audio device from prohibiting a re-start of morse code decoding (bug ID 1241589). ! - Add audio abstraction layer which is a stepping stone for ALSA support. Also a stepping stone for audio loopback, so morse2txt can be used for an audio dsp filter. |
From: Ken P. <kp...@us...> - 2005-08-27 01:05:35
|
Update of /cvsroot/morse2txt/morse2txt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9361 Modified Files: ChangeLog Log Message: update with latest bug fix Index: ChangeLog =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChangeLog 11 Aug 2005 12:03:10 -0000 1.5 --- ChangeLog 27 Aug 2005 01:05:27 -0000 1.6 *************** *** 1,3 **** --- 1,5 ---- * + - Fix small memory leak when Start button is pressed while morse threads + are running (bud ID 1273732) - Fix initial busy and then freed audio device from prohibiting a re-start of morse code decoding (bug ID 1241589). |
From: Ken P. <kp...@us...> - 2005-08-26 18:35:38
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17365/src Modified Files: audio.h audio.c Log Message: add audio play to audio API Index: audio.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** audio.c 19 Aug 2005 02:30:31 -0000 1.16 --- audio.c 26 Aug 2005 18:35:31 -0000 1.17 *************** *** 130,133 **** --- 130,140 ---- } + void audio_play(p_audio_device device, int buffer_segment) + { + if(NULL != device) { + device->audio_api->play(&device->audio_pub, buffer_segment); + } + } + void audio_raw2double(p_audio_device device, int buffer_segment, double *audio_data) { Index: audio.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** audio.h 19 Aug 2005 15:46:51 -0000 1.9 --- audio.h 26 Aug 2005 18:35:31 -0000 1.10 *************** *** 55,58 **** --- 55,64 ---- void audio_capture(p_audio_device device, int buffer_segment); + /** Send raw audio data to audio device. + * @param device The audio device object. @sa p_audio_device + * @param buffer_segment The buffer segment to play. + */ + void audio_play(p_audio_device device, int buffer_segment); + /** Converts the raw audio data to real. * @note Real data is required GSL's FFT library. |
From: Ken P. <kp...@us...> - 2005-08-26 02:09:45
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8323/src Modified Files: callbacks.c Log Message: removed phantom return Index: callbacks.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/callbacks.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** callbacks.c 26 Aug 2005 01:58:23 -0000 1.8 --- callbacks.c 26 Aug 2005 02:09:34 -0000 1.9 *************** *** 129,133 **** else { preferences_enabled(TRUE); - return; } } --- 129,132 ---- |
From: Ken P. <kp...@us...> - 2005-08-26 01:58:31
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6263/src Modified Files: callbacks.c morse.c morse.h Log Message: fix memory leak when start button is pressed with morse threads running. Added call into morse to check morse threads state. Index: callbacks.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/callbacks.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** callbacks.c 11 Aug 2005 00:30:18 -0000 1.7 --- callbacks.c 26 Aug 2005 01:58:23 -0000 1.8 *************** *** 122,130 **** gpointer user_data) { ! preferences_enabled(FALSE); ! if(plot_fft_data_array_create(get_tone_packet_size())) { ! return; ! } ! (void)morse_start_threads(); } --- 122,135 ---- gpointer user_data) { ! if(morse_get_thread_state() == THREADS_NOT_RUNNING) { ! if(plot_fft_data_array_create( get_tone_packet_size() ) == 0) { ! preferences_enabled(FALSE); ! (void)morse_start_threads(); ! } ! else { ! preferences_enabled(TRUE); ! return; ! } ! } } Index: morse.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/morse.c,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** morse.c 26 Aug 2005 01:26:43 -0000 1.44 --- morse.c 26 Aug 2005 01:58:23 -0000 1.45 *************** *** 1000,1003 **** --- 1000,1008 ---- /* + * Returns morse thread state. + */ + te_morse_thread_state morse_get_thread_state(void) { return run; } + + /* * Returns the current plot type. */ Index: morse.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/morse.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** morse.h 11 Aug 2005 00:30:18 -0000 1.19 --- morse.h 26 Aug 2005 01:58:23 -0000 1.20 *************** *** 116,119 **** --- 116,121 ---- /** Returns the device name of the audio play/rec device. */ void morse_get_audio_device_name(te_audio_rec_play rec_play, char **name); + /** Returns the current state of the morse threads. */ + te_morse_thread_state morse_get_thread_state(void); //! Interface register functions |
From: Ken P. <kp...@us...> - 2005-08-26 01:26:55
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1621/src Modified Files: morse.c Log Message: do not release all objects if Start button is pressed when morse is being decoded. Remove redundant error code setting in thread start routine. Index: morse.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/morse.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** morse.c 25 Aug 2005 22:42:43 -0000 1.43 --- morse.c 26 Aug 2005 01:26:43 -0000 1.44 *************** *** 418,423 **** if(run != THREADS_NOT_RUNNING) { ! error = -1; ! goto err_hndlr; } run = THREADS_STARTING; --- 418,422 ---- if(run != THREADS_NOT_RUNNING) { ! goto morse_running; } run = THREADS_STARTING; *************** *** 428,432 **** morse_settings.audio_rec.name, morse_settings.audio_rec.sample_frequency))) { - error = -1; goto err_hndlr; } --- 427,430 ---- *************** *** 442,446 **** /* Open the audio device. */ if(audio_open(morse_settings.audio_rec.device) != 0) { - error = -1; goto err_hndlr; } --- 440,443 ---- *************** *** 448,452 **** /* Initialize the audio device. */ if(audio_init(morse_settings.audio_rec.device) != 0) { - error = -1; goto err_hndlr; } --- 445,448 ---- *************** *** 459,463 **** /* Create an array for the FFT data. */ if(NULL == (fft_data = malloc(morse_settings.tone_packet_size * sizeof(double)))) { - error = -1; goto err_hndlr; } --- 455,458 ---- *************** *** 465,469 **** /* Create a discrete time window for application to the audio packets prior to FFT. */ if(NULL == (morse_thread.dt_w = dt_window_create(DT_HAMMING_WINDOW, morse_settings.tone_packet_size))) { - error = -1; goto err_hndlr; } --- 460,463 ---- *************** *** 477,481 **** morse_thread.agc_dg, FFT_SCOPE_GAIN_DOWN_CRR_FACTOR))) { - error = -1; goto err_hndlr; } --- 471,474 ---- *************** *** 483,487 **** /* Create a DeGlitch object. */ if(NULL == (morse_thread.packet_amp_array_dg = dglitch_create(DG_MEDIAN, MIN_NUM_PACKS_PER_DIT))) { - error = -1; goto err_hndlr; } --- 476,479 ---- *************** *** 499,503 **** FW_BLACKMAN, morse_thread.filter_taps))) { - error = -1; goto err_hndlr; } --- 491,494 ---- *************** *** 507,511 **** /* Create an array for audio packet amplitudes. */ if(NULL == (morse_thread.fft_amp_pa = malloc(morse_settings.fft_amp_pa_size * sizeof(double)))) { - error = -1; goto err_hndlr; } --- 498,501 ---- *************** *** 513,517 **** /* Create an array for real audio data. */ if(NULL == (audio_data = malloc(get_audio_device_samples(morse_settings.audio_rec.device) * sizeof(double)))) { - error = -1; goto err_hndlr; } --- 503,506 ---- *************** *** 534,543 **** /* no error */ ! return error; err_hndlr: free_all(); run = THREADS_NOT_RUNNING; return error; } --- 523,536 ---- /* no error */ ! goto morse_running; err_hndlr: + error = -1; free_all(); run = THREADS_NOT_RUNNING; return error; + + morse_running: + return error; } |
From: Ken P. <kp...@us...> - 2005-08-25 22:43:00
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31564/src Modified Files: morse.c Log Message: fix debug paramter for audio_create testing Index: morse.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/morse.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** morse.c 19 Aug 2005 16:36:16 -0000 1.42 --- morse.c 25 Aug 2005 22:42:43 -0000 1.43 *************** *** 424,428 **** /* Create an audio device. */ ! if(NULL == (morse_settings.audio_rec.device = audio_create(10, /* OSS_AUDIO_DEVICE, */ AUDIO_DEVICE_RECORD, morse_settings.audio_rec.name, --- 424,428 ---- /* Create an audio device. */ ! if(NULL == (morse_settings.audio_rec.device = audio_create(OSS_AUDIO_DEVICE, AUDIO_DEVICE_RECORD, morse_settings.audio_rec.name, |
From: Ken P. <kp...@us...> - 2005-08-19 16:36:26
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4288/src Modified Files: morse.c Log Message: fix doxygen errors. Add error handling to start threads. Index: morse.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/morse.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** morse.c 11 Aug 2005 00:30:18 -0000 1.41 --- morse.c 19 Aug 2005 16:36:16 -0000 1.42 *************** *** 21,28 **** */ - #ifdef HAVE_CONFIG_H - # include <config.h> - #endif - #include <stdlib.h> #include <stdio.h> --- 21,24 ---- *************** *** 225,229 **** /** Common properties of audio record and playback devices. */ ! typedef struct ts_audio_device { /** Name of the record (audio capture) device. */ char name[AUDIO_DEVICE_NAME_LENGTH]; --- 221,225 ---- /** Common properties of audio record and playback devices. */ ! typedef struct ts_morse_audio_device { /** Name of the record (audio capture) device. */ char name[AUDIO_DEVICE_NAME_LENGTH]; *************** *** 232,236 **** /** Pointer to the record audio device (audio capture). */ p_audio_device device; ! } ts_audio_device; /** Morse code detector settings. */ --- 228,232 ---- /** Pointer to the record audio device (audio capture). */ p_audio_device device; ! } ts_morse_audio_device; /** Morse code detector settings. */ *************** *** 254,260 **** size_t fft_amp_pa_size; /** Data for audio device (audio capture). */ ! ts_audio_device audio_rec; /** Data for audio playback device (play filtered audio). */ ! ts_audio_device audio_play; } ts_morse_settings; --- 250,256 ---- size_t fft_amp_pa_size; /** Data for audio device (audio capture). */ ! ts_morse_audio_device audio_rec; /** Data for audio playback device (play filtered audio). */ ! ts_morse_audio_device audio_play; } ts_morse_settings; *************** *** 383,386 **** --- 379,385 ---- static void * morse_code(void * param); + /** Frees all audio devices and objects. */ + static void free_all(void); + /* Creates an array of the fft packet amplitudes at a fixed frequency. */ static void morse_create_fft_amp_array(p_morse_data morse_thread_data); *************** *** 416,428 **** int morse_start_threads(void) { if(run != THREADS_NOT_RUNNING) { ! return -1; } run = THREADS_STARTING; ! morse_settings.audio_rec.device = audio_create(OSS_AUDIO_DEVICE, ! AUDIO_DEVICE_RECORD, ! morse_settings.audio_rec.name, ! morse_settings.audio_rec.sample_frequency); morse_settings.minimum_tone_duration = \ --- 415,434 ---- int morse_start_threads(void) { + int error = 0; + if(run != THREADS_NOT_RUNNING) { ! error = -1; ! goto err_hndlr; } run = THREADS_STARTING; ! /* Create an audio device. */ ! if(NULL == (morse_settings.audio_rec.device = audio_create(10, /* OSS_AUDIO_DEVICE, */ ! AUDIO_DEVICE_RECORD, ! morse_settings.audio_rec.name, ! morse_settings.audio_rec.sample_frequency))) { ! error = -1; ! goto err_hndlr; ! } morse_settings.minimum_tone_duration = \ *************** *** 434,488 **** fft_performed = samples_processed = 0; ! if(audio_open(morse_settings.audio_rec.device) == 0) { ! if(audio_init(morse_settings.audio_rec.device) == 0) { ! /* NOTE: Watch math here, these numbers should be some power two. Denominator and Numerator. */ ! morse_settings.fft_amp_pa_size = (int)get_audio_device_samples(morse_settings.audio_rec.device) / (int)morse_settings.tone_packet_size; ! morse_thread.dit_statistics.samples = 0; ! morse_thread.dah_statistics.samples = 0; ! if((fft_data = malloc(morse_settings.tone_packet_size * sizeof(double))) == NULL) { ! return -1; ! } ! morse_thread.dt_w = dt_window_create(DT_HAMMING_WINDOW, morse_settings.tone_packet_size); ! morse_thread.scope_gain = agc_create(FFT_DATA_MAX_GAIN, ! FFT_DATA_MIN_GAIN, ! FFT_NOISE_FLOOR, ! FFT_GRAPH_TOP, ! MORSE_AGC_TYPE, ! morse_thread.agc_dg, ! FFT_SCOPE_GAIN_DOWN_CRR_FACTOR); ! morse_thread.packet_amp_array_dg = dglitch_create(DG_MEDIAN, MIN_NUM_PACKS_PER_DIT); ! /* Duration in time represented by one FFT. */ ! morse_settings.tone_packet_duration = 1.0 / (double)morse_settings.audio_rec.sample_frequency * (double)morse_settings.tone_packet_size; ! /* FFT frequency resolution. */ ! morse_settings.fft_freq_step = (double)morse_settings.audio_rec.sample_frequency / (double)morse_settings.tone_packet_size; ! morse_thread.fir_filter = fwin_create(morse_settings.audio_rec.sample_frequency, ! 500.0, ! 1500.0, ! FW_BANDPASS, ! FW_BLACKMAN, ! morse_thread.filter_taps); ! morse_recompute_filter(); ! /** \todo Eror checking should be done here. */ ! morse_thread.fft_amp_pa = malloc(morse_settings.fft_amp_pa_size * sizeof(double)); ! /** \todo Eror checking should be done here. */ ! audio_data = malloc(get_audio_device_samples(morse_settings.audio_rec.device) * sizeof(double)); ! ! run = THREADS_RUNNING; ! /* ! * not necessary to pass morse_data to thread, but in the future, this could pave the way ! * for decoding more than one signal at a time. Could be usefull when monitoring multiple QSO's. ! * In this case, code must be made re-entrant, no local static variables in functions. ! */ ! (void)pthread_create(&tid[MORSE_CODE_DECODING_THREAD], NULL, morse_code, (void*)&morse_thread); ! (void)pthread_create(&tid[DATA_COLLECTION_THREAD], NULL, data_collection, NULL); ! (void)pthread_create(&tid[AUDIO_POST_PROCESSING_THREAD], NULL, audio_post_process, NULL); ! } ! } ! else { ! run = THREADS_NOT_RUNNING; ! return -1; } ! return 0; } --- 440,543 ---- fft_performed = samples_processed = 0; ! /* Open the audio device. */ ! if(audio_open(morse_settings.audio_rec.device) != 0) { ! error = -1; ! goto err_hndlr; } + + /* Initialize the audio device. */ + if(audio_init(morse_settings.audio_rec.device) != 0) { + error = -1; + goto err_hndlr; + } ! /* NOTE: Watch math here, these numbers should be some power two. Denominator and Numerator. */ ! morse_settings.fft_amp_pa_size = (int)get_audio_device_samples(morse_settings.audio_rec.device) / (int)morse_settings.tone_packet_size; ! morse_thread.dit_statistics.samples = 0; ! morse_thread.dah_statistics.samples = 0; ! ! /* Create an array for the FFT data. */ ! if(NULL == (fft_data = malloc(morse_settings.tone_packet_size * sizeof(double)))) { ! error = -1; ! goto err_hndlr; ! } ! ! /* Create a discrete time window for application to the audio packets prior to FFT. */ ! if(NULL == (morse_thread.dt_w = dt_window_create(DT_HAMMING_WINDOW, morse_settings.tone_packet_size))) { ! error = -1; ! goto err_hndlr; ! } ! ! /* Create an AGC object. */ ! if(NULL == (morse_thread.scope_gain = agc_create(FFT_DATA_MAX_GAIN, ! FFT_DATA_MIN_GAIN, ! FFT_NOISE_FLOOR, ! FFT_GRAPH_TOP, ! MORSE_AGC_TYPE, ! morse_thread.agc_dg, ! FFT_SCOPE_GAIN_DOWN_CRR_FACTOR))) { ! error = -1; ! goto err_hndlr; ! } ! ! /* Create a DeGlitch object. */ ! if(NULL == (morse_thread.packet_amp_array_dg = dglitch_create(DG_MEDIAN, MIN_NUM_PACKS_PER_DIT))) { ! error = -1; ! goto err_hndlr; ! } ! ! /* Duration in time represented by one FFT. */ ! morse_settings.tone_packet_duration = 1.0 / (double)morse_settings.audio_rec.sample_frequency * (double)morse_settings.tone_packet_size; ! /* FFT frequency resolution. */ ! morse_settings.fft_freq_step = (double)morse_settings.audio_rec.sample_frequency / (double)morse_settings.tone_packet_size; ! ! /* Create a FIR filter object. */ ! if(NULL == (morse_thread.fir_filter = fwin_create(morse_settings.audio_rec.sample_frequency, ! 500.0, ! 1500.0, ! FW_BANDPASS, ! FW_BLACKMAN, ! morse_thread.filter_taps))) { ! error = -1; ! goto err_hndlr; ! } ! ! morse_recompute_filter(); ! ! /* Create an array for audio packet amplitudes. */ ! if(NULL == (morse_thread.fft_amp_pa = malloc(morse_settings.fft_amp_pa_size * sizeof(double)))) { ! error = -1; ! goto err_hndlr; ! } ! ! /* Create an array for real audio data. */ ! if(NULL == (audio_data = malloc(get_audio_device_samples(morse_settings.audio_rec.device) * sizeof(double)))) { ! error = -1; ! goto err_hndlr; ! } ! ! run = THREADS_RUNNING; ! /* ! * not necessary to pass morse_data to thread, but in the future, this could pave the way ! * for decoding more than one signal at a time. Could be usefull when monitoring multiple QSO's. ! * In this case, code must be made re-entrant, no local static variables in functions. ! */ ! (void)pthread_create(&tid[MORSE_CODE_DECODING_THREAD], NULL, morse_code, (void*)&morse_thread); ! (void)pthread_create(&tid[DATA_COLLECTION_THREAD], NULL, data_collection, NULL); ! (void)pthread_create(&tid[AUDIO_POST_PROCESSING_THREAD], NULL, audio_post_process, NULL); ! ! /** @note Goto's are bad? I'm sure that's what you were taught... ! * It does yield a unified exit strategy for a function though, ! * without explicit multiple exit points. No need to "nest" ! * all of the above if statements as well. ! */ ! ! /* no error */ ! return error; ! ! err_hndlr: ! free_all(); ! run = THREADS_NOT_RUNNING; ! return error; } *************** *** 494,512 **** pthread_join(tid[AUDIO_POST_PROCESSING_THREAD], NULL); pthread_join(tid[MORSE_CODE_DECODING_THREAD], NULL); run = THREADS_NOT_RUNNING; - dt_window_destroy(&morse_thread.dt_w); - agc_destroy(&morse_thread.scope_gain); - dglitch_destroy(&morse_thread.packet_amp_array_dg); - fwin_destroy(&morse_thread.fir_filter); - audio_close(&morse_settings.audio_rec.device); - free(fft_data); - free(audio_data); - free(morse_thread.fft_amp_pa); - fft_data = NULL; - morse_thread.fft_amp_pa = NULL; } return run; } static void * data_collection(void *param) { --- 549,572 ---- pthread_join(tid[AUDIO_POST_PROCESSING_THREAD], NULL); pthread_join(tid[MORSE_CODE_DECODING_THREAD], NULL); + free_all(); run = THREADS_NOT_RUNNING; } return run; } + static void free_all(void) + { + dt_window_destroy(&morse_thread.dt_w); + agc_destroy(&morse_thread.scope_gain); + dglitch_destroy(&morse_thread.packet_amp_array_dg); + fwin_destroy(&morse_thread.fir_filter); + audio_close(&morse_settings.audio_rec.device); + free(fft_data); + free(audio_data); + free(morse_thread.fft_amp_pa); + fft_data = NULL; + morse_thread.fft_amp_pa = NULL; + } + static void * data_collection(void *param) { |
From: Ken P. <kp...@us...> - 2005-08-19 16:32:11
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3477/src Modified Files: dglitch.c Log Message: fix doxygen warnings Index: dglitch.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/dglitch.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dglitch.c 19 Aug 2005 15:20:28 -0000 1.9 --- dglitch.c 19 Aug 2005 16:32:00 -0000 1.10 *************** *** 66,69 **** --- 66,70 ---- * \param dg Pointer to deglitch object. * \param num Number to push onto stack. + * @todo Should be implemented in double Z fir fashion. */ static void dg_push(p_dglitch dg, double num); *************** *** 150,154 **** } - /** \todo Should be implemented in double Z fir fashion. */ static void dg_push(p_dglitch dg, double num) { --- 151,154 ---- |
From: Ken P. <kp...@us...> - 2005-08-19 15:53:04
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24779/src Modified Files: agc.h agc.c Log Message: fix doxygen errors Index: agc.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/agc.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** agc.h 11 Aug 2005 00:30:18 -0000 1.8 --- agc.h 19 Aug 2005 15:52:53 -0000 1.9 *************** *** 37,47 **** typedef struct s_agc *agc; ! /** Creates, and returns a pointer to an agc object. ! * \sa agc_destroy * \param max_gain The maximum gain of the agc object. * \param min_gain The minimum gain of the agc object. ! * \param fft_noise_floor The minimum amplitude required to compute a ngew gain. * \param max_amp The maximum amplitude desired. ! * \param correction_type The type of AGC gain correction. * \param gain_increase_correct The factor by which the gain will be increased. * \param gain_decrease_correct The factor by which the gain will be decreased. --- 37,46 ---- typedef struct s_agc *agc; ! /** Creates, and returns a pointer to an agc object. @sa agc_destroy * \param max_gain The maximum gain of the agc object. * \param min_gain The minimum gain of the agc object. ! * \param noise_floor The minimum amplitude required to compute a ngew gain. * \param max_amp The maximum amplitude desired. ! * \param agc_type The type of AGC gain correction. * \param gain_increase_correct The factor by which the gain will be increased. * \param gain_decrease_correct The factor by which the gain will be decreased. *************** *** 56,67 **** /** De-allocates the automatic gain object. ! * \sa agc_create */ void agc_destroy(agc *gain_object); ! /** Updates the agc gain, returns the new gain. ! * \sa agc_create ! * \param agc pointer to automatic gain object. ! * \param current_amplitude The curretn amplitude. */ double agc_update(agc gain_object, double current_amplitude); --- 55,65 ---- /** De-allocates the automatic gain object. ! * @param gain_object Pointer to the gain object to destroy. @sa agc @sa agc_create */ void agc_destroy(agc *gain_object); ! /** Updates the agc gain, returns the new gain. \sa agc_create ! * @param gain_object Automatic gain control object. ! * @param current_amplitude The current amplitude. */ double agc_update(agc gain_object, double current_amplitude); Index: agc.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/agc.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** agc.c 2 May 2005 00:37:02 -0000 1.7 --- agc.c 19 Aug 2005 15:52:53 -0000 1.8 *************** *** 35,39 **** #include "agc.h" ! /** \struct s_agc AGC object private members. */ typedef struct s_agc { --- 35,39 ---- #include "agc.h" ! /** AGC object private members. */ typedef struct s_agc { |
From: Ken P. <kp...@us...> - 2005-08-19 15:46:59
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23557/src Modified Files: audio.h Log Message: fix doxygen errors Index: audio.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** audio.h 12 Aug 2005 01:05:19 -0000 1.8 --- audio.h 19 Aug 2005 15:46:51 -0000 1.9 *************** *** 49,66 **** int audio_close(p_audio_device *device); ! //! Capture raw audio data from device \sa device ! /*! Real data is required GSL's FFT library. ! \param buffer_segment the buffer segment to put data into. */ void audio_capture(p_audio_device device, int buffer_segment); ! //! Converts the raw audio data to real. ! /*! Real data is required GSL's FFT library. ! \param buffer_segment the buffer segment to convert to real. ! \param audio_data Pointer to scaled audio data. ! */ void audio_raw2double(p_audio_device device, int buffer_segment, double *audio_data); ! //! Used to register an external error message handler function. void register_error_message_handler(message_handler handler); --- 49,67 ---- int audio_close(p_audio_device *device); ! /** Capture raw audio data from audio device. ! * @param device The audio device object. @sa p_audio_device ! * @param buffer_segment The buffer segment to put data into. */ void audio_capture(p_audio_device device, int buffer_segment); ! /** Converts the raw audio data to real. ! * @note Real data is required GSL's FFT library. ! * @param device The audio device object. @sa p_audio_device ! * @param buffer_segment the buffer segment to convert to real. ! * @param audio_data Pointer to scaled audio data. ! */ void audio_raw2double(p_audio_device device, int buffer_segment, double *audio_data); ! /** Used to register an external error message handler function. */ void register_error_message_handler(message_handler handler); |
From: Ken P. <kp...@us...> - 2005-08-19 15:20:39
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17857/src Modified Files: dglitch.c dglitch.h Log Message: fix some doxygen errors Index: dglitch.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/dglitch.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dglitch.h 11 Aug 2005 00:30:18 -0000 1.4 --- dglitch.h 19 Aug 2005 15:20:28 -0000 1.5 *************** *** 12,20 **** /** Creates a deglitch object. ! * \param window_size Number of consecutive samples used to compute one deglitched value. ! * \param size Desired size of the data. ! * \returns Pointer to the created deglitch object. */ ! p_dglitch dglitch_create(int type, size_t window_size); /** Destroys, and frees all memory from a deglitch object. --- 12,20 ---- /** Creates a deglitch object. ! * @param type Type of DeGlitch object to create. @sa te_dglitch_type ! * @param window_size Number of consecutive samples used to compute one deglitched value. ! * @returns Pointer to the created deglitch object. */ ! p_dglitch dglitch_create(te_dglitch_type type, size_t window_size); /** Destroys, and frees all memory from a deglitch object. Index: dglitch.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/dglitch.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dglitch.c 11 Aug 2005 00:30:18 -0000 1.8 --- dglitch.c 19 Aug 2005 15:20:28 -0000 1.9 *************** *** 74,78 **** static int dg_compare(const void *val1, const void *val2); ! p_dglitch dglitch_create(int type, size_t window_size) { p_dglitch dg; --- 74,78 ---- static int dg_compare(const void *val1, const void *val2); ! p_dglitch dglitch_create(te_dglitch_type type, size_t window_size) { p_dglitch dg; |
From: Ken P. <kp...@us...> - 2005-08-19 02:30:40
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3118/src Modified Files: audio_oss.h audio_alsa.h audio.c audio_oss.c Log Message: added play to OSS audio device (untested). Index: audio_oss.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio_oss.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** audio_oss.c 12 Aug 2005 01:23:32 -0000 1.4 --- audio_oss.c 19 Aug 2005 02:30:31 -0000 1.5 *************** *** 184,186 **** --- 184,199 ---- } } + + void audio_play_oss(p_audio_pub device, int buffer_segment) + { + int l; + int offset; + + offset = device->audio_buffer_size * buffer_segment; + + if((l = write(device->handle, &device->audio_buffer_raw[offset], device->audio_buffer_size)) <= 0) { + fprintf (stderr, "Unable to write data to audio device\n"); + device->error_msg_handler("Unable to write data to audio device.\nTry lowering the sample rate."); + } + } #endif /* HAVE_SYS_SOUNDCARD_H */ Index: audio.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** audio.c 18 Aug 2005 20:27:50 -0000 1.15 --- audio.c 19 Aug 2005 02:30:31 -0000 1.16 *************** *** 43,47 **** init: audio_init_oss, close: audio_close_oss, ! play: NULL, record: audio_record_oss }, --- 43,47 ---- init: audio_init_oss, close: audio_close_oss, ! play: audio_play_oss, record: audio_record_oss }, *************** *** 51,55 **** init: audio_init_alsa, close: audio_close_alsa, ! play: NULL, record: audio_record_alsa, } --- 51,55 ---- init: audio_init_alsa, close: audio_close_alsa, ! play: audio_play_alsa, record: audio_record_alsa, } Index: audio_oss.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio_oss.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** audio_oss.h 8 Aug 2005 00:57:58 -0000 1.2 --- audio_oss.h 19 Aug 2005 02:30:31 -0000 1.3 *************** *** 13,16 **** --- 13,17 ---- int audio_close_oss(p_audio_pub device); void audio_record_oss(p_audio_pub device, int buffer_segment); + void audio_play_oss(p_audio_pub device, int buffer_segment); #else /* HAVE_SYS_SOUNDCARD_H */ #define audio_open_oss NULL Index: audio_alsa.h =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio_alsa.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** audio_alsa.h 6 Aug 2005 18:09:35 -0000 1.1 --- audio_alsa.h 19 Aug 2005 02:30:31 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- #define audio_close_alsa NULL #define audio_record_alsa NULL + #define audio_play_alsa NULL #else /* HAVE_ALSA_ASOUNDLIB_H */ #define audio_open_alsa NULL *************** *** 18,21 **** --- 19,23 ---- #define audio_close_alsa NULL #define audio_record_alsa NULL + #define audio_play_alsa NULL #endif /* HAVE_ALSA_ASOUNDLIB_H */ |
From: Ken P. <kp...@us...> - 2005-08-18 20:28:07
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21000/src Modified Files: audio.c Log Message: audio_create will return NULL if an invalid audio device type is requested. Index: audio.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** audio.c 12 Aug 2005 01:05:19 -0000 1.14 --- audio.c 18 Aug 2005 20:27:50 -0000 1.15 *************** *** 62,66 **** ) { ! p_audio_device tmp; if(NULL != (tmp = malloc(sizeof(ts_audio_device))) ) { --- 62,66 ---- ) { ! p_audio_device tmp = NULL; if(NULL != (tmp = malloc(sizeof(ts_audio_device))) ) { *************** *** 69,88 **** */ if(device_type < NUMBER_OF_AUDIO_DEVICE_TYPES) { tmp->audio_api = (p_audio_api)&AUDIO_DEVICE_TABLE[device_type]; } else { ! tmp->audio_api = NULL; } - /* Copy the device name. */ - snprintf(tmp->audio_pub.name, AUDIO_DEVICE_NAME_LENGTH, "%s", device_name); - /* Setup the callback function for GUI error display.. */ - tmp->audio_pub.error_msg_handler = error_message; - /* Define audio device type, record or play. */ - tmp->audio_pub.play_record = rec_play; - /* Define sample frequency. */ - tmp->audio_pub.sample_frequency = sample_frequency; - } - else { - tmp = NULL; } return tmp; --- 69,89 ---- */ if(device_type < NUMBER_OF_AUDIO_DEVICE_TYPES) { + /* Set the audio api to the appropriate device type. */ tmp->audio_api = (p_audio_api)&AUDIO_DEVICE_TABLE[device_type]; + + /* Copy the device name. */ + snprintf(tmp->audio_pub.name, AUDIO_DEVICE_NAME_LENGTH, "%s", device_name); + /* Setup the callback function for GUI error display. */ + tmp->audio_pub.error_msg_handler = error_message; + /* Define audio device type, record or play. */ + tmp->audio_pub.play_record = rec_play; + /* Define sample frequency. */ + tmp->audio_pub.sample_frequency = sample_frequency; } else { ! /* The audio device type was in valid, return NULL. */ ! free(tmp); ! tmp = NULL; } } return tmp; |
From: Ken P. <kp...@us...> - 2005-08-12 01:31:48
|
Update of /cvsroot/morse2txt/morse2txt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31814 Added Files: Doxyfile Log Message: update doc gen options --- NEW FILE: Doxyfile --- # Doxyfile 1.3.7-KDevelop #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = morse2txt.kdevelop PROJECT_NUMBER = $VERSION$ OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = NO STRIP_FROM_PATH = /home/kprox/code STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO DETAILS_AT_TOP = NO INHERIT_DOCS = YES DISTRIBUTE_GROUP_DOC = NO TAB_SIZE = 4 ALIASES = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = YES EXTRACT_PRIVATE = YES EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = YES HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = /home/kprox/code/morse2txt FILE_PATTERNS = *.c \ *.h RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = YES INLINE_SOURCES = YES STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = NO TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4wide EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = morse2txt.tag ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO CLASS_GRAPH = YES COLLABORATION_GRAPH = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO GRAPHICAL_HIERARCHY = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 1000 GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO |
From: Ken P. <kp...@us...> - 2005-08-12 01:23:53
|
Update of /cvsroot/morse2txt/morse2txt/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30379/src Modified Files: audio_oss.c Log Message: added write/read option to open audio device. Index: audio_oss.c =================================================================== RCS file: /cvsroot/morse2txt/morse2txt/src/audio_oss.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** audio_oss.c 10 Aug 2005 12:01:23 -0000 1.3 --- audio_oss.c 12 Aug 2005 01:23:32 -0000 1.4 *************** *** 59,65 **** { int err; ! /* Test to see if audio device is busy. */ ! device->handle = open(device->name, (O_RDONLY | O_NONBLOCK), 0); if (device->handle == -1) { perror (device->name); --- 59,76 ---- { int err; ! int fctl; ! ! if(device->play_record == AUDIO_DEVICE_RECORD) { ! fctl = (O_RDONLY | O_NONBLOCK); ! } ! else if(device->play_record == AUDIO_DEVICE_PLAY) { ! fctl = (O_WRONLY | O_NONBLOCK); ! } ! else { ! fctl = (O_RDONLY | O_NONBLOCK); ! } ! /* Test to see if audio device is busy. */ ! device->handle = open(device->name, fctl, 0); if (device->handle == -1) { perror (device->name); |