Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ set(BUILD_COLORS "auto" CACHE STRING "Try to use colors auto/always/no")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
include(CMakeDependentOption)
include(CheckSymbolExists)
include(CheckIncludeFileCXX)
include(ExternalProject)
include(GNUInstallDirs)
include(DefaultOption)
Expand Down Expand Up @@ -2778,6 +2779,18 @@ if(MODPLUG)
target_link_libraries(mixxx-lib PRIVATE Modplug::Modplug)
endif()

find_package(Microsoft.GSL CONFIG)
if(Microsoft.GSL_FOUND)
target_link_libraries(mixxx-lib PRIVATE Microsoft.GSL::GSL)
else()
# check if the headers have been installed without cmake config (< 3.1.0)
check_include_file_cxx(gsl/gsl HAVE_GSL_GSL)
if(NOT HAVE_GSL_GSL)
message(FATAL_ERROR "ms-gsl deveopment headers (libmsgsl-dev) not found")
endif()
endif()


# QtKeychain
option(QTKEYCHAIN "Secure credentials storage support for Live Broadcasting profiles" ON)
if(QTKEYCHAIN)
Expand Down
1 change: 1 addition & 0 deletions packaging/debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Build-Depends: debhelper (>= 11),
libudev-dev,
# Note: libdjinterop is available within the Mixxx PPA
libdjinterop-dev,
libmsgsl-dev,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do we handle this on other linux distros? fedora doesn't package the gsl

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, as "guidelines-support-library" https://repology.org/project/ms-gsl/versions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Development-only: guidelines-support-library-devel

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I should've looked better.

# for running mixxx-test
xvfb
Rules-Requires-Root: no
Expand Down
10 changes: 4 additions & 6 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ inline int hotcueNumberToHotcueIndex(int hotcueNumber) {
}
}

void appendCueHint(HintVector* pHintList, const mixxx::audio::FramePos& frame, Hint::Type type) {
VERIFY_OR_DEBUG_ASSERT(pHintList) {
return;
}

void appendCueHint(gsl::not_null<HintVector*> pHintList,
const mixxx::audio::FramePos& frame,
Hint::Type type) {
if (frame.isValid()) {
const Hint cueHint = {
/*.frame =*/static_cast<SINT>(frame.toLowerFrameBoundary().value()),
Expand Down Expand Up @@ -1178,7 +1176,7 @@ void CueControl::hotcueEndPositionChanged(
}
}

void CueControl::hintReader(HintVector* pHintList) {
void CueControl::hintReader(gsl::not_null<HintVector*> pHintList) {
appendCueHint(pHintList, m_pCuePoint->get(), Hint::Type::MainCue);

// this is called from the engine thread
Expand Down
2 changes: 1 addition & 1 deletion src/engine/controls/cuecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class CueControl : public EngineControl {
UserSettingsPointer pConfig);
~CueControl() override;

void hintReader(HintVector* pHintList) override;
void hintReader(gsl::not_null<HintVector*> pHintList) override;
bool updateIndicatorsAndModifyPlay(bool newPlay, bool oldPlay, bool playPossible);
void updateIndicators();
bool isTrackAtIntroCue();
Expand Down
2 changes: 1 addition & 1 deletion src/engine/controls/enginecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void EngineControl::trackBeatsUpdated(mixxx::BeatsPointer pBeats) {
Q_UNUSED(pBeats);
}

void EngineControl::hintReader(HintVector*) {
void EngineControl::hintReader(gsl::not_null<HintVector*>) {
}

void EngineControl::setEngineMaster(EngineMaster* pEngineMaster) {
Expand Down
3 changes: 2 additions & 1 deletion src/engine/controls/enginecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <QList>
#include <QObject>
#include <gsl/pointers>

#include "audio/frame.h"
#include "control/controlvalue.h"
Expand Down Expand Up @@ -53,7 +54,7 @@ class EngineControl : public QObject {
// hintReader allows the EngineControl to provide hints to the reader to
// indicate that the given portion of a song is a potential imminent seek
// target.
virtual void hintReader(HintVector* pHintList);
virtual void hintReader(gsl::not_null<HintVector*> pHintList);

virtual void setEngineMaster(EngineMaster* pEngineMaster);
void setEngineBuffer(EngineBuffer* pEngineBuffer);
Expand Down
2 changes: 1 addition & 1 deletion src/engine/controls/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ mixxx::audio::FramePos LoopingControl::nextTrigger(bool reverse,
return mixxx::audio::kInvalidFramePos;
}

void LoopingControl::hintReader(HintVector* pHintList) {
void LoopingControl::hintReader(gsl::not_null<HintVector*> pHintList) {
LoopInfo loopInfo = m_loopInfo.getValue();
Hint loop_hint;
// If the loop is enabled, then this is high priority because we will loop
Expand Down
2 changes: 1 addition & 1 deletion src/engine/controls/loopingcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LoopingControl : public EngineControl {

// hintReader will add to hintList hints both the loop in and loop out
// sample, if set.
void hintReader(HintVector* pHintList) override;
void hintReader(gsl::not_null<HintVector*> pHintList) override;
mixxx::audio::FramePos getSyncPositionInsideLoop(
mixxx::audio::FramePos requestedPlayPosition,
mixxx::audio::FramePos syncedPlayPosition);
Expand Down
2 changes: 1 addition & 1 deletion src/engine/readaheadmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void ReadAheadManager::notifySeek(double seekPosition) {
// }
}

void ReadAheadManager::hintReader(double dRate, HintVector* pHintList) {
void ReadAheadManager::hintReader(double dRate, gsl::not_null<HintVector*> pHintList) {
bool in_reverse = dRate < 0;
Hint current_position;

Expand Down
3 changes: 2 additions & 1 deletion src/engine/readaheadmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <QList>
#include <QPair>
#include <gsl/pointers>
#include <list>

#include "audio/frame.h"
Expand Down Expand Up @@ -53,7 +54,7 @@ class ReadAheadManager {

/// hintReader allows the ReadAheadManager to provide hints to the reader to
/// indicate that the given portion of a song is about to be read.
virtual void hintReader(double dRate, HintVector* hintList);
virtual void hintReader(double dRate, gsl::not_null<HintVector*> pHintList);

virtual double getFilePlaypositionFromLog(
double currentFilePlayposition,
Expand Down
1 change: 1 addition & 0 deletions tools/debian_buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ case "$1" in
libmad0-dev \
libmodplug-dev \
libmp3lame-dev \
libmsgsl-dev \
libopus-dev \
libopusfile-dev \
libportmidi-dev \
Expand Down