Skip to content

Commit

Permalink
Merge branch '2.4' of github.com:mixxxdj/mixxx
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Mar 30, 2024
2 parents 5519f2a + eb4343b commit 4bbb5da
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 62 deletions.
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@

### Controller Mappings

* Pioneer DDJ-FLX4 mapping improvements [#12842](https://github.com/mixxxdj/mixxx/pull/12842)
* Hercules Inpulse 200: Configure shift-browser knob to scroll the library (quick) [#12932](https://github.com/mixxxdj/mixxx/pull/12932)
* Pioneer DDJ-FLX4: Add waveform zoom and other mapping improvements
[#12896](https://github.com/mixxxdj/mixxx/pull/12896)
[#12842](https://github.com/mixxxdj/mixxx/pull/12842)
* Traktor Kontrol F1: Fixes for hid-parser and related script [#12876](https://github.com/mixxxdj/mixxx/pull/12876)
* Traktor S3: Fix mapping crash on macOS [#12840](https://github.com/mixxxdj/mixxx/pull/12840)

### Target Support
Expand All @@ -195,6 +199,14 @@
[#12853](https://github.com/mixxxdj/mixxx/pull/12853)
[#12847](https://github.com/mixxxdj/mixxx/pull/12847)
[#12822](https://github.com/mixxxdj/mixxx/pull/12822)
[#12892](https://github.com/mixxxdj/mixxx/pull/12892)

### Miscellaneous

* Remove unnecessary unpolish operation of the style, before polish the new style [#12445](https://github.com/mixxxdj/mixxx/pull/12445)
* Developer Tools: Initially sort controls by group name, ascending [#12884](https://github.com/mixxxdj/mixxx/pull/12884)
* History: Show track count and duration in sidebar [#12811](https://github.com/mixxxdj/mixxx/pull/12811)
* Prevent removing tracks from locked playlists [#12927](https://github.com/mixxxdj/mixxx/pull/12927)

## [2.4.0](https://github.com/mixxxdj/mixxx/milestone/15?closed=1) (2024-02-16)

Expand Down Expand Up @@ -691,7 +703,7 @@
[#11975](https://github.com/mixxxdj/mixxx/pull/11975)
[#11957](https://github.com/mixxxdj/mixxx/issues/11957)
* Fix 500ms blocking of the whole event loop, when holding mouse down on title bar on Windows [#12359](https://github.com/mixxxdj/mixxx/pull/12359) [#12358](https://github.com/mixxxdj/mixxx/issues/12358) [#12433](https://github.com/mixxxdj/mixxx/pull/12433) [#12458](https://github.com/mixxxdj/mixxx/pull/12458)
* change SKIN_WARNING to show the skin file:line first, then c++ context [#12253](https://github.com/mixxxdj/mixxx/pull/12253)
* Change SKIN_WARNING to show the skin file and line first, then c++ context [#12253](https://github.com/mixxxdj/mixxx/pull/12253)
* Fix style of selected QComboBox items on Windows [#12339](https://github.com/mixxxdj/mixxx/pull/12339) [#12323](https://github.com/mixxxdj/mixxx/issues/12323)
* Fix reading the Spinny cover on Windows [#12103](https://github.com/mixxxdj/mixxx/pull/12103) [#11131](https://github.com/mixxxdj/mixxx/issues/11131)
* Fix inconsistent/wrong musical keys in the UI [#12051](https://github.com/mixxxdj/mixxx/pull/12051) [#12044](https://github.com/mixxxdj/mixxx/issues/12044)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Have a bug or feature request? [File a bug on Github][fileabug].

Want to get involved in Mixxx development? Assign yourself a bug from the [easy
bug list][easybugs] and get started!
Read [CONTRIBUTING](CONTRIBUTING.md) for more information.

## Building Mixxx

Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Behringer-Extension-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@
isEnabled: function() { return this.id !== 0; },
start: function() {
this.reset();
this.id = engine.beginTimer(this.timeout, () => {
this.id = engine.beginTimer(this.timeout, function() {
if (this.oneShot) {
this.disable();
}
this.action.call(this.owner);
}, this.oneShot);
}.bind(this), this.oneShot); // .bind(this) is required instead of arrow function for Qt < 6.2.4 due to QTBUG-95677
},
reset: function() {
if (this.isEnabled()) {
Expand Down
39 changes: 35 additions & 4 deletions res/linux/org.mixxx.Mixxx.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
Do not edit it manually.
-->
<releases>
<release version="2.5.0" type="development" date="2024-03-18" timestamp="1710747808">
<release version="2.5.0" type="development" date="2024-03-13" timestamp="1710284546">
<description>
<p>
Features
Expand Down Expand Up @@ -704,16 +704,25 @@
</ul>
</description>
</release>
<release version="2.4.1" type="development" date="2024-03-18" timestamp="1710747808">
<release version="2.4.1" type="development" date="2024-03-13" timestamp="1710284546">
<description>
<p>
Controller Mappings
</p>
<ul>
<li>
Pioneer DDJ-FLX4 mapping improvements
Hercules Inpulse 200: Configure shift-browser knob to scroll the library (quick)
#12932
</li>
<li>
Pioneer DDJ-FLX4: Add waveform zoom and other mapping improvements
#12896
#12842
</li>
<li>
Traktor Kontrol F1: Fixes for hid-parser and related script
#12876
</li>
<li>
Traktor S3: Fix mapping crash on macOS
#12840
Expand All @@ -728,6 +737,28 @@
#12853
#12847
#12822
#12892
</li>
</ul>
<p>
Miscellaneous
</p>
<ul>
<li>
Remove unnecessary unpolish operation of the style, before polish the new style
#12445
</li>
<li>
Developer Tools: Initially sort controls by group name, ascending
#12884
</li>
<li>
History: Show track count and duration in sidebar
#12811
</li>
<li>
Prevent removing tracks from locked playlists
#12927
</li>
</ul>
</description>
Expand Down Expand Up @@ -2019,7 +2050,7 @@
#12458
</li>
<li>
change SKIN_WARNING to show the skin file:line first, then c++ context
Change SKIN_WARNING to show the skin file and line first, then c++ context
#12253
</li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere/preview_deck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<TooltipId>text</TooltipId>
<SizePolicy>me,min</SizePolicy>
<Group><Variable name="group"/></Group>
<Property>titleInfo</Property>
<Property>info</Property>
<Elide>right</Elide>
</TrackProperty>

Expand Down
2 changes: 1 addition & 1 deletion res/skins/LateNight/decks/preview_deck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<Size>0me,20f</Size>
<Elide>right</Elide>
<Group><Variable name="Group"/></Group>
<Property>titleInfo</Property>
<Property>info</Property>
</TrackProperty>
<Number>
<ObjectName>PreviewBPM</ObjectName>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/LateNight/style_classic.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ WPushButton#PlayIndicator,
WPushButton#CueDeck,
#PlayCueMini WPushButton,
WPushButton#LoopActivate,
WPushButton#RateControls WPushButton,
#RateControls WPushButton,
WPushButton#SyncSampler,
#MixerContainer WPushButton,
#FxUnitContainer WPushButton,
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/preview_deck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
padding-top: 2px;}
</Style>
<Group>[PreviewDeck1]</Group>
<Property>titleInfo</Property>
<Property>info</Property>
<SizePolicy>me,min</SizePolicy>
<Elide>right</Elide>
</TrackProperty>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Tango/decks/preview_deck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Variables:
<TooltipId>text</TooltipId>
<Size>1me,17f</Size>
<Group><Variable name="group"/></Group>
<Property>titleInfo</Property>
<Property>info</Property>
<Elide>right</Elide>
</TrackProperty>
</Children>
Expand Down
1 change: 1 addition & 0 deletions src/effects/backends/effectsbackendmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "control/controlobject.h"
#include "effects/backends/builtin/builtinbackend.h"
#include "effects/backends/effectmanifest.h"
#include "effects/backends/effectprocessor.h"
#ifdef __LILV__
#include "effects/backends/lv2/lv2backend.h"
Expand Down
1 change: 1 addition & 0 deletions src/library/autodj/autodjprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ AutoDJProcessor::AutoDJError AutoDJProcessor::toggleAutoDJ(bool enable) {
for (int i = 2; i < m_decks.length(); ++i) {
if (m_decks[i] && m_decks[i]->isPlaying()) {
// Keep the current state.
emitAutoDJStateChanged(m_eState);
emit autoDJError(ADJ_DECKS_3_4_PLAYING);
return ADJ_DECKS_3_4_PLAYING;
}
Expand Down
55 changes: 30 additions & 25 deletions src/library/dlgtrackinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ void DlgTrackInfo::reloadTrackBeats(const Track& track) {
updateSpinBpmFromBeats();
m_trackHasBeatMap = m_pBeatsClone && !m_pBeatsClone->hasConstantTempo();
bpmConst->setChecked(!m_trackHasBeatMap);
bpmConst->setEnabled(m_trackHasBeatMap); // We cannot make turn a BeatGrid to a BeatMap
spinBpm->setEnabled(!m_trackHasBeatMap); // We cannot change bpm continuously or tab them
bpmConst->setEnabled(m_trackHasBeatMap); // We cannot turn a BeatGrid to a BeatMap
spinBpm->setEnabled(!m_trackHasBeatMap); // We cannot change bpm continuously or tap them
bpmTap->setEnabled(!m_trackHasBeatMap); // when we have a beatmap

if (track.isBpmLocked()) {
Expand Down Expand Up @@ -614,8 +614,13 @@ void DlgTrackInfo::saveTrack() {
static_cast<void>(updateKeyText()); // discard result

// Update the cached track
// The dialog is updated and repopulated by the Track::changed() signal.
m_pLoadedTrack->replaceRecord(std::move(m_trackRecord), std::move(m_pBeatsClone));
//
// If replaceRecord() returns true then both m_trackRecord and m_pBeatsClone
// will be updated by the subsequent Track::changed() signal to keep them
// synchronized with the track. Otherwise the track has not been modified and
// both members must remain valid. Do not use std::move() for passing arguments!
// Else triggering apply twice in quick succession might clear the metadata.
m_pLoadedTrack->replaceRecord(m_trackRecord, m_pBeatsClone);
}

void DlgTrackInfo::clear() {
Expand Down Expand Up @@ -693,28 +698,28 @@ void DlgTrackInfo::slotSpinBpmValueChanged(double value) {
return;
}

if (!m_pBeatsClone) {
mixxx::audio::FramePos cuePosition = m_pLoadedTrack->getMainCuePosition();
// This should never happen, but we cannot be sure
VERIFY_OR_DEBUG_ASSERT(cuePosition.isValid()) {
cuePosition = mixxx::audio::kStartFramePos;
}
m_pBeatsClone = mixxx::Beats::fromConstTempo(
m_pLoadedTrack->getSampleRate(),
// Cue positions might be fractional, i.e. not on frame boundaries!
cuePosition.toNearestFrameBoundary(),
bpm);
}

if (m_pLoadedTrack && m_pBeatsClone) {
const auto trackEndPosition = mixxx::audio::FramePos{
m_pLoadedTrack->getDuration() * m_pBeatsClone->getSampleRate()};
const mixxx::Bpm oldBpm = m_pBeatsClone->getBpmInRange(
mixxx::audio::kStartFramePos, trackEndPosition);
if (oldBpm == bpm) {
return;
if (m_pLoadedTrack) {
if (m_pBeatsClone) {
const auto trackEndPosition = mixxx::audio::FramePos{
m_pLoadedTrack->getDuration() * m_pBeatsClone->getSampleRate()};
const mixxx::Bpm oldBpm = m_pBeatsClone->getBpmInRange(
mixxx::audio::kStartFramePos, trackEndPosition);
if (oldBpm == bpm) {
return;
}
m_pBeatsClone = m_pBeatsClone->trySetBpm(bpm).value_or(m_pBeatsClone);
} else {
mixxx::audio::FramePos cuePosition = m_pLoadedTrack->getMainCuePosition();
// This should never happen, but we cannot be sure
VERIFY_OR_DEBUG_ASSERT(cuePosition.isValid()) {
cuePosition = mixxx::audio::kStartFramePos;
}
m_pBeatsClone = mixxx::Beats::fromConstTempo(
m_pLoadedTrack->getSampleRate(),
// Cue positions might be fractional, i.e. not on frame boundaries!
cuePosition.toNearestFrameBoundary(),
bpm);
}
m_pBeatsClone = m_pBeatsClone->trySetBpm(bpm).value_or(m_pBeatsClone);
}

updateSpinBpmFromBeats();
Expand Down
6 changes: 3 additions & 3 deletions src/library/playlisttablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const QString kModelName = "playlist:";
PlaylistTableModel::PlaylistTableModel(QObject* parent,
TrackCollectionManager* pTrackCollectionManager,
const char* settingsNamespace,
bool keepDeletedTracks)
bool keepHiddenTracks)
: TrackSetTableModel(parent, pTrackCollectionManager, settingsNamespace),
m_iPlaylistId(kInvalidPlaylistId),
m_keepDeletedTracks(keepDeletedTracks) {
m_keepHiddenTracks(keepHiddenTracks) {
connect(&m_pTrackCollectionManager->internalCollection()->getPlaylistDAO(),
&PlaylistDAO::tracksChanged,
this,
Expand Down Expand Up @@ -139,7 +139,7 @@ void PlaylistTableModel::selectPlaylist(int playlistId) {

m_iPlaylistId = playlistId;

if (!m_keepDeletedTracks) {
if (!m_keepHiddenTracks) {
// From Mixxx 2.1 we drop tracks that have been explicitly deleted
// in the library (mixxx_deleted = 0) from playlists.
// These invisible tracks, consuming a playlist position number were
Expand Down
7 changes: 5 additions & 2 deletions src/library/playlisttablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ class PlaylistTableModel final : public TrackSetTableModel {
Q_OBJECT

public:
PlaylistTableModel(QObject* parent, TrackCollectionManager* pTrackCollectionManager, const char* settingsNamespace, bool keepDeletedTracks = false);
PlaylistTableModel(QObject* parent,
TrackCollectionManager* pTrackCollectionManager,
const char* settingsNamespace,
bool keepHiddenTracks = false);
~PlaylistTableModel() final = default;

void selectPlaylist(int playlistId = -1 /* kInvalidPlaylistId */);
Expand Down Expand Up @@ -44,6 +47,6 @@ class PlaylistTableModel final : public TrackSetTableModel {
void initSortColumnMapping() override;

int m_iPlaylistId;
bool m_keepDeletedTracks;
bool m_keepHiddenTracks;
QHash<int, QString> m_searchTexts;
};
9 changes: 6 additions & 3 deletions src/library/trackset/baseplaylistfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ BasePlaylistFeature::BasePlaylistFeature(
UserSettingsPointer pConfig,
PlaylistTableModel* pModel,
const QString& rootViewName,
const QString& iconName)
const QString& iconName,
bool keepHiddenTracks)
: BaseTrackSetFeature(pLibrary, pConfig, rootViewName, iconName),
m_playlistDao(pLibrary->trackCollectionManager()
->internalCollection()
->getPlaylistDAO()),
m_pPlaylistTableModel(pModel) {
m_pPlaylistTableModel(pModel),
m_keepHiddenTracks(keepHiddenTracks) {
pModel->setParent(this);

initActions();
Expand Down Expand Up @@ -568,7 +570,8 @@ void BasePlaylistFeature::slotExportPlaylist() {
std::unique_ptr<PlaylistTableModel> pPlaylistTableModel =
std::make_unique<PlaylistTableModel>(this,
m_pLibrary->trackCollectionManager(),
"mixxx.db.model.playlist_export");
"mixxx.db.model.playlist_export",
m_keepHiddenTracks);

emit saveModelState();
pPlaylistTableModel->selectPlaylist(playlistId);
Expand Down
5 changes: 4 additions & 1 deletion src/library/trackset/baseplaylistfeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class BasePlaylistFeature : public BaseTrackSetFeature {
UserSettingsPointer pConfig,
PlaylistTableModel* pModel,
const QString& rootViewName,
const QString& iconName);
const QString& iconName,
bool keepHiddenTracks = false);
~BasePlaylistFeature() override = default;

TreeItemModel* sidebarModel() const override;
Expand Down Expand Up @@ -128,4 +129,6 @@ class BasePlaylistFeature : public BaseTrackSetFeature {
void markTreeItem(TreeItem* pTreeItem);

TrackId m_selectedTrackId;

const bool m_keepHiddenTracks;
};
5 changes: 3 additions & 2 deletions src/library/trackset/setlogfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ SetlogFeature::SetlogFeature(
nullptr,
pLibrary->trackCollectionManager(),
"mixxx.db.model.setlog",
/*keep deleted tracks*/ true),
/*keep hidden tracks*/ true),
QStringLiteral("SETLOGHOME"),
QStringLiteral("history")),
QStringLiteral("history"),
/*keep hidden tracks*/ true),
m_currentPlaylistId(kInvalidPlaylistId),
m_yearNodeId(kInvalidPlaylistId),
m_pLibrary(pLibrary),
Expand Down
11 changes: 6 additions & 5 deletions src/mixer/basetrackplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ void BaseTrackPlayerImpl::slotEjectTrack(double v) {
return;
}

// Don't allow eject while playing a track. We don't need to lock to
// call ControlObject::get() so this is fine.
if (m_pPlay->toBool()) {
return;
}

mixxx::Duration elapsed = m_ejectTimer.restart();

// Double-click always restores the last replaced track, i.e. un-eject the second
Expand All @@ -347,11 +353,6 @@ void BaseTrackPlayerImpl::slotEjectTrack(double v) {
return;
}

// Don't allow rejections while playing a track. We don't need to lock to
// call ControlObject::get() so this is fine.
if (m_pPlay->toBool()) {
return;
}
m_pChannel->getEngineBuffer()->ejectTrack();
}

Expand Down
Loading

0 comments on commit 4bbb5da

Please sign in to comment.