Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
39bfdc0
Sort dlgprefbroadcastdlg.ui file and name GroupBoxes
daschuer Oct 23, 2016
02182b4
more ui file sorting
daschuer Oct 23, 2016
58d630f
Add inner layout to stream info
daschuer Oct 23, 2016
537b09c
Add Automatic Reconnect GroupBox to broadcast preferences
daschuer Oct 23, 2016
b7c7e28
Update dlg init code according to the new gui layout
daschuer Oct 23, 2016
d907864
Added "maximum_retries" "retry_delay" to mixxx.cfg
daschuer Oct 23, 2016
a044138
remove right alignmend in stream info section
daschuer Oct 23, 2016
9dce82b
Add extra space in the Server connection grid
daschuer Oct 24, 2016
74fb81e
Added checkbox "use maximum retries"
daschuer Oct 24, 2016
4091992
Added waitForRetry() function
daschuer Oct 26, 2016
56fac7e
Added tryReconnect() with includes the new reconnect behaviour
daschuer Oct 26, 2016
42194b2
Improve state changes and pop-up messages
daschuer Oct 26, 2016
28a904c
fix typos and rename "Limit number of reconnection attempts"
daschuer Oct 27, 2016
5385f80
Disable static artist / title and maximum retries according to the en…
daschuer Oct 27, 2016
79058bd
Added "No delay for the first reconnect attempt"
daschuer Nov 3, 2016
84d6aac
replaced bussy sleep with a QWaitCondition
daschuer Nov 5, 2016
d3c6d20
Added explicit enable_reconnect peference option
daschuer Nov 10, 2016
0a53a0a
Use new enable_reconnect option
daschuer Nov 12, 2016
22e24a8
extra option to set the first delay
daschuer Nov 12, 2016
a4c783e
Broadcasting: avoid interfeerences with engine buffer and sync code
daschuer Nov 14, 2016
db3a8e6
Retry shout_send_raw after 10 ms sleep in case of busy
daschuer Nov 14, 2016
880ee58
Merge remote-tracking branch 'upstream/master' into bc_reconnect
daschuer Nov 18, 2016
1931947
Use type save getValue, add specialisation for double
daschuer Dec 18, 2016
d401ee2
fix typo
daschuer Dec 18, 2016
4ccc433
Remove redundant setProtocol SHOUT_PROTOCOL_HTTP call
daschuer Dec 18, 2016
34101a7
Comment the sleep after IS_BUSY
daschuer Dec 18, 2016
c74c731
moved broadcast settings to own class
daschuer Dec 29, 2016
37eaf66
Remove flush calls to avoid recursive calls
daschuer Dec 29, 2016
c86a578
clarify what happens if the encoder calls flush()
daschuer Dec 29, 2016
1624c25
Make handling of preferences geomety more save against faulty prefere…
daschuer Dec 29, 2016
bf13f1e
Improve error messages when there are noe retries configured
daschuer Dec 29, 2016
d4ba395
Merge remote-tracking branch 'upstream/master' into bc_reconnect
daschuer Dec 29, 2016
ff6fe9f
remove inline getValueString to fix Mac build
daschuer Jan 1, 2017
d63cd56
change some more m_pConfig->getValue()
daschuer Jan 5, 2017
c355d8f
Fix some bugs found in review.
daschuer Jan 5, 2017
58bd806
Merge remote-tracking branch 'upstream/master' into bc_reconnect
daschuer Jan 6, 2017
336693d
Merge remote-tracking branch 'upstream/master' into bc_reconnect
daschuer Jan 23, 2017
f054262
Check the results of string convert when reading double values
daschuer Jan 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ def sources(self, build):
"preferences/dialog/dlgprefwaveform.cpp",
"preferences/settingsmanager.cpp",
"preferences/replaygainsettings.cpp",
"preferences/broadcastsettings.cpp",
"preferences/upgrade.cpp",
"preferences/dlgpreferencepage.cpp",

Expand Down
37 changes: 16 additions & 21 deletions src/analyzer/analyzerbeats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ bool AnalyzerBeats::initialize(TrackPointer tio, int sampleRate, int totalSample
return false;
}

