Skip to content

Commit

Permalink
Merge branch 'LMMS:master' into tap-tempo
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth authored Apr 23, 2022
2 parents 68e58f1 + 0dcf909 commit 8d0ff4c
Show file tree
Hide file tree
Showing 65 changed files with 465 additions and 472 deletions.
2 changes: 2 additions & 0 deletions include/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ class MainWindow : public QMainWindow
static void saveWidgetState( QWidget * _w, QDomElement & _de );
static void restoreWidgetState( QWidget * _w, const QDomElement & _de );

bool eventFilter(QObject* watched, QEvent* event) override;

public slots:
void resetWindowTitle();

Expand Down
1 change: 0 additions & 1 deletion include/MixerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "Engine.h"
#include "Fader.h"
#include "PixmapButton.h"
#include "ToolTip.h"
#include "embed.h"
#include "EffectRackView.h"

Expand Down
50 changes: 50 additions & 0 deletions include/RemotePluginClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@

#include "RemotePluginBase.h"

#ifndef LMMS_BUILD_WIN32
# include <condition_variable>
# include <mutex>
# include <thread>

# include <signal.h>
# include <unistd.h>
#endif

class RemotePluginClient : public RemotePluginBase
{
public:
Expand Down Expand Up @@ -126,6 +135,47 @@ class RemotePluginClient : public RemotePluginBase
fpp_t m_bufferSize;
} ;

#ifndef LMMS_BUILD_WIN32
class PollParentThread
{
public:
PollParentThread() :
m_stop{false},
m_thread{
[this]
{
using namespace std::literals::chrono_literals;
auto lock = std::unique_lock{m_mutex};
while (!m_cv.wait_for(lock, 500ms, [this] { return m_stop; }))
{
if (getppid() == 1)
{
kill(getpid(), SIGHUP);
break;
}
}
}
}
{ }

~PollParentThread()
{
{
const auto lock = std::unique_lock{m_mutex};
m_stop = true;
}
m_cv.notify_all();
m_thread.join();
}

private:
bool m_stop;
std::mutex m_mutex;
std::condition_variable m_cv;
std::thread m_thread;
};
#endif

#ifdef SYNC_WITH_SHM_FIFO
RemotePluginClient::RemotePluginClient( key_t _shm_in, key_t _shm_out ) :
RemotePluginBase( new shmFifo( _shm_in ), new shmFifo( _shm_out ) ),
Expand Down
5 changes: 5 additions & 0 deletions include/TimeLineWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ public slots:
{
updatePosition( TimePos() );
}
void setSnapSize( const float snapSize )
{
m_snapSize = snapSize;
}
void toggleAutoScroll( int _n );
void toggleLoopPoints( int _n );
void toggleBehaviourAtStop( int _n );
Expand Down Expand Up @@ -217,6 +221,7 @@ public slots:
int m_xOffset;
int m_posMarkerX;
float m_ppb;
float m_snapSize;
Song::PlayPos & m_pos;
const TimePos & m_begin;
const Song::PlayModes m_mode;
Expand Down
42 changes: 0 additions & 42 deletions include/ToolTip.h

This file was deleted.

13 changes: 6 additions & 7 deletions plugins/AudioFileProcessor/AudioFileProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "PixmapButton.h"
#include "Song.h"
#include "StringPairDrag.h"
#include "ToolTip.h"
#include "Clipboard.h"

#include "embed.h"
Expand Down Expand Up @@ -467,7 +466,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"select_file" ) );
connect( m_openAudioFileButton, SIGNAL( clicked() ),
this, SLOT( openAudioFile() ) );
ToolTip::add( m_openAudioFileButton, tr( "Open sample" ) );
m_openAudioFileButton->setToolTip(tr("Open sample"));

m_reverseButton = new PixmapButton( this );
m_reverseButton->setCheckable( true );
Expand All @@ -476,7 +475,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"reverse_on" ) );
m_reverseButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"reverse_off" ) );
ToolTip::add( m_reverseButton, tr( "Reverse sample" ) );
m_reverseButton->setToolTip(tr("Reverse sample"));

// loop button group

Expand All @@ -487,7 +486,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"loop_off_on" ) );
m_loopOffButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"loop_off_off" ) );
ToolTip::add( m_loopOffButton, tr( "Disable loop" ) );
m_loopOffButton->setToolTip(tr("Disable loop"));


PixmapButton * m_loopOnButton = new PixmapButton( this );
Expand All @@ -497,7 +496,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"loop_on_on" ) );
m_loopOnButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"loop_on_off" ) );
ToolTip::add( m_loopOnButton, tr( "Enable loop" ) );
m_loopOnButton->setToolTip(tr("Enable loop"));

PixmapButton * m_loopPingPongButton = new PixmapButton( this );
m_loopPingPongButton->setCheckable( true );
Expand All @@ -506,7 +505,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"loop_pingpong_on" ) );
m_loopPingPongButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"loop_pingpong_off" ) );
ToolTip::add( m_loopPingPongButton, tr( "Enable ping-pong loop" ) );
m_loopPingPongButton->setToolTip(tr("Enable ping-pong loop"));

