Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into huxley-hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed May 31, 2024
2 parents 7a87146 + 4d9db3e commit 671bf3e
Show file tree
Hide file tree
Showing 91 changed files with 1,757 additions and 2,073 deletions.
34 changes: 7 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1210,12 +1210,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/util/workerthreadscheduler.cpp
src/util/xml.cpp
src/waveform/guitick.cpp
src/waveform/renderers/deprecated/glslwaveformrenderersignal.cpp
src/waveform/renderers/deprecated/glvsynctestrenderer.cpp
src/waveform/renderers/deprecated/glwaveformrenderbackground.cpp
src/waveform/renderers/deprecated/glwaveformrendererfilteredsignal.cpp
src/waveform/renderers/deprecated/glwaveformrendererrgb.cpp
src/waveform/renderers/deprecated/glwaveformrenderersimplesignal.cpp
src/waveform/renderers/glwaveformrenderbackground.cpp
src/waveform/renderers/glvsynctestrenderer.cpp
src/waveform/renderers/waveformmark.cpp
src/waveform/renderers/waveformmarkrange.cpp
src/waveform/renderers/waveformmarkset.cpp
Expand All @@ -1242,16 +1238,12 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/waveform/waveformmarklabel.cpp
src/waveform/waveformwidgetfactory.cpp
src/waveform/widgets/emptywaveformwidget.cpp
src/waveform/widgets/deprecated/glrgbwaveformwidget.cpp
src/waveform/widgets/deprecated/glsimplewaveformwidget.cpp
src/waveform/widgets/deprecated/glslwaveformwidget.cpp
src/waveform/widgets/deprecated/glvsynctestwidget.cpp
src/waveform/widgets/deprecated/glwaveformwidget.cpp
src/waveform/widgets/deprecated/glwaveformwidgetabstract.cpp
src/waveform/widgets/hsvwaveformwidget.cpp
src/waveform/widgets/rgbwaveformwidget.cpp
src/waveform/widgets/softwarewaveformwidget.cpp
src/waveform/widgets/waveformwidgetabstract.cpp
src/waveform/widgets/glwaveformwidgetabstract.cpp
src/waveform/widgets/glvsynctestwidget.cpp
src/widget/controlwidgetconnection.cpp
src/widget/findonwebmenufactory.cpp
src/widget/findonwebmenuservices/findonwebmenudiscogs.cpp
Expand Down Expand Up @@ -1377,6 +1369,7 @@ set(MIXXX_LIB_PRECOMPILED_HEADER
src/track/tracknumbers.h
src/track/trackrecord.h
src/track/trackref.h
src/util/always_false_v.h
src/util/alphabetafilter.h
src/util/battery/battery.h
src/util/cache.h
Expand Down Expand Up @@ -1473,6 +1466,7 @@ set(MIXXX_LIB_PRECOMPILED_HEADER
src/util/statmodel.h
src/util/statsmanager.h
src/util/string.h
src/util/stringformat.h
src/util/tapfilter.h
src/util/task.h
src/util/taskmonitor.h
Expand Down Expand Up @@ -1522,24 +1516,14 @@ if(QOPENGL)
src/waveform/renderers/allshader/waveformrendererslipmode.cpp
src/waveform/renderers/allshader/waveformrendererfiltered.cpp
src/waveform/renderers/allshader/waveformrendererhsv.cpp
src/waveform/renderers/allshader/waveformrendererlrrgb.cpp
src/waveform/renderers/allshader/waveformrendererpreroll.cpp
src/waveform/renderers/allshader/waveformrendererrgb.cpp
src/waveform/renderers/allshader/waveformrenderertextured.cpp
src/waveform/renderers/allshader/waveformrenderersignalbase.cpp
src/waveform/renderers/allshader/waveformrenderersimple.cpp
src/waveform/renderers/allshader/waveformrendermark.cpp
src/waveform/renderers/allshader/waveformrendermarkrange.cpp
src/waveform/widgets/allshader/filteredwaveformwidget.cpp
src/waveform/widgets/allshader/hsvwaveformwidget.cpp
src/waveform/widgets/allshader/lrrgbwaveformwidget.cpp
src/waveform/widgets/allshader/rgbwaveformwidget.cpp
src/waveform/widgets/allshader/rgbstackedwaveformwidget.cpp
src/waveform/widgets/allshader/simplewaveformwidget.cpp
src/waveform/widgets/allshader/waveformwidget.cpp
src/waveform/widgets/allshader/waveformwidgettexturedfiltered.cpp
src/waveform/widgets/allshader/waveformwidgettexturedrgb.cpp
src/waveform/widgets/allshader/waveformwidgettexturedstacked.cpp
src/widget/openglwindow.cpp
src/widget/tooltipqopengl.cpp
src/widget/wglwidgetqopengl.cpp
Expand All @@ -1552,11 +1536,6 @@ else()
src/waveform/renderers/qtvsynctestrenderer.cpp
src/waveform/renderers/qtwaveformrendererfilteredsignal.cpp
src/waveform/renderers/qtwaveformrenderersimplesignal.cpp
src/waveform/widgets/qthsvwaveformwidget.cpp
src/waveform/widgets/qtrgbwaveformwidget.cpp
src/waveform/widgets/qtsimplewaveformwidget.cpp
src/waveform/widgets/qtvsynctestwidget.cpp
src/waveform/widgets/qtwaveformwidget.cpp
src/widget/wglwidgetqglwidget.cpp
)
endif()
Expand Down Expand Up @@ -2195,6 +2174,7 @@ add_executable(mixxx-test
src/test/wbatterytest.cpp
src/test/wpushbutton_test.cpp
src/test/wwidgetstack_test.cpp
src/test/waveform_upgrade_test.cpp
src/util/moc_included_test.cpp
)
find_package(GTest CONFIG REQUIRED)
Expand Down
7 changes: 4 additions & 3 deletions res/shaders/rgbsignal.frag
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ uniform vec4 axesColor;
uniform vec4 lowColor;
uniform vec4 midColor;
uniform vec4 highColor;
uniform bool splitStereoSignal;

uniform int waveformLength;
uniform int textureSize;
Expand All @@ -21,8 +22,8 @@ uniform sampler2D waveformDataTexture;

vec4 getWaveformData(float index) {
vec2 uv_data;
uv_data.y = floor(index / float(textureStride));
uv_data.x = floor(index - uv_data.y * float(textureStride));
uv_data.y = splitStereoSignal ? floor(index / float(textureStride)) : max(floor(index / float(textureStride)), floor((index + 1) / float(textureStride)));
uv_data.x = splitStereoSignal ? floor(index - uv_data.y * float(textureStride)) : max(floor(index - uv_data.y * float(textureStride)), floor((index + 1) - uv_data.y * float(textureStride)));
// Divide again to convert to normalized UV coordinates.
return texture2D(waveformDataTexture, uv_data / float(textureStride));
}
Expand All @@ -36,7 +37,7 @@ void main(void) {

// Texture coordinates put (0,0) at the bottom left, so show the right
// channel if we are in the bottom half.
if (uv.y < 0.5) {
if (uv.y < 0.5 && splitStereoSignal) {
new_currentIndex += 1;
}

Expand Down
2 changes: 1 addition & 1 deletion src/analyzer/analyzerebur128.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool AnalyzerEbur128::processSamples(const CSAMPLE* pIn, SINT count) {
VERIFY_OR_DEBUG_ASSERT(m_pState) {
return false;
}
ScopedTimer t(u"AnalyzerEbur128::processSamples()");
ScopedTimer t(QStringLiteral("AnalyzerEbur128::processSamples()"));
size_t frames = count / mixxx::kAnalysisChannels;
int e = ebur128_add_frames_float(m_pState, pIn, frames);
VERIFY_OR_DEBUG_ASSERT(e == EBUR128_SUCCESS) {
Expand Down
2 changes: 1 addition & 1 deletion src/analyzer/analyzergain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void AnalyzerGain::cleanup() {
}

bool AnalyzerGain::processSamples(const CSAMPLE* pIn, SINT count) {
ScopedTimer t(u"AnalyzerGain::process()");
ScopedTimer t(QStringLiteral("AnalyzerGain::process()"));

SINT numFrames = count / mixxx::kAnalysisChannels;
if (numFrames > static_cast<SINT>(m_pLeftTempBuffer.size())) {
Expand Down
4 changes: 2 additions & 2 deletions src/coreservices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CoreServices::CoreServices(const CmdlineArgs& args, QApplication* pApp)
m_isInitialized(false) {
m_runtime_timer.start();
mixxx::Time::start();
ScopedTimer t(u"CoreServices::CoreServices");
ScopedTimer t(QStringLiteral("CoreServices::CoreServices"));
// All this here is running without without start up screen
// Defer long initializations to CoreServices::initialize() which is
// called after the GUI is initialized
Expand Down Expand Up @@ -213,7 +213,7 @@ void CoreServices::initialize(QApplication* pApp) {
return;
}

ScopedTimer t(u"CoreServices::initialize");
ScopedTimer t(QStringLiteral("CoreServices::initialize"));

VERIFY_OR_DEBUG_ASSERT(SoundSourceProxy::registerProviders()) {
qCritical() << "Failed to register any SoundSource providers";
Expand Down
4 changes: 2 additions & 2 deletions src/engine/channelmixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void ChannelMixer::applyEffectsAndMixChannels(const EngineMixer::GainCalculator&
// D) Mixes the temporary buffer into pOutput
// The original channel input buffers are not modified.
SampleUtil::clear(pOutput, iBufferSize);
ScopedTimer t(u"EngineMixer::applyEffectsAndMixChannels");
ScopedTimer t(QStringLiteral("EngineMixer::applyEffectsAndMixChannels"));
for (auto* pChannelInfo : activeChannels) {
EngineMixer::GainCache& gainCache = (*channelGainCache)[pChannelInfo->m_index];
CSAMPLE_GAIN oldGain = gainCache.m_gain;
Expand Down Expand Up @@ -68,7 +68,7 @@ void ChannelMixer::applyEffectsInPlaceAndMixChannels(
// A) Applies the calculated gain to the channel buffer, modifying the original input buffer
// B) Applies effects to the buffer, modifying the original input buffer
// 4. Mix the channel buffers together to make pOutput, overwriting the pOutput buffer from the last engine callback
ScopedTimer t(u"EngineMixer::applyEffectsInPlaceAndMixChannels");
ScopedTimer t(QStringLiteral("EngineMixer::applyEffectsInPlaceAndMixChannels"));
SampleUtil::clear(pOutput, iBufferSize);
for (auto* pChannelInfo : activeChannels) {
EngineMixer::GainCache& gainCache = (*channelGainCache)[pChannelInfo->m_index];
Expand Down
2 changes: 1 addition & 1 deletion src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ void EngineBuffer::slotKeylockEngineChanged(double dIndex) {

void EngineBuffer::processTrackLocked(
CSAMPLE* pOutput, const int iBufferSize, mixxx::audio::SampleRate sampleRate) {
ScopedTimer t(u"EngineBuffer::process_pauselock");
ScopedTimer t(QStringLiteral("EngineBuffer::process_pauselock"));

m_trackSampleRateOld = mixxx::audio::SampleRate::fromDouble(m_pTrackSampleRate->get());
m_trackEndPositionOld = getTrackEndPosition();
Expand Down
2 changes: 1 addition & 1 deletion src/engine/enginemixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void EngineMixer::processChannels(int iBufferSize) {
m_activeTalkoverChannels.clear();
m_activeChannels.clear();

// ScopedTimer timer(u"EngineMixer::processChannels");
// ScopedTimer timer(QStringLiteral("EngineMixer::processChannels"));
EngineChannel* pLeaderChannel = m_pEngineSync->getLeaderChannel();
// Reserve the first place for the main channel which
// should be processed first
Expand Down
2 changes: 1 addition & 1 deletion src/library/dao/trackdao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ TrackPointer TrackDAO::getTrackById(TrackId trackId) const {
// be executed with a lock on the GlobalTrackCache. The GlobalTrackCache
// will be locked again after the query has been executed (see below)
// and potential race conditions will be resolved.
ScopedTimer t(u"TrackDAO::getTrackById");
ScopedTimer t(QStringLiteral("TrackDAO::getTrackById"));

QSqlRecord queryRecord;
{
Expand Down
2 changes: 1 addition & 1 deletion src/library/scanner/importfilestask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ImportFilesTask::ImportFilesTask(LibraryScanner* pScanner,
}

void ImportFilesTask::run() {
ScopedTimer timer(u"ImportFilesTask::run");
ScopedTimer timer(QStringLiteral("ImportFilesTask::run"));
for (const QFileInfo& fileInfo: m_filesToImport) {
// If a flag was raised telling us to cancel the library scan then stop.
if (m_scannerGlobal->shouldCancel()) {
Expand Down
10 changes: 5 additions & 5 deletions src/library/scanner/libraryscanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void LibraryScanner::cancel() {

void LibraryScanner::queueTask(ScannerTask* pTask) {
//kLogger.debug() << "queueTask" << pTask;
ScopedTimer timer(u"LibraryScanner::queueTask");
ScopedTimer timer(QStringLiteral("LibraryScanner::queueTask"));
if (m_scannerGlobal.isNull() || m_scannerGlobal->shouldCancel()) {
return;
}
Expand Down Expand Up @@ -531,7 +531,7 @@ void LibraryScanner::queueTask(ScannerTask* pTask) {

void LibraryScanner::slotDirectoryHashedAndScanned(const QString& directoryPath,
bool newDirectory, mixxx::cache_key_t hash) {
ScopedTimer timer(u"LibraryScanner::slotDirectoryHashedAndScanned");
ScopedTimer timer(QStringLiteral("LibraryScanner::slotDirectoryHashedAndScanned"));
//kLogger.debug() << "sloDirectoryHashedAndScanned" << directoryPath
// << newDirectory << hash;

Expand All @@ -550,7 +550,7 @@ void LibraryScanner::slotDirectoryHashedAndScanned(const QString& directoryPath,
}

void LibraryScanner::slotDirectoryUnchanged(const QString& directoryPath) {
ScopedTimer timer(u"LibraryScanner::slotDirectoryUnchanged");
ScopedTimer timer(QStringLiteral("LibraryScanner::slotDirectoryUnchanged"));
//kLogger.debug() << "slotDirectoryUnchanged" << directoryPath;
if (m_scannerGlobal) {
m_scannerGlobal->addVerifiedDirectory(directoryPath);
Expand All @@ -560,15 +560,15 @@ void LibraryScanner::slotDirectoryUnchanged(const QString& directoryPath) {

void LibraryScanner::slotTrackExists(const QString& trackPath) {
//kLogger.debug() << "slotTrackExists" << trackPath;
ScopedTimer timer(u"LibraryScanner::slotTrackExists");
ScopedTimer timer(QStringLiteral("LibraryScanner::slotTrackExists"));
if (m_scannerGlobal) {
m_scannerGlobal->addVerifiedTrack(trackPath);
}
}

void LibraryScanner::slotAddNewTrack(const QString& trackPath) {
//kLogger.debug() << "slotAddNewTrack" << trackPath;
ScopedTimer timer(u"LibraryScanner::addNewTrack");
ScopedTimer timer(QStringLiteral("LibraryScanner::addNewTrack"));
// For statistics tracking and to detect moved tracks
TrackPointer pTrack = m_trackDao.addTracksAddFile(
trackPath,
Expand Down
2 changes: 1 addition & 1 deletion src/library/scanner/recursivescandirectorytask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RecursiveScanDirectoryTask::RecursiveScanDirectoryTask(
}

void RecursiveScanDirectoryTask::run() {
ScopedTimer timer(u"RecursiveScanDirectoryTask::run");
ScopedTimer timer(QStringLiteral("RecursiveScanDirectoryTask::run"));
if (m_scannerGlobal->shouldCancel()) {
setSuccess(false);
return;
Expand Down
4 changes: 2 additions & 2 deletions src/mixxxmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ void MixxxMainWindow::slotUpdateWindowTitle(TrackPointer pTrack) {

void MixxxMainWindow::createMenuBar() {
qWarning() << " $ createMenuBar";
ScopedTimer t(u"MixxxMainWindow::createMenuBar");
ScopedTimer t(QStringLiteral("MixxxMainWindow::createMenuBar"));
DEBUG_ASSERT(m_pCoreServices->getKeyboardConfig());
m_pMenuBar = make_parented<WMainMenuBar>(
this, m_pCoreServices->getSettings(), m_pCoreServices->getKeyboardConfig().get());
Expand All @@ -789,7 +789,7 @@ void MixxxMainWindow::connectMenuBar() {
// so all connections must be unique!
qWarning() << " $ connectMenuBar";

ScopedTimer t(u"MixxxMainWindow::connectMenuBar");
ScopedTimer t(QStringLiteral("MixxxMainWindow::connectMenuBar"));
connect(this,
&MixxxMainWindow::skinLoaded,
m_pMenuBar,
Expand Down
Loading

0 comments on commit 671bf3e

Please sign in to comment.