bool bPreferencesBeatDetectionEnabled = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_DETECTION_ENABLED)).toInt());
bool bPreferencesBeatDetectionEnabled = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_DETECTION_ENABLED));
if (!bPreferencesBeatDetectionEnabled) {
qDebug() << "Beat calculation is deactivated";
return false;
Expand All @@ -52,8 +51,8 @@ bool AnalyzerBeats::initialize(TrackPointer tio, int sampleRate, int totalSample
return false;
}

bool allow_above = static_cast<bool>(m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_ABOVE_RANGE_ENABLED)).toInt());
bool allow_above = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_ABOVE_RANGE_ENABLED));
if (allow_above) {
m_iMinBpm = 0;
m_iMaxBpm = 9999;
Expand All @@ -62,23 +61,19 @@ bool AnalyzerBeats::initialize(TrackPointer tio, int sampleRate, int totalSample
m_iMaxBpm = m_pConfig->getValueString(ConfigKey(BPM_CONFIG_KEY, BPM_RANGE_END)).toInt();
}

m_bPreferencesFixedTempo = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_FIXED_TEMPO_ASSUMPTION)).toInt());
m_bPreferencesOffsetCorrection = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_FIXED_TEMPO_OFFSET_CORRECTION)).toInt());
m_bPreferencesReanalyzeOldBpm = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_REANALYZE_WHEN_SETTINGS_CHANGE)).toInt());
m_bPreferencesFastAnalysis = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_FAST_ANALYSIS_ENABLED)).toInt());
m_bPreferencesFixedTempo = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_FIXED_TEMPO_ASSUMPTION));
m_bPreferencesOffsetCorrection = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_FIXED_TEMPO_OFFSET_CORRECTION));
m_bPreferencesReanalyzeOldBpm = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_REANALYZE_WHEN_SETTINGS_CHANGE));
m_bPreferencesFastAnalysis = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_FAST_ANALYSIS_ENABLED));

QString library = m_pConfig->getValueString(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_BEAT_LIBRARY));
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_BEAT_LIBRARY));
QString pluginID = m_pConfig->getValueString(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_BEAT_PLUGIN_ID));
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_BEAT_PLUGIN_ID));

m_pluginId = pluginID;
m_iSampleRate = sampleRate;
Expand Down Expand Up @@ -110,8 +105,8 @@ bool AnalyzerBeats::isDisabledOrLoadStoredSuccess(TrackPointer tio) const {
int iMinBpm;
int iMaxBpm;

bool allow_above = static_cast<bool>(m_pConfig->getValueString(
ConfigKey(BPM_CONFIG_KEY, BPM_ABOVE_RANGE_ENABLED)).toInt());
bool allow_above = m_pConfig->getValue<bool>(
ConfigKey(BPM_CONFIG_KEY, BPM_ABOVE_RANGE_ENABLED));
if (allow_above) {
iMinBpm = 0;
iMaxBpm = 9999;
Expand Down
35 changes: 16 additions & 19 deletions src/analyzer/analyzerkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,23 @@ bool AnalyzerKey::initialize(TrackPointer tio, int sampleRate, int totalSamples)
return false;
}

m_bPreferencesKeyDetectionEnabled = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(KEY_CONFIG_KEY, KEY_DETECTION_ENABLED)).toInt());
m_bPreferencesKeyDetectionEnabled = m_pConfig->getValue<bool>(
ConfigKey(KEY_CONFIG_KEY, KEY_DETECTION_ENABLED));
if (!m_bPreferencesKeyDetectionEnabled) {
qDebug() << "Key detection is deactivated";
return false;
}

m_bPreferencesFastAnalysisEnabled = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(KEY_CONFIG_KEY, KEY_FAST_ANALYSIS)).toInt());
QString library = m_pConfig->getValueString(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_LIBRARY),
// TODO(rryan) this default really doesn't belong here.
"libmixxxminimal");
QString pluginID = m_pConfig->getValueString(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_PLUGIN_ID),
// TODO(rryan) this default really doesn't belong here.
VAMP_ANALYZER_KEY_DEFAULT_PLUGIN_ID);
m_bPreferencesFastAnalysisEnabled = m_pConfig->getValue<bool>(
ConfigKey(KEY_CONFIG_KEY, KEY_FAST_ANALYSIS));
QString library = m_pConfig->getValue(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_LIBRARY),
// TODO(rryan) this default really doesn't belong here.
"libmixxxminimal");
QString pluginID = m_pConfig->getValue(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_PLUGIN_ID),
// TODO(rryan) this default really doesn't belong here.
VAMP_ANALYZER_KEY_DEFAULT_PLUGIN_ID);

