mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 20:28:42 -05:00
Merge branch 'develop' into feat-fst280
This commit is contained in:
commit
c9f9c1d7c8
@ -88,17 +88,16 @@ void SoundInput::start(QAudioDeviceInfo const& device, int framesPerBuffer, Audi
|
|||||||
//qDebug () << "SoundIn default buffer size (bytes):" << m_stream->bufferSize () << "period size:" << m_stream->periodSize ();
|
//qDebug () << "SoundIn default buffer size (bytes):" << m_stream->bufferSize () << "period size:" << m_stream->periodSize ();
|
||||||
// the Windows MME version of QAudioInput uses 1/5 of the buffer
|
// the Windows MME version of QAudioInput uses 1/5 of the buffer
|
||||||
// size for period size other platforms seem to optimize themselves
|
// size for period size other platforms seem to optimize themselves
|
||||||
#if defined (Q_OS_WIN)
|
if (framesPerBuffer > 0)
|
||||||
m_stream->setBufferSize (m_stream->format ().bytesForFrames (framesPerBuffer * 5));
|
{
|
||||||
#else
|
m_stream->setBufferSize (m_stream->format ().bytesForFrames (framesPerBuffer));
|
||||||
Q_UNUSED (framesPerBuffer);
|
}
|
||||||
#endif
|
|
||||||
if (m_sink->initialize (QIODevice::WriteOnly, channel))
|
if (m_sink->initialize (QIODevice::WriteOnly, channel))
|
||||||
{
|
{
|
||||||
m_stream->start (sink);
|
m_stream->start (sink);
|
||||||
checkStream ();
|
checkStream ();
|
||||||
cummulative_lost_usec_ = -1;
|
cummulative_lost_usec_ = -1;
|
||||||
//qDebug () << "SoundIn selected buffer size (bytes):" << m_stream->bufferSize () << "peirod size:" << m_stream->periodSize ();
|
LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -111,7 +111,7 @@ void SoundOutput::restart (QIODevice * source)
|
|||||||
}
|
}
|
||||||
m_stream->setCategory ("production");
|
m_stream->setCategory ("production");
|
||||||
m_stream->start (source);
|
m_stream->start (source);
|
||||||
LOG_INFO ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
|
LOG_DEBUG ("Selected buffer size (bytes): " << m_stream->bufferSize () << " period size: " << m_stream->periodSize ());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundOutput::suspend ()
|
void SoundOutput::suspend ()
|
||||||
|
@ -34,10 +34,9 @@ Double-click on the wsjtx-...-Darwin.dmg file you have downloaded from K1JT's we
|
|||||||
Now open a Terminal window by going to Applications->Utilities and clicking on Terminal.
|
Now open a Terminal window by going to Applications->Utilities and clicking on Terminal.
|
||||||
|
|
||||||
Along with this ReadMe file there is a file: sysctl.conf which must be copied to a
|
Along with this ReadMe file there is a file: sysctl.conf which must be copied to a
|
||||||
system area by typing these two lines in the Terminal window and then pressing the Return key
|
system area by typing this line in the Terminal window and then pressing the Return key.
|
||||||
after each line.
|
|
||||||
|
|
||||||
sudo cp /Volumes/WSJT-X/sysctl.conf /etc
|
sudo cp /Volumes/WSJT-X/sysctl.conf /etc
|
||||||
|
|
||||||
you will be asked for your normal password because authorisation is needed to copy this file.
|
you will be asked for your normal password because authorisation is needed to copy this file.
|
||||||
(Your password will not be echoed but press the Return key when completed.)
|
(Your password will not be echoed but press the Return key when completed.)
|
||||||
@ -45,7 +44,7 @@ Now re-boot your Mac. This is necessary to install the changes. After the
|
|||||||
reboot you should re-open the Terminal window as before and you can check that the
|
reboot you should re-open the Terminal window as before and you can check that the
|
||||||
change has been made by typing:
|
change has been made by typing:
|
||||||
|
|
||||||
sysctl -a | grep sysv.shm
|
sysctl -a | grep sysv.shm
|
||||||
|
|
||||||
If shmmax is not shown as 104857600 then contact me since WSJT-X will fail to load with
|
If shmmax is not shown as 104857600 then contact me since WSJT-X will fail to load with
|
||||||
an error message: "Unable to create shared memory segment".
|
an error message: "Unable to create shared memory segment".
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "logqso.h"
|
#include "logqso.h"
|
||||||
|
|
||||||
|
#include <QLocale>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
@ -61,6 +62,9 @@ LogQSO::LogQSO(QString const& programTitle, QSettings * settings
|
|||||||
ui->comboBoxPropMode->addItem (prop_mode.name_, prop_mode.id_);
|
ui->comboBoxPropMode->addItem (prop_mode.name_, prop_mode.id_);
|
||||||
}
|
}
|
||||||
loadSettings ();
|
loadSettings ();
|
||||||
|
auto date_time_format = QLocale {}.dateFormat (QLocale::ShortFormat) + " hh:mm:ss";
|
||||||
|
ui->start_date_time->setDisplayFormat (date_time_format);
|
||||||
|
ui->end_date_time->setDisplayFormat (date_time_format);
|
||||||
ui->grid->setValidator (new MaidenheadLocatorValidator {this});
|
ui->grid->setValidator (new MaidenheadLocatorValidator {this});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ namespace
|
|||||||
QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"};
|
QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"};
|
||||||
auto quint32_max = std::numeric_limits<quint32>::max ();
|
auto quint32_max = std::numeric_limits<quint32>::max ();
|
||||||
constexpr int N_WIDGETS {36};
|
constexpr int N_WIDGETS {36};
|
||||||
constexpr int rx_chunk_size {3456}; // audio samples at 12000 Hz
|
constexpr int default_rx_audio_buffer_frames {-1}; // lets Qt decide
|
||||||
constexpr int default_tx_audio_buffer_frames {-1}; // lets Qt decide
|
constexpr int default_tx_audio_buffer_frames {-1}; // lets Qt decide
|
||||||
|
|
||||||
bool message_is_73 (int type, QStringList const& msg_parts)
|
bool message_is_73 (int type, QStringList const& msg_parts)
|
||||||
@ -272,6 +272,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
m_soundInput {new SoundInput},
|
m_soundInput {new SoundInput},
|
||||||
m_modulator {new Modulator {TX_SAMPLE_RATE, NTMAX}},
|
m_modulator {new Modulator {TX_SAMPLE_RATE, NTMAX}},
|
||||||
m_soundOutput {new SoundOutput},
|
m_soundOutput {new SoundOutput},
|
||||||
|
m_rx_audio_buffer_frames {0},
|
||||||
m_tx_audio_buffer_frames {0},
|
m_tx_audio_buffer_frames {0},
|
||||||
m_msErase {0},
|
m_msErase {0},
|
||||||
m_secBandChanged {0},
|
m_secBandChanged {0},
|
||||||
@ -464,7 +465,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
m_soundInput->moveToThread (&m_audioThread);
|
m_soundInput->moveToThread (&m_audioThread);
|
||||||
m_detector->moveToThread (&m_audioThread);
|
m_detector->moveToThread (&m_audioThread);
|
||||||
bool ok;
|
bool ok;
|
||||||
auto buffer_size = env.value ("WSJT_TX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok);
|
auto buffer_size = env.value ("WSJT_RX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok);
|
||||||
|
m_rx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_rx_audio_buffer_frames;
|
||||||
|
buffer_size = env.value ("WSJT_TX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok);
|
||||||
m_tx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_tx_audio_buffer_frames;
|
m_tx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_tx_audio_buffer_frames;
|
||||||
|
|
||||||
// hook up sound output stream slots & signals and disposal
|
// hook up sound output stream slots & signals and disposal
|
||||||
@ -943,7 +946,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
if (!m_config.audio_input_device ().isNull ())
|
if (!m_config.audio_input_device ().isNull ())
|
||||||
{
|
{
|
||||||
Q_EMIT startAudioInputStream (m_config.audio_input_device ()
|
Q_EMIT startAudioInputStream (m_config.audio_input_device ()
|
||||||
, rx_chunk_size * m_downSampleFactor
|
, m_rx_audio_buffer_frames
|
||||||
, m_detector, m_downSampleFactor, m_config.audio_input_channel ());
|
, m_detector, m_downSampleFactor, m_config.audio_input_channel ());
|
||||||
}
|
}
|
||||||
if (!m_config.audio_output_device ().isNull ())
|
if (!m_config.audio_output_device ().isNull ())
|
||||||
@ -1860,7 +1863,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
|||||||
|
|
||||||
if(m_config.restart_audio_input () && !m_config.audio_input_device ().isNull ()) {
|
if(m_config.restart_audio_input () && !m_config.audio_input_device ().isNull ()) {
|
||||||
Q_EMIT startAudioInputStream (m_config.audio_input_device ()
|
Q_EMIT startAudioInputStream (m_config.audio_input_device ()
|
||||||
, rx_chunk_size * m_downSampleFactor
|
, m_rx_audio_buffer_frames
|
||||||
, m_detector, m_downSampleFactor
|
, m_detector, m_downSampleFactor
|
||||||
, m_config.audio_input_channel ());
|
, m_config.audio_input_channel ());
|
||||||
}
|
}
|
||||||
|
@ -405,6 +405,7 @@ private:
|
|||||||
SoundInput * m_soundInput;
|
SoundInput * m_soundInput;
|
||||||
Modulator * m_modulator;
|
Modulator * m_modulator;
|
||||||
SoundOutput * m_soundOutput;
|
SoundOutput * m_soundOutput;
|
||||||
|
int m_rx_audio_buffer_frames;
|
||||||
int m_tx_audio_buffer_frames;
|
int m_tx_audio_buffer_frames;
|
||||||
QThread m_audioThread;
|
QThread m_audioThread;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user