Skip to content

Commit

Permalink
Merge pull request #13220 from acolombier/feat/simplify-waveform-comb…
Browse files Browse the repository at this point in the history
…obox

feat: simplify waveform combobox
  • Loading branch information
Swiftb0y authored May 31, 2024
2 parents c0407e5 + 06c2015 commit 4d9db3e
Show file tree
Hide file tree
Showing 65 changed files with 1,661 additions and 1,984 deletions.
32 changes: 5 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 @@ -1524,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 @@ -1554,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 @@ -2197,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
Loading

0 comments on commit 4d9db3e

Please sign in to comment.