Commit Graph

42 Commits

Author SHA1 Message Date
Bill Somerville
833eaf9eef Fix audio input rate issue on Windows Vista
Windows Vista has a broken rate converter which gets invoked when an
input audio stream at 48kHz sampel rate is requested. I've no idea why
our application can't get exclusive access to the audio input device
and have a unconverted stream direct at 48kHz.

To get around this our down sampling filter for audio input from 48kHz
to 12kHz is disaabled by default on Windows Vista, instead we request
a 12kHz stream and process it directly.

This default behviour can be overriden by specifying the following
settings value:

[Tune]
Audio\DisableInputResampling=false

This settings value defaults to true on Windows Vista and false
everywhere else so normally needn't be present.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3588 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-10-04 19:00:29 +00:00
John Nelson
f35913f34c Changes for 48000 Hz Audio in samplerate
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3577 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-09-27 13:57:48 +00:00
Bill Somerville
0a67803476 Moved audio input to the audio thread.
Change source URLs in teh CMake scripts for the kvasd binaries.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3563 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-08-17 19:21:14 +00:00
Bill Somerville
4f4c535c4e 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
a114b8c9ea 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
ef586e4b58 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
61f023ddd1 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
9fa4270b57 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
871f486848 1. Finish implementing a monochrome waterfall palette.
2. Update credits displayed in the "About" window.
3. Working on audio input via the QAudio library.  Not yet finished!


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3513 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-07-31 15:46:28 +00:00
Joe Taylor
608a4fddd4 Minor code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3511 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-07-31 00:03:26 +00:00
Joe Taylor
d45f47caa0 1. Fix a longstanding (and evidently latent) bug in widegraph.cpp.
2. Add basic proof-of-concept code that uses QAudioInput instead of
PortAudio for sound input.  By default, this test code is not active,
and it compiles using PortAudio.  To compile using QAudio, uncomment
the line

#DEFINES += QAUDIO_INPUT

in wsjtx.pro.  Note that device selection in the QAudio code is presently
hard-wired to use the default input device.  You can change this 
choice on line 267 in soundin.cpp.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3510 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-07-30 20:36:14 +00:00
Joe Taylor
4e8a3f54c9 1. Refactoring of code so as to move audio input from a separate thread to
the main GUI thread (thanks to G4WJS).

2.. Also, for the record, some example code for using QAudioInput instead 
of PortAudio.  This code is not presently active, and will need to be 
changed to accommodate the changes in #1, above.  But the basic ideas 
are here...


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3509 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-07-30 00:51:42 +00:00
Joe Taylor
3dc6abc0c1 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
9890731f4f 1. De-activate submodes JT9-5, JT9-10, and JT9-30. (This makes the shared
memory region smaller by some 150 MB.)
2. Some code cleanup (removing unused lstrong, etc.)...


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3283 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-05-20 14:09:02 +00:00
Edson W. R. Pereira
a571077996 Syncing updates
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3079 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2013-03-24 14:05:31 +00:00
Joe Taylor
d25e129756 Now working with decoding done in a separate process, jt9.exe.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2756 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-21 17:42:53 +00:00
Joe Taylor
561acda6f7 Introduce nzhsym, the number of computed half-symbol spectra.
Correct the logic for computing lag range in sync9.f90.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2751 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-19 18:23:39 +00:00
Joe Taylor
0d58ad7b9c 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
5d030bd413 Much code cleanup: remove unised variables and code.
Include # channels in audio device offerings.
Start implementing "msgsent" correctly.  (Not finished!)
Include Date in UTC display.
Use the properly computer snrdb.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2718 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-12 16:33:45 +00:00
Joe Taylor
c19460de27 Updates to Users Guide.
Double-click on waterfall sets Tol to a reduced (mode-dependent) value.
Tol is saved/restored on program restart.
Added digital gain slider for setting input level.
Garbage decode "15P6715P67WCV" is rejected.
Arrays ss and c0 are copied and saved when newdat=1.  Further processing is
done on the copies.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2712 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-11-01 19:54:40 +00:00
Joe Taylor
90ad55cf77 Remove m_DF and associated code.
Disable some presently un-implemented controls.
Begin implemnting "Save Synced" and "Save Decoded".
Set compilation to CONSOLE mode.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2706 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-30 16:49:24 +00:00
Joe Taylor
b10df1efdc Code cleanup. Implement use of fQSO, ntol, etc.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2671 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-19 19:26:07 +00:00
Joe Taylor
3c6766fc3d Decoded text now appears in main window. However, ... the next decode
request fails.  Then 3rd one is OK, 4th fails, etc., etc.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2669 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-16 23:32:15 +00:00
Joe Taylor
6b800ad459 Reset k=0 if sub-mode changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2650 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-05 17:41:04 +00:00
Joe Taylor
86dcc48e0a 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
e2e3e98e06 More cleanup; correct the value of NSMAX in GUI.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2639 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-10-03 15:42:13 +00:00
Joe Taylor
5670bc4709 Working on wide graph displays.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2609 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-29 13:02:19 +00:00
Joe Taylor
c7d9c1a8ab Now can see signal on both waterfall plots. (Far from correct, though!)
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2608 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-28 23:59:50 +00:00
Joe Taylor
1951a80464 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
92a6975fc1 Progress on symspecx and timf2x, etc.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2597 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-25 20:26:12 +00:00
Joe Taylor
ad7f10843e Further mods toward implementing JT8 modes.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2596 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-09-25 16:04:38 +00:00
Joe Taylor
2afd4513c8 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
000502af77 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
2b562ddfe4 Now displaying 2d spectrum or "PSK spectrum".
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2509 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-13 13:37:50 +00:00
Joe Taylor
091301129e We are now plotting a green line. (Needs more work, though.)
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2501 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-07 18:10:39 +00:00
Joe Taylor
20ba526656 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
93224b3b31 Changed soundin to i*2 rather than r*4.
Activated saving of WAV files. (but so far, without headers).
Tx waveform now uses sinc() pulses.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2489 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-05 16:16:03 +00:00
Joe Taylor
d313457be5 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
2075b69fb3 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
6703d4850d Cleaning up the soundin routine.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2480 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-03 20:07:37 +00:00
Joe Taylor
0875a12cad 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
9e73f87218 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