Commit Graph

45 Commits

Author SHA1 Message Date
Bill Somerville
b6559fae7c Added audio channel support.
Audio input can be mono, left of stereo pair or, right of stereo
pair. Audio output can be mono, left of stereo pair, right of stereo
pair or, both of stereo pair (the same output goes to both channels in
both mode). Settings are remembered between sessions.

Stream channel suport is implemented mainly in the new AudioDevice
class which is now the base class of Modulator and Detector.

Audio channels are selected on the configuration screen. Only
supported channel configurations per device can be selected.

Audio output volume (actually attenuation) is now possible from the
GUI. I have added a slider control to the main window; I don't
necessarily propose this as a final release location for the widget as
I understand that changes to the main screen are sensitive. This
location is just a starting suggestion for a trial. The volume
(attenuation) setting is remembered between sessions and is not device
dependent. This addresses all issues of volume setting on *nix
versions since there is no need to use pavucontrol to set audio
levels. The volume (attenuation) action is logarithmic.

Shaped CW keying has been implemented in Modulator although it is
currently disabled as I am not 100% happy wth the implementation. If
you want to try it define the C++ preprocessor macro WSJT_SOFT_KEYING
in your build.

The Modulator instance has been moved to the same thread as the
SoundOutput instance as it should have been since the output callback
already operates in that thread. Cross thread slots are now correctly
called in a thread safe way as a result.

A number of files where in the SVN repository with DOS line endings
which I have removed. SVN users on Windows need set the config for
native line endings so that DOS line endings are automatically
stripped on checkin.

The DevSetup class now holds it's UI o the heap to reduce imapact on
build dependencies.

The application settings are now passed to objects from the main.cpp
file. Management of settings are moved to the responsible classes (top
level windows). This has involved a few settings moving groups so
users will see some settings reverting to default values on the first
run of an update.

Persistance of top level windows geometry and position is now handled
in the recommened manner (constructor for load, closeEvent for store
in modal windows and, hideEvent for store in modeless dialogs).

The MainWindow class now holds its children as members rather than
global variables.

The LogQSO class now hides its implementation and takes responsibility
for its own settings and widows rendering parameters. A new settings
file group is implemented to persist the LogQSO class settings.

The WideGraph class now hides its implementation and manages its own
settings and window rendering parameters.

  --This line, and those below, will be ignored--

M    Modulator.cpp
M    rigclass.cpp
M    widegraph.cpp
M    signalmeter.cpp
M    soundin.cpp
M    soundout.cpp
M    mainwindow.h
M    main.cpp
M    meterwidget.h
M    devsetup.cpp
M    mainwindow.ui
M    Detector.cpp
M    logqso.h
M    rigclass.h
M    mainwindow.cpp
M    meterwidget.cpp
M    soundin.h
M    devsetup.ui
M    wsjtx.pro
M    devsetup.h
M    logqso.cpp
M    Modulator.hpp
M    psk_reporter.cpp
M    killbyname.cpp
M    Detector.hpp
M    signalmeter.h
M    widegraph.h
M    psk_reporter.h
M    soundout.h
M    PSKReporter.h
M    lib/afc65b.f90
M    lib/gran.c
M    lib/usleep.c
M    lib/afc9.f90
M    lib/wrapkarn.c
A    AudioDevice.hpp


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3542 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-10 15:29:55 +00:00
Joe Taylor
fde1b213c3 1. Capitalize names of palettes appropriately.
2. Remove (or comment out) most qDebug() statements.
3. Swap positions of labels 2 and 3 on status bar.
4. In "Split Tx" mode, transmit audio always between 1500 and 2000 Hz.
5. Rearrange positions of WideGraph controls.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3535 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-08 14:26:53 +00:00
Bill Somerville
e602def8b1 Qt 5 Audio replaces PortAudio.
Currently only Qt5 or above is known to work with this code. It may be
possible to backport it to Qt4 if required.

Audio output goes back to a separate thread to try and minimize
stutters in streaming on Windows particularly.

A crash on Linux due to mishandling of stereo audio output has been
fixed and both left and right channels are now correctly synthesised
with identical contents.

Rigs are enumerated directly from hamlib API rather than running a sub
process reading output of rigctl -l. This was initially done to get
rid of some GUI thread blocking in the configuration dialog, but is
generally a better way of doing it anyway.

Some refactoring in MainWindow to accomodate the audio streaming,
modulation and detecting classes.

Exit handling for application refactored to use signals rather than
brute force event loop exit. This was required to get correct thread
shutdown semantics.

