A few tweaks to make it compile and run in Linux/ALSA, Linux PortAudio,

and Windows.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@114 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-01-16 16:39:11 +00:00
parent bc694f8c9c
commit 1e442bf2c8
8 changed files with 464 additions and 442 deletions

View File

@ -4,31 +4,31 @@ Changes in WSJT 5.9.2: January 10, 2006
Enhancements
------------
1. Thread priorities have been adjusted for smoother operation. One
result is that there will be fewer audio glitches caused by the
Windows O/S paying attention to other programs.
1. Thread priorities have been adjusted for smoother operation.
2. The JT65 decoder now has improved immunity to "garbage data," and
it exhibits better performance on strong signals.
2. The JT65 decoder now has improved immunity to garbage data
(birdies, QRM, etc.) and it exhibits better performance on
strong signals.
3. The FSK441 decoder produces less on-screen gibberish when you do
mouse-picked decodes.
3. The FSK441 decoder produces less on-screen gibberish when you
request mouse-picked decodes.
4. The JT6M decoder now makes better use of Freeze and Tol. You can
set the value of "Freeze DF" by using the Right/Left arrow keys.
(This feature is also useful in JT65 mode.)
5. On-screen font sizes can be set by using Windows Notepad (or
another text editor) to edit the file wsjtrc.win. If your screen
has resolution greater than 1024 x 768, or if you have old eyes
like mine, you may want to increase the sizes from 8 and 9 points
(first three lines of the file) to, say, 9 and 10 points.
like mine, you may want to increase the font sizes from 8 and 9
points (first three lines of the file) to, say, 9 and 10 points.
6. A simulator mode is now built into WSJT. It is presently most
useful in JT65 mode. By entering, say, "#-22" in the text box for
Tx6, you signify that the program should generate its Tx audio
files with the signal embedded in white gaussian noise, 22 dB
below the noise power in a 2.5 kHz bandwidth. You can direct this
signal into a second computer running WSJT, for eaxmple to test
signal into a second computer running WSJT, for example to test
the decoder or to practice operating in JT65 mode. You can even
have the two computers "work each other", although changing
messages of course requires operator action.
@ -83,6 +83,7 @@ The present WSJT working group consists of:
Diane Bruce, VA3DB
James Courtier-Dutton
Bob McGwier, N4HY
Jonathan Naylor, ON/G4KLX
Stewart Nelson, KK7KA
Joe Taylor, K1JT
Kaj Wiik, OH6EH

View File

@ -1,4 +1,3 @@
!------------------------------------------------ audio_init
subroutine audio_init(ndin,ndout)
@ -11,7 +10,17 @@ subroutine audio_init(ndin,ndout)
integer*2 a(225000) !Pixel values for 750 x 300 array
integer brightness,contrast
include 'gcom1.f90'
include 'gcom2.f90'
nmode=1
if(mode(1:4).eq.'JT65') then
nmode=2
if(mode(5:5).eq.'A') mode65=1
if(mode(5:5).eq.'B') mode65=2
if(mode(5:5).eq.'C') mode65=4
endif
if(mode.eq.'Echo') nmode=3
if(mode.eq.'JT6M') nmode=4
ndevin=ndin
ndevout=ndout
TxOK=0

View File

@ -211,7 +211,7 @@ subroutine addnoise(n)
real r(12)
real*8 txsnrdb0
include 'gcom1.f90'
save txsnrdb0
save
if(txsnrdb.gt.40.0) return
if(txsnrdb.ne.txsnrdb0) then

View File

@ -174,13 +174,16 @@ static int SoundOut( void *inputBuffer, void *outputBuffer,
*wptr++ = n2; //right
ic++;
if(ic>=*data->nwave) {
ic = ic % *data->nwave; //Wrap buffer pointer if necessary
if(*data->nmode==2)
if(*data->nmode==2) {
*data->TxOK=0;
ic--;
}
else
ic = ic % *data->nwave; //Wrap buffer pointer if necessary
}
}
} else {
memset((void*)outputBuffer, 0, 2*sizeof(int16_t)*framesPerBuffer);
memset((void*)outputBuffer, 0, 2*sizeof(short)*framesPerBuffer);
}
fivehztx_(); //Call fortran routine
return 0;

View File

@ -88,7 +88,7 @@ ptt_(int *nport, int *ntx, int *iptt)
/* open the device */
if ((fd = open(s, O_RDWR | O_NDELAY)) < 0) {
fprintf(stderr, "Can't open %s.", s);
fprintf(stderr, "Can't open %s.\n", s);
return(1);
}

View File

@ -329,6 +329,7 @@ int playback_callback(alsa_driver_t *alsa_driver_playback) {
int nsec;
int i,n;
static int ic;
static short int n2;
int16_t b0[2048];
// printf("playback callback\n");
@ -353,12 +354,17 @@ int playback_callback(alsa_driver_t *alsa_driver_playback) {
alsa_playback_buffers[0] = b0;
alsa_playback_buffers[1] = b0;
for(i=0; i<this->period_size; i++) {
b0[i]=this->app_buffer_y1[ic];
n2=this->app_buffer_y1[ic];
addnoise_(&n2);
b0[i]=n2;
ic++;
if(ic >= *this->nwave) {
ic=ic % *this->nwave;
if(*this->nmode == 2)
if(ic>=*this->nwave) {
if(*this->nmode==2) {
*this->tx_ok=0;
ic--;
}
else
ic = ic % *this->nwave; //Wrap buffer pointer
}
}
} else {
@ -368,7 +374,7 @@ int playback_callback(alsa_driver_t *alsa_driver_playback) {
result = snd_pcm_writen(this->audio_fd, alsa_playback_buffers, this->period_size);
this->tx_offset += this->period_size;
if (result != this->period_size) {
printf("playback writei failed. Expected %d samples, sent only %d\n", this->period_size, result);
printf("Playback write failed. Expected %d samples, sent only %d\n", this->period_size, result);
#ifdef ALSA_PLAYBACK_LOG
snd_pcm_status_t *pcm_stat;
snd_pcm_status_alloca(&pcm_stat);
@ -524,7 +530,7 @@ int start_threads_(int *ndevin, int *ndevout, short y1[], short y2[],
// printf("start_threads: creating thread for decode1\n");
iret1 = pthread_create(&thread1,NULL,decode1_,&iarg1);
/* Open audio card. */
printf("Starting alsa routines.\n");
printf("Using ALSA sound.\n");
ao_alsa_open(&alsa_driver_playback, &rate, SND_PCM_STREAM_PLAYBACK);
ao_alsa_open(&alsa_driver_capture, &rate, SND_PCM_STREAM_CAPTURE);

View File

@ -1,4 +1,4 @@
#--------------------------------------------------------------- WSJT
#-------------------------------------------------------------- WSJT
from Tkinter import *
from tkFileDialog import *
import Pmw
@ -647,8 +647,11 @@ on 50 MHz; JT65, an extremely sensitive mode for troposcatter
and EME; CW at 15 WPM with messages structured for EME; and
an EME Echo mode for measuring your own echoes from the moon.
WSJT is Copyright (c) 2001-2005 by Joseph H. Taylor, Jr., K1JT,
and is licensed under the GNU General Public License (GPL).
WSJT is Copyright (c) 2001-2006 by Joseph H. Taylor, Jr., K1JT,
with contributions from additional authors. It is Open Source
software, licensed under the GNU General Public License (GPL).
Source code and programming information may be found at
http://developer.berlios.de/projects/wsjt/.
"""
Label(about,text=t,justify=LEFT).pack(padx=20)
t="Revision date: " + \