m_pluginId = pluginID;
m_iSampleRate = sampleRate;
Expand Down Expand Up @@ -77,14 +75,13 @@ bool AnalyzerKey::initialize(TrackPointer tio, int sampleRate, int totalSamples)
}

bool AnalyzerKey::isDisabledOrLoadStoredSuccess(TrackPointer tio) const {
bool bPreferencesFastAnalysisEnabled = static_cast<bool>(
m_pConfig->getValueString(
ConfigKey(KEY_CONFIG_KEY, KEY_FAST_ANALYSIS)).toInt());
bool bPreferencesFastAnalysisEnabled = m_pConfig->getValue<bool>(
ConfigKey(KEY_CONFIG_KEY, KEY_FAST_ANALYSIS));

QString library = m_pConfig->getValueString(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_LIBRARY));
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_LIBRARY));
QString pluginID = m_pConfig->getValueString(
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_PLUGIN_ID));
ConfigKey(VAMP_CONFIG_KEY, VAMP_ANALYZER_KEY_PLUGIN_ID));

// TODO(rryan): This belongs elsewhere.
if (library.isEmpty() || library.isNull())
Expand Down
6 changes: 5 additions & 1 deletion src/encoder/encodervorbis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ void EncoderVorbis::writePage() {
result = ogg_stream_flush(&m_oggs, &m_oggpage);
if (result == 0)
break;
m_pCallback->write(m_oggpage.header, m_oggpage.body, m_oggpage.header_len, m_oggpage.body_len);
m_pCallback->write(
m_oggpage.header,
m_oggpage.body,
m_oggpage.header_len,
m_oggpage.body_len);
}
m_header_write = false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/engine/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ void CueControl::trackLoaded(TrackPointer pNewTrack, TrackPointer pOldTrack) {

// If cue recall is ON in the prefs, then we're supposed to seek to the cue
// point on song load. Note that [Controls],cueRecall == 0 corresponds to "ON", not OFF.
bool cueRecall = (getConfig()->getValueString(
ConfigKey("[Controls]","CueRecall"), "0").toInt() == 0);
bool cueRecall = (getConfig()->getValue(
ConfigKey("[Controls]","CueRecall"), 0) == 0);
if (cueRecall && (cuePoint >= 0.0)) {
seekExact(cuePoint);
} else if (!(m_pVinylControlEnabled->get() &&
Expand Down
4 changes: 2 additions & 2 deletions src/engine/enginemaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ EngineMaster::EngineMaster(UserSettingsPointer pConfig,
m_pMasterSync = new EngineSync(pConfig);

// The last-used bpm value is saved in the destructor of EngineSync.
double default_bpm = pConfig->getValueString(ConfigKey("[InternalClock]", "bpm"),
"124.0").toDouble();
double default_bpm = pConfig->getValue(
ConfigKey("[InternalClock]", "bpm"), 124.0);
ControlObject::getControl(ConfigKey("[InternalClock]","bpm"))->set(default_bpm);

// Crossfader
Expand Down
6 changes: 3 additions & 3 deletions src/engine/enginetalkoverducking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EngineTalkoverDucking::EngineTalkoverDucking(

m_pDuckStrength = new ControlPotmeter(ConfigKey(m_group, "duckStrength"), 0.0, 1.0);
m_pDuckStrength->set(
m_pConfig->getValueString(ConfigKey(m_group, "duckStrength"), "90").toDouble() / 100);
m_pConfig->getValue<double>(ConfigKey(m_group, "duckStrength"), 90) / 100);
connect(m_pDuckStrength, SIGNAL(valueChanged(double)),
this, SLOT(slotDuckStrengthChanged(double)),
Qt::DirectConnection);
Expand All @@ -32,8 +32,8 @@ EngineTalkoverDucking::EngineTalkoverDucking(
m_pTalkoverDucking->setButtonMode(ControlPushButton::TOGGLE);
m_pTalkoverDucking->setStates(3);
m_pTalkoverDucking->set(
m_pConfig->getValueString(
ConfigKey(m_group, "duckMode"), QString::number(AUTO)).toDouble());
m_pConfig->getValue<double>(
ConfigKey(m_group, "duckMode"), AUTO));
connect(m_pTalkoverDucking, SIGNAL(valueChanged(double)),
this, SLOT(slotDuckModeChanged(double)),
Qt::DirectConnection);
Expand Down
Loading