Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: simplify waveform combobox #13220

Merged
merged 19 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d065b8c
feat: simplify waveform combobox
acolombier May 7, 2024
0ace13e
Merge RGB and LRRGB into a single renderer with options
acolombier May 8, 2024
0907c2e
Add option to for signal split waveform
acolombier May 8, 2024
10c4e51
Add waveform option detection and change UI
acolombier May 11, 2024
038c68c
Update the restore slot and remove useless config key
acolombier May 12, 2024
503cd7c
Code style update
acolombier May 20, 2024
10a011a
Merge remote-tracking branch 'upstream/main' into feat/simplify-wavef…
acolombier May 20, 2024
b79a625
Add support for newly introduced filtered waveforms
acolombier May 20, 2024
7bc930a
Reduce the code in macro and use a generic option modifier
acolombier May 20, 2024
4915865
Add TODO for new code
acolombier May 20, 2024
04d9d23
Fix the update path and add tests
acolombier May 21, 2024
9536d13
Don't show VSync if not in developer mode
acolombier May 21, 2024
b4a37b2
Merge remote-tracking branch 'upstream/main' into feat/simplify-wavef…
acolombier May 21, 2024
5c3551d
single waveformwidget class for all allshader waveform widget types, …
May 21, 2024
2155dcc
restored the software renderering (non-opengl) waveforms, deprecated …
May 21, 2024
af24756
Few nits and improve upgrade procedure
acolombier May 22, 2024
f4866ac
Use an enum class for WaveformOption
acolombier May 24, 2024
d414a6e
Bump config version upgrade to 2.6
acolombier May 30, 2024
06c2015
Merge remote-tracking branch 'upstream/main' into feat/simplify-wavef…
acolombier May 30, 2024
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
32 changes: 5 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1208,12 +1208,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 @@ -1240,16 +1236,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 @@ -1521,24 +1513,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 @@ -1551,11 +1533,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 @@ -2194,6 +2171,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
)
target_precompile_headers(mixxx-test REUSE_FROM mixxx-lib)
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;
Copy link
Member Author

@acolombier acolombier May 20, 2024

Choose a reason for hiding this comment

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

@m0dB do you know what happens if the shader program doesn't bind the uniform? Is there a consistent default value? Just wondering what to do in the deprecated renderer


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