Skip to content

Commit

Permalink
Merge branch 'LMMS:master' into enable-vst-qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossmaxx authored May 20, 2024
2 parents 1e42bcd + d60fd0d commit 98d8e5f
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 22 deletions.
4 changes: 2 additions & 2 deletions include/Lv2Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#ifdef LMMS_HAVE_LV2

#include <cstdint>
#include <lv2/lv2plug.in/ns/ext/options/options.h>
#include <lv2/lv2plug.in/ns/ext/urid/urid.h>
#include <lv2/options/options.h>
#include <lv2/urid/urid.h>
#include <map>
#include <memory>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion include/Lv2UridMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#ifdef LMMS_HAVE_LV2

#include <lv2/lv2plug.in/ns/ext/urid/urid.h>
#include <lv2/urid/urid.h>
#include <mutex> // TODO: use semaphore, even though this is not realtime critical
#include <string>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion include/Lv2Worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifdef LMMS_HAVE_LV2

#include <lilv/lilv.h>
#include <lv2/lv2plug.in/ns/ext/worker/worker.h>
#include <lv2/worker/worker.h>
#include <thread>
#include <vector>

Expand Down
8 changes: 8 additions & 0 deletions src/core/ProjectJournal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
*/

#include <cstdlib>
#include <QDomElement>

#include "ProjectJournal.h"
#include "Engine.h"
#include "JournallingObject.h"
#include "Song.h"
#include "AutomationClip.h"

namespace lmms
{
Expand Down Expand Up @@ -67,6 +69,12 @@ void ProjectJournal::undo()
jo->restoreState( c.data.content().firstChildElement() );
setJournalling( prev );
Engine::getSong()->setModified();

// loading AutomationClip connections correctly
if (!c.data.content().elementsByTagName("automationclip").isEmpty())
{
AutomationClip::resolveAllIDs();
}
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/lv2/Lv2Evbuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <cstdlib>
#include <cstring>

#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
#include <lv2/atom/atom.h>

namespace lmms
{
Expand Down
6 changes: 3 additions & 3 deletions src/core/lv2/Lv2Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include <algorithm>
#include <cstdlib>
#include <lilv/lilv.h>
#include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
#include <lv2/lv2plug.in/ns/ext/options/options.h>
#include <lv2/lv2plug.in/ns/ext/worker/worker.h>
#include <lv2/buf-size/buf-size.h>
#include <lv2/options/options.h>
#include <lv2/worker/worker.h>
#include <QDebug>
#include <QElapsedTimer>

Expand Down
4 changes: 2 additions & 2 deletions src/core/lv2/Lv2Ports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

#ifdef LMMS_HAVE_LV2

#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
#include <lv2/lv2plug.in/ns/ext/port-props/port-props.h>
#include <lv2/atom/atom.h>
#include <lv2/port-props/port-props.h>

#include "Engine.h"
#include "Lv2Basics.h"
Expand Down
8 changes: 4 additions & 4 deletions src/core/lv2/Lv2Proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#ifdef LMMS_HAVE_LV2

#include <cmath>
#include <lv2/lv2plug.in/ns/ext/midi/midi.h>
#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
#include <lv2/lv2plug.in/ns/ext/resize-port/resize-port.h>
#include <lv2/lv2plug.in/ns/ext/worker/worker.h>
#include <lv2/midi/midi.h>
#include <lv2/atom/atom.h>
#include <lv2/resize-port/resize-port.h>
#include <lv2/worker/worker.h>
#include <QDebug>
#include <QDomDocument>
#include <QtGlobal>
Expand Down
8 changes: 4 additions & 4 deletions src/core/lv2/Lv2UridCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

#ifdef LMMS_HAVE_LV2

#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
#include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
#include <lv2/lv2plug.in/ns/ext/midi/midi.h>
#include <lv2/lv2plug.in/ns/ext/parameters/parameters.h>
#include <lv2/atom/atom.h>
#include <lv2/buf-size/buf-size.h>
#include <lv2/midi/midi.h>
#include <lv2/parameters/parameters.h>
#include <QtGlobal>

#include "Lv2UridMap.h"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/Lv2ViewBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <QHBoxLayout>
#include <QLabel>
#include <lilv/lilv.h>
#include <lv2/lv2plug.in/ns/ext/port-props/port-props.h>
#include <lv2/port-props/port-props.h>

#include "AudioEngine.h"
#include "Controls.h"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/SampleWaveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void SampleWaveform::visualize(Parameters parameters, QPainter& painter, const Q

int pixelIndex = 0;

for (int i = 0; i < maxFrames; i += resolution)
for (int i = 0; i < maxFrames; i += static_cast<int>(resolution))
{
pixelIndex = i / framesPerPixel;
const int frameIndex = !parameters.reversed ? i : maxFrames - i;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/editors/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1655,14 +1655,14 @@ float AutomationEditor::getLevel(int y )
{
int level_line_y = height() - SCROLLBAR_SIZE - 1;
// pressed level
float level = roundf( ( m_bottomLevel + ( m_y_auto ?
float level = ( ( m_bottomLevel + ( m_y_auto ?
( m_maxLevel - m_minLevel ) * ( level_line_y - y )
/ (float)( level_line_y - ( TOP_MARGIN + 2 ) ) :
( level_line_y - y ) / (float)m_y_delta ) ) / m_step ) * m_step;
// some range-checking-stuff
level = qBound( m_bottomLevel, level, m_topLevel );

return( level );
return std::roundf(level);
}


Expand Down

0 comments on commit 98d8e5f

Please sign in to comment.