m_loopGroup = new automatableButtonGroup( this );
m_loopGroup->addButton( m_loopOffButton );
Expand All @@ -520,7 +519,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument,
"stutter_on" ) );
m_stutterButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"stutter_off" ) );
ToolTip::add( m_stutterButton,
m_stutterButton->setToolTip(
tr( "Continue sample playback across notes" ) );

m_ampKnob = new Knob( knobBright_26, this );
Expand Down
19 changes: 9 additions & 10 deletions plugins/BitInvader/BitInvader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "LedCheckBox.h"
#include "NotePlayHandle.h"
#include "PixmapButton.h"
#include "ToolTip.h"
#include "Song.h"
#include "interpolation.h"

Expand Down Expand Up @@ -357,7 +356,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
m_graph->setAutoFillBackground( true );
m_graph->setGraphColor( QColor( 255, 255, 255 ) );

ToolTip::add( m_graph, tr ( "Draw your own waveform here "
m_graph->setToolTip(tr("Draw your own waveform here "
"by dragging your mouse on this graph."
));

Expand All @@ -374,7 +373,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
"sin_wave_active" ) );
m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"sin_wave_inactive" ) );
ToolTip::add( m_sinWaveBtn,
m_sinWaveBtn->setToolTip(
tr( "Sine wave" ) );

m_triangleWaveBtn = new PixmapButton( this, tr( "Triangle wave" ) );
Expand All @@ -383,7 +382,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
embed::getIconPixmap( "triangle_wave_active" ) );
m_triangleWaveBtn->setInactiveGraphic(
embed::getIconPixmap( "triangle_wave_inactive" ) );
ToolTip::add( m_triangleWaveBtn,
m_triangleWaveBtn->setToolTip(
tr( "Triangle wave" ) );

m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) );
Expand All @@ -392,7 +391,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
"saw_wave_active" ) );
m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"saw_wave_inactive" ) );
ToolTip::add( m_sawWaveBtn,
m_sawWaveBtn->setToolTip(
tr( "Saw wave" ) );

m_sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) );
Expand All @@ -401,7 +400,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
"square_wave_active" ) );
m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"square_wave_inactive" ) );
ToolTip::add( m_sqrWaveBtn,
m_sqrWaveBtn->setToolTip(
tr( "Square wave" ) );

m_whiteNoiseWaveBtn = new PixmapButton( this,
Expand All @@ -411,7 +410,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
embed::getIconPixmap( "white_noise_wave_active" ) );
m_whiteNoiseWaveBtn->setInactiveGraphic(
embed::getIconPixmap( "white_noise_wave_inactive" ) );
ToolTip::add( m_whiteNoiseWaveBtn,
m_whiteNoiseWaveBtn->setToolTip(
tr( "White noise" ) );

m_usrWaveBtn = new PixmapButton( this, tr( "User-defined wave" ) );
Expand All @@ -420,7 +419,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
"usr_wave_active" ) );
m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap(
"usr_wave_inactive" ) );
ToolTip::add( m_usrWaveBtn,
m_usrWaveBtn->setToolTip(
tr( "User-defined wave" ) );

m_smoothBtn = new PixmapButton( this, tr( "Smooth waveform" ) );
Expand All @@ -429,7 +428,7 @@ BitInvaderView::BitInvaderView( Instrument * _instrument,
"smooth_active" ) );
m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
"smooth_inactive" ) );
ToolTip::add( m_smoothBtn,
m_smoothBtn->setToolTip(
tr( "Smooth waveform" ) );


Expand Down Expand Up @@ -539,7 +538,7 @@ void BitInvaderView::usrWaveClicked()
QString fileName = m_graph->model()->setWaveToUser();
if (!fileName.isEmpty())
{
ToolTip::add(m_usrWaveBtn, fileName);
m_usrWaveBtn->setToolTip(fileName);
m_graph->model()->clearInvisible();
Engine::getSong()->setModified();
}
Expand Down
5 changes: 2 additions & 3 deletions plugins/Bitcrush/BitcrushControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "embed.h"
#include "BitcrushControlDialog.h"
#include "BitcrushControls.h"
#include "ToolTip.h"
#include "LedCheckBox.h"
#include "Knob.h"

Expand Down Expand Up @@ -82,12 +81,12 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
LedCheckBox * rateEnabled = new LedCheckBox( "", this, tr( "Rate enabled" ), LedCheckBox::Green );
rateEnabled->move( 64, 14 );
rateEnabled->setModel( & controls->m_rateEnabled );
ToolTip::add( rateEnabled, tr( "Enable sample-rate crushing" ) );
rateEnabled->setToolTip(tr("Enable sample-rate crushing"));

LedCheckBox * depthEnabled = new LedCheckBox( "", this, tr( "Depth enabled" ), LedCheckBox::Green );
depthEnabled->move( 101, 14 );
depthEnabled->setModel( & controls->m_depthEnabled );
ToolTip::add( depthEnabled, tr( "Enable bit-depth crushing" ) );
depthEnabled->setToolTip(tr("Enable bit-depth crushing"));


// rate crushing knobs
Expand Down
Loading

0 comments on commit 8d0ff4c

Please sign in to comment.