Skip to content

Commit

Permalink
Make supported stem constant global
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Jul 7, 2024
1 parent 74426be commit 1b5d009
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/analyzer/analyzerwaveform.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
class QImage;
#endif

namespace {
constexpr int kMaxSupportedStem = 4;
}

class EngineFilterIIRBase;
class QSqlDatabase;
Expand Down Expand Up @@ -145,7 +142,7 @@ struct WaveformStride {

float m_overallData[ChannelCount];
float m_filteredData[ChannelCount][FilterCount];
float m_stemData[ChannelCount][kMaxSupportedStem];
float m_stemData[ChannelCount][mixxx::kMaxSupportedStem];

float m_averageOverallData[ChannelCount];
float m_averageFilteredData[ChannelCount][FilterCount];
Expand Down
1 change: 1 addition & 0 deletions src/analyzer/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace mixxx {
// fixed number of channels like the engine does, usually 2 = stereo.
constexpr audio::ChannelCount kAnalysisChannels = mixxx::kEngineChannelOutputCount;
constexpr audio::ChannelCount kAnalysisMaxChannels = mixxx::kMaxEngineChannelInputCount;
constexpr int kMaxSupportedStem = 4;
constexpr SINT kAnalysisFramesPerChunk = 4096;
constexpr SINT kAnalysisSamplesPerChunk =
kAnalysisFramesPerChunk * kAnalysisMaxChannels;
Expand Down
3 changes: 2 additions & 1 deletion src/waveform/waveform.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QString>
#include <vector>

#include "analyzer/constants.h"
#include "audio/signalinfo.h"
#include "util/class.h"
#include "util/compatibility/qmutex.h"
Expand All @@ -21,7 +22,7 @@ struct WaveformData {
unsigned char high;
unsigned char all;
} filtered;
unsigned char stems[4];
unsigned char stems[mixxx::kMaxSupportedStem];
};

class Waveform {
Expand Down

0 comments on commit 1b5d009

Please sign in to comment.