The GUI update timer is now stopped during application shutdown which
is necessary to stop crashes when shutting down gracefully with
signals and window close() calls.

There is an outstanding issue with Linux audio streams; the QAudio
Input/Output classes create a new stream name each time a stream is
started. This doesn't play well with PulseAudio utilities such as
pavucontrol to set stream volume as settings are lost every tx
period. I have tried to keep a single stream for all output but there
are problems restarting it that haven't been resolved yet.

The QtCreator project file has been rearranged a little because it
passes all the object files to the linker rather than using an archive
library. Since the GNU linker is single pass; the object files need to
be in a logical order with definitions appearing afer references to
them. This was required to avoid a linking error.

The lib/Makefile.linux has been enhanced to use the fortran compiler
to locate the correct version of the Fortran library to use. This is
necessary on the latest Linux distros because the unversioned symlink
to compiler support libraries is no longer provided. This only an
issue with mixed programming language links where the linker driver
for one language has to link support libraraies for another language.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3532 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-07 23:09:13 +00:00
Joe Taylor
7bdc623ec6 1. Use a ComboBox for palette selection.
2. Minor adjustments to position of WideGraph controls.
3. Include the palette files.  The whole directory "Palettes" should
be copied into the install directory.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3529 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-07 18:59:11 +00:00
Joe Taylor
87ad45188f Most of these changes are thanks to G4WJS. Audio I/O is now done using
Qt's built-in QAudio calls rather than PortAudio.  Also includes some
refactoring of the arrangement for these calls, and more use of C++ style.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3523 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-05 13:57:55 +00:00
Joe Taylor
c5b46973f2 Thanks to G4WJS: SoundOut functions have been moved into the GUI thread.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3517 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-01 00:49:58 +00:00
Joe Taylor
edd93c8fc2 If "Split Tx" is not ticked, send the correct (un-shifted) audio tones.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3467 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-07-09 00:42:43 +00:00
Joe Taylor
8fb483a200 Merging code for v1.1 back into the main wsjtx branch.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3462 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-07-08 13:17:22 +00:00
Joe Taylor
7fd790e8be Change "unix" to "UNIX" in #ifdef's.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3322 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-29 16:31:05 +00:00
Joe Taylor
5b9ec45e74 1. Correct a flaw in setting m_lockFreq in wideGraph.
2. Double-click on a 73 message sets Tx5, rather than Tx6.
3. Clean up a few remaining compiler warnings.
4. Clean up Tab order.
5. Updates to User's Guide


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3320 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-29 15:09:04 +00:00
Joe Taylor
a6f2044010 Cleaning up compiler warnings on Linux.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3319 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-29 13:41:57 +00:00
Joe Taylor
a170d9df1f 1. Correct the listings of Audio In and Audio Out devices, on unix-like
platforms.
2. This might be temporary: set Audio output on unix platforms to stereo,
i.e., channels=2.  On my Ubuntu system, at least, this makes it play
correctly on all of the relevant audio devices in the list, including
hardware and virtual (".asoundrc-implemented") devices.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3317 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-28 19:16:25 +00:00
Joe Taylor
4db6e40734 1. Keyboard shortcuts Alt+1 to Alt+6 set next Tx message to 1-6.
2. SoundOut buffer size can be set by editing wsjtx.ini.
3. Fixed bug in placement of #ifdef in rigclass.cpp


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3313 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-24 12:36:41 +00:00
Joe Taylor
3ead1e4d9e Silence two more compiler warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3307 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-23 17:11:10 +00:00
Joe Taylor
94645ac24c Fix problem with "Tune" at startup. status
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3174 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-04-15 23:42:42 +00:00
Joe Taylor
c94eb2ff4b Added "Tune" button.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3168 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-04-14 14:11:20 +00:00
Joe Taylor
6fee99a1d6 Clean up the transition from JT9 tones to CW ID.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3151 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-04-10 15:50:40 +00:00
Joe Taylor
d2d0583e5a 1. Fix end-of-transmission logic so that CW ID works again.
2. Much better logic for choosing frequencies at which to attempt decodes.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3143 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-04-09 20:59:53 +00:00
Joe Taylor
cd15a5e4d6 1. Click on spectrum sets Rx freq; double-click also invokes narrow-band
decoder at the new frequency.  CTRL-click (or CTRL-double-click) sets both 
Rx and Tx freqs.
2. Amplitude at end of transmission is ramped down to prevent a "key click".


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3139 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-04-09 15:16:34 +00:00
Joe Taylor
eceeb969ad Add "Prompt to log QSO" option on Setup menu.
Reduce code speed for CW ID to 22.5 WPM.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3110 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-03-26 16:23:40 +00:00
Joe Taylor
e539ee3760 Reports -1 to -9 displayed as -01 to -09 in Tx messages.
Save/restore band setting on program restart.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3090 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-03-25 01:39:20 +00:00
Joe Taylor
12523c42a4 Implemented CW ID.
Signal reports 0 dB and above now displayed as "+03", "+16", etc.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3089 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-03-25 01:24:47 +00:00
Edson W. R. Pereira
4dbeb17500 Change to soundout.cpp to get output audio working under Linux.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3088 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-03-24 22:34:57 +00:00
Joe Taylor
224f887b26 I think sequencing is now OK when Auto is turned OFF.
Also, F3 (TxMute) now works.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2786 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-28 23:55:32 +00:00
Joe Taylor
667631106f Increase height of status-bar labels.
Compute samfac values; put them into "lab5" (for K1JT only).
Ransomize the rand() seed on SoundOutThread startup.
Increase the DT search range.  (This still needs optimization.)



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2724 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-13 20:23:03 +00:00
Joe Taylor
009dbdeea5 Calibrate the S/N generated by putting "#-27", etc., into the Tx6 message.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2722 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-12 21:30:00 +00:00
Joe Taylor
2dfa4059fe Tweaks to .doc, and minor code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2703 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-29 21:10:03 +00:00
Joe Taylor
3aaa6adacc Change output sample rate to 48 kHz.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2700 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-29 13:42:09 +00:00
Joe Taylor
a1387d0a1f Fix the "changed modes" problem in soundout.cpp.
Move the ptt function into the Qt-managed code.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2699 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-28 15:47:43 +00:00
Joe Taylor
2deccb0362 Implement adding Tx audio noise via "TxSNR".
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2693 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-26 14:03:43 +00:00
Joe Taylor
2a11cd7c5e Some cleanup of code and repository.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2670 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-17 19:58:35 +00:00
Joe Taylor
734e6e7163 Several tweaks toward letting someone else Tx to me...
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2651 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-05 19:14:45 +00:00
Joe Taylor
9135fb585c Define twopi with more precision.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2649 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-05 17:17:37 +00:00
Joe Taylor
8fbb6bac79 Many changes. Waterfall plots now pretty much OK. (May want to limit
displayed range to 1000 Hz.)  Noise blanking may be working -- needs
tests.  Tx has been implemented.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2648 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-05 17:13:21 +00:00
Joe Taylor
1b24a7188d Basic operation with waterfall display, thermo, etc.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2598 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-26 00:48:49 +00:00
Joe Taylor
35e000d810 Morphing back to the from MAP65 for widegraph and plotter.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2595 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-24 23:36:38 +00:00
Joe Taylor
2171b79a94 Morphing toward a usable WSJT-X with JT8 modes.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2594 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-24 19:11:31 +00:00
Joe Taylor
04c4b99a53 New JTMS3 definition (again). Now using 7-bit characters, as in
the JTMS of WSJT9.  Modulation changed to BPSK, speed increased 
from 1378.125 to 2000 baud.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2505 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-12 19:10:39 +00:00
Joe Taylor
8af8a0529d Working on file saving, T/R sequencing, etc.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2494 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-06 15:57:30 +00:00
Joe Taylor
b1fd11b06b Cleanup of code. Temporary simple definition of BPSK signal with
rectangular pulses.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2484 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-04 17:48:57 +00:00
Joe Taylor
1866a937e4 Continuing to work on SoundIn, SoundOut...
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2483 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-04 16:27:57 +00:00
Joe Taylor
f5b9756a9a Soundout is now working (or at least making noise) with JTMS3 waveforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2479 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-03 19:43:26 +00:00
Joe Taylor
900ff9f2c8 Starting to implement sound I/O. Changing T/R period to 30 s.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2478 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-02 20:52:56 +00:00
Joe Taylor
c4a1997191 Set properties for native eol style and the "Rev" keyword.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2464 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-05-22 17:09:48 +00:00
Joe Taylor
04dcf0a528 Major changes to the MAP65 branch. This branch is now a copy of
MAP65 v2.3.0, r631, as checked out from the SVN repository on
pulsar.princeton.edu.  If all goes well with this commit, subsequent
MAP65 development will use the Berlios repository.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2461 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-05-22 14:28:39 +00:00