Skip to content

Commit b3ac98a

Browse files
authored
Merge pull request #16079 from mixxxdj/sync-branch-2.5-to-2.6
Sync branch 2.5 to 2.6
2 parents b3427c0 + f342709 commit b3ac98a

6 files changed

Lines changed: 39 additions & 19 deletions

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ repos:
8181
- "@eslint/js"
8282
- typescript-eslint
8383
- eslint-plugin-jsdoc@^v50.4.3
84-
- eslint-plugin-diff@^2.0.3
84+
# Since 2.1.1, there is a breaking change that requires to fetch the PR base ref
85+
# ("use fetched origin ref for guessed branch", https://github.com/paleite/eslint-plugin-diff/commit/e1fd847240c51a39099fffd2e4f297b23bad95c1).
86+
# instead of using the branching ref as pre-commit allows (HEAD^1).
87+
# We stick to this version to circumvent unnecessary deep repo fetch.
88+
- eslint-plugin-diff@2.1.0
8589
exclude: ^res/translations/.*\.ts$
8690
- repo: local
8791
hooks:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4148,7 +4148,7 @@ if(APPLE)
41484148
)
41494149
if(IOS)
41504150
target_link_libraries(mixxx-lib PRIVATE "-weak_framework UIKit")
4151-
elseif()
4151+
else()
41524152
target_link_libraries(
41534153
mixxx-lib
41544154
PRIVATE "-weak_framework AppKit" "-weak_framework AudioUnit"

src/effects/backends/builtin/glitcheffect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void GlitchEffect::processChannel(
8989
}
9090
}
9191
period = std::max(period, 1 / 8.0);
92-
delay_seconds = static_cast<int>(period * groupFeatures.beat_length->seconds);
92+
delay_seconds = period * groupFeatures.beat_length->seconds;
9393
min_delay = 1 / 8.0 * groupFeatures.beat_length->seconds;
9494
} else {
9595
delay_seconds = period;

src/engine/cachingreader/cachingreaderworker.cpp

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,19 @@ ReaderStatusUpdate CachingReaderWorker::processReadRequest(
7474
}
7575
}
7676

77-
// This call here assumes that the caching reader will read the first sound cue at
78-
// one of the first chunks. The check serves as a sanity check to ensure that the
79-
// sample data has not changed since it has ben analyzed. This could happen because
80-
// of a change in actual audio data or because the file was decoded using a different
81-
// decoder
82-
// This is part of a first prove of concept and needs to be replaces with a different
83-
// solution which is still under discussion. This might be also extended
84-
// to further checks whether a automatic offset adjustment is possible or a the
85-
// sample position metadata shall be treated as outdated.
86-
// Failures of the sanity check only result in an entry into the log at the moment.
87-
verifyFirstSound(pChunk, m_pAudioSource->getSignalInfo().getChannelCount());
77+
if (status == CHUNK_READ_SUCCESS) {
78+
// This call here assumes that the caching reader will read the first sound cue at
79+
// one of the first chunks. The check serves as a sanity check to ensure that the
80+
// sample data has not changed since it has ben analyzed. This could happen because
81+
// of a change in actual audio data or because the file was decoded using a different
82+
// decoder
83+
// This is part of a first prove of concept and needs to be replaces with a different
84+
// solution which is still under discussion. This might be also extended
85+
// to further checks whether a automatic offset adjustment is possible or a the
86+
// sample position metadata shall be treated as outdated.
87+
// Failures of the sanity check only result in an entry into the log at the moment.
88+
verifyFirstSound(pChunk, m_pAudioSource->getSignalInfo().getChannelCount());
89+
}
8890

8991
ReaderStatusUpdate result;
9092
result.init(status, pChunk, m_pAudioSource ? m_pAudioSource->frameIndexRange() : mixxx::IndexRange());
@@ -319,10 +321,18 @@ void CachingReaderWorker::verifyFirstSound(const CachingReaderChunk* pChunk,
319321
.value()));
320322
if (pChunk->getIndex() == firstSoundIndex) {
321323
mixxx::SampleBuffer sampleBuffer(kNumSoundFrameToVerify * channelCount);
322-
SINT end = static_cast<SINT>(m_firstSoundFrameToVerify.toLowerFrameBoundary().value());
323-
pChunk->readBufferedSampleFrames(sampleBuffer.data(),
324-
channelCount,
325-
mixxx::IndexRange::forward(end - 1, kNumSoundFrameToVerify));
324+
// We read two frames, the last silence frame and the first non-silence frame from
325+
// m_firstSoundFrameToVerify. end points to one position after them.
326+
SINT end = static_cast<SINT>(m_firstSoundFrameToVerify.toLowerFrameBoundary().value()) + 1;
327+
mixxx::IndexRange probeFrameIndexRange =
328+
mixxx::IndexRange::between(end - kNumSoundFrameToVerify, end);
329+
mixxx::IndexRange bufferedFrameIndexRange =
330+
pChunk->readBufferedSampleFrames(
331+
sampleBuffer.data(), channelCount, probeFrameIndexRange);
332+
VERIFY_OR_DEBUG_ASSERT(bufferedFrameIndexRange == probeFrameIndexRange) {
333+
qWarning() << "skipping verifyFirstSound()";
334+
return;
335+
}
326336
if (AnalyzerSilence::verifyFirstSound(sampleBuffer.span(),
327337
mixxx::audio::FramePos(1),
328338
channelCount)) {

src/library/columncache.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ ColumnCache::ColumnCache() {
195195
m_pKeyNotationCP = new ControlProxy(mixxx::library::prefs::kKeyNotationConfigKey, this);
196196
m_pKeyNotationCP->connectValueChanged(this, &ColumnCache::slotSetKeySortOrder);
197197

198+
// Used in BaseTrackTableModel() along with a later setColumns() call.
198199
// ColumnCache is initialized before the preferences, so slotSetKeySortOrder is called
199-
// for again if DlgPrefKey sets the [Library]. key_notation CO to a value other than
200+
// again if DlgPrefKey sets the [Library]. key_notation CO to a value other than
200201
// KeyUtils::CUSTOM as Mixxx is starting.
201202
}
202203

@@ -246,6 +247,10 @@ void ColumnCache::setColumns(QStringList columns) {
246247
}
247248

248249
void ColumnCache::slotSetKeySortOrder(double notationValue) {
250+
if (m_columnsByIndex.isEmpty()) {
251+
// we are not caching columns yet
252+
return;
253+
}
249254
const int keyColumnIndex = m_columnIndexByEnum[COLUMN_LIBRARYTABLE_KEY];
250255
if (keyColumnIndex < 0) {
251256
return;

src/library/trackset/setlogfeature.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ void SetlogFeature::onRightClickChild(const QPoint& globalPos, const QModelIndex
218218
}
219219
menu.addSeparator();
220220
menu.addAction(m_pExportPlaylistAction);
221+
menu.addAction(m_pExportTrackFilesAction);
221222
}
222223

223224
menu.exec(globalPos);

0 commit comments

Comments
 (0)