Merge master into transposeClip
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "ui_about_dialog.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AboutDialog : public QDialog, public Ui::AboutDialog
|
||||
{
|
||||
@@ -38,6 +40,7 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
#include <QActionGroup>
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
/// \brief Convenience subclass of QActionGroup
|
||||
///
|
||||
/// This class provides the same functionality as QActionGroup, but in addition
|
||||
@@ -54,4 +57,6 @@ private:
|
||||
QList<QAction*> m_actions;
|
||||
};
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "AudioDevice.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioAlsa : public QThread, public AudioDevice
|
||||
{
|
||||
@@ -52,7 +54,7 @@ public:
|
||||
m_deviceName(deviceName),
|
||||
m_deviceDescription(deviceDescription)
|
||||
{}
|
||||
~DeviceInfo() {}
|
||||
~DeviceInfo() = default;
|
||||
|
||||
QString const & getDeviceName() const { return m_deviceName; }
|
||||
QString const & getDeviceDescription() const { return m_deviceDescription; }
|
||||
@@ -67,7 +69,7 @@ public:
|
||||
|
||||
public:
|
||||
AudioAlsa( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioAlsa();
|
||||
~AudioAlsa() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -102,6 +104,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_ALSA
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,8 +35,11 @@
|
||||
|
||||
|
||||
class QComboBox;
|
||||
class LcdSpinBox;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class LcdSpinBox;
|
||||
|
||||
class AudioAlsaSetupWidget : public AudioDeviceSetupWidget
|
||||
{
|
||||
@@ -44,7 +47,7 @@ class AudioAlsaSetupWidget : public AudioDeviceSetupWidget
|
||||
|
||||
public:
|
||||
AudioAlsaSetupWidget( QWidget * _parent );
|
||||
virtual ~AudioAlsaSetupWidget();
|
||||
~AudioAlsaSetupWidget() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
@@ -59,6 +62,8 @@ private:
|
||||
AudioAlsa::DeviceInfoCollection m_deviceInfos;
|
||||
};
|
||||
|
||||
#endif
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // LMMS_HAVE_ALSA
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,10 +30,13 @@
|
||||
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class QThread;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngine;
|
||||
class AudioPort;
|
||||
class QThread;
|
||||
|
||||
|
||||
class AudioDevice
|
||||
@@ -153,7 +156,8 @@ private:
|
||||
|
||||
surroundSampleFrame * m_buffer;
|
||||
|
||||
} ;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "TabWidget.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AudioDeviceSetupWidget : public TabWidget
|
||||
{
|
||||
@@ -34,12 +36,13 @@ class AudioDeviceSetupWidget : public TabWidget
|
||||
public:
|
||||
AudioDeviceSetupWidget( const QString & _caption, QWidget * _parent );
|
||||
|
||||
virtual ~AudioDeviceSetupWidget();
|
||||
~AudioDeviceSetupWidget() override = default;
|
||||
|
||||
virtual void saveSettings() = 0;
|
||||
|
||||
virtual void show();
|
||||
};
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "AudioEngine.h"
|
||||
#include "MicroTimer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioDummy : public QThread, public AudioDevice
|
||||
{
|
||||
@@ -41,7 +43,7 @@ public:
|
||||
_success_ful = true;
|
||||
}
|
||||
|
||||
virtual ~AudioDummy()
|
||||
~AudioDummy() override
|
||||
{
|
||||
stopProcessing();
|
||||
}
|
||||
@@ -52,17 +54,15 @@ public:
|
||||
}
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent ) :
|
||||
AudioDeviceSetupWidget( AudioDummy::name(), _parent )
|
||||
gui::AudioDeviceSetupWidget( AudioDummy::name(), _parent )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~setupWidget()
|
||||
{
|
||||
}
|
||||
~setupWidget() override = default;
|
||||
|
||||
void saveSettings() override
|
||||
{
|
||||
@@ -114,5 +114,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
#define AUDIO_ENGINE_H
|
||||
|
||||
#include <QMutex>
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
|
||||
#include <QThread>
|
||||
#include <QVector>
|
||||
#include <QWaitCondition>
|
||||
@@ -39,9 +44,13 @@
|
||||
#include "PlayHandle.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioDevice;
|
||||
class MidiClient;
|
||||
class AudioPort;
|
||||
class AudioEngineWorkerThread;
|
||||
|
||||
|
||||
const fpp_t MINIMUM_BUFFER_SIZE = 32;
|
||||
@@ -54,14 +63,50 @@ const int BYTES_PER_SURROUND_FRAME = sizeof( surroundSampleFrame );
|
||||
|
||||
const float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f;
|
||||
|
||||
|
||||
class AudioEngineWorkerThread;
|
||||
|
||||
|
||||
class LMMS_EXPORT AudioEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @brief RAII helper for requestChangesInModel.
|
||||
* Used by AudioEngine::requestChangesGuard.
|
||||
*/
|
||||
class RequestChangesGuard {
|
||||
friend class AudioEngine;
|
||||
|
||||
private:
|
||||
RequestChangesGuard(AudioEngine* audioEngine)
|
||||
: m_audioEngine{audioEngine}
|
||||
{
|
||||
m_audioEngine->requestChangeInModel();
|
||||
}
|
||||
public:
|
||||
|
||||
RequestChangesGuard()
|
||||
: m_audioEngine{nullptr}
|
||||
{
|
||||
}
|
||||
|
||||
RequestChangesGuard(RequestChangesGuard&& other)
|
||||
: RequestChangesGuard()
|
||||
{
|
||||
std::swap(other.m_audioEngine, m_audioEngine);
|
||||
}
|
||||
|
||||
// Disallow copy.
|
||||
RequestChangesGuard(const RequestChangesGuard&) = delete;
|
||||
RequestChangesGuard& operator=(const RequestChangesGuard&) = delete;
|
||||
|
||||
~RequestChangesGuard() {
|
||||
if (m_audioEngine) {
|
||||
m_audioEngine->doneChangeInModel();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
AudioEngine* m_audioEngine;
|
||||
};
|
||||
|
||||
struct qualitySettings
|
||||
{
|
||||
enum Mode
|
||||
@@ -309,6 +354,11 @@ public:
|
||||
void requestChangeInModel();
|
||||
void doneChangeInModel();
|
||||
|
||||
RequestChangesGuard requestChangesGuard()
|
||||
{
|
||||
return RequestChangesGuard{this};
|
||||
}
|
||||
|
||||
static bool isAudioDevNameValid(QString name);
|
||||
static bool isMidiDevNameValid(QString name);
|
||||
|
||||
@@ -316,7 +366,7 @@ public:
|
||||
signals:
|
||||
void qualitySettingsChanged();
|
||||
void sampleRateChanged();
|
||||
void nextAudioBuffer( const surroundSampleFrame * buffer );
|
||||
void nextAudioBuffer( const lmms::surroundSampleFrame * buffer );
|
||||
|
||||
|
||||
private:
|
||||
@@ -342,7 +392,7 @@ private:
|
||||
|
||||
|
||||
AudioEngine( bool renderOnly );
|
||||
virtual ~AudioEngine();
|
||||
~AudioEngine() override;
|
||||
|
||||
void startProcessing(bool needsFifo = true);
|
||||
void stopProcessing();
|
||||
@@ -419,16 +469,22 @@ private:
|
||||
bool m_changesSignal;
|
||||
unsigned int m_changes;
|
||||
QMutex m_changesMutex;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
QRecursiveMutex m_doChangesMutex;
|
||||
#else
|
||||
QMutex m_doChangesMutex;
|
||||
#endif
|
||||
QMutex m_waitChangesMutex;
|
||||
QWaitCondition m_changesAudioEngineCondition;
|
||||
QWaitCondition m_changesRequestCondition;
|
||||
|
||||
bool m_waitingForWrite;
|
||||
|
||||
friend class LmmsCore;
|
||||
friend class Engine;
|
||||
friend class AudioEngineWorkerThread;
|
||||
friend class ProjectRenderer;
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,11 +30,14 @@
|
||||
#include "lmms_basics.h"
|
||||
#include "MicroTimer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngineProfiler
|
||||
{
|
||||
public:
|
||||
AudioEngineProfiler();
|
||||
~AudioEngineProfiler();
|
||||
~AudioEngineProfiler() = default;
|
||||
|
||||
void startPeriod()
|
||||
{
|
||||
@@ -57,4 +60,6 @@ private:
|
||||
QFile m_outputFile;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,12 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
class AudioEngine;
|
||||
class QWaitCondition;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngine;
|
||||
class ThreadableJob;
|
||||
|
||||
class AudioEngineWorkerThread : public QThread
|
||||
@@ -74,7 +78,7 @@ public:
|
||||
|
||||
|
||||
AudioEngineWorkerThread( AudioEngine* audioEngine );
|
||||
virtual ~AudioEngineWorkerThread();
|
||||
~AudioEngineWorkerThread() override;
|
||||
|
||||
virtual void quit();
|
||||
|
||||
@@ -115,5 +119,6 @@ private:
|
||||
volatile bool m_quit;
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "OutputSettings.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileDevice : public AudioDevice
|
||||
{
|
||||
@@ -38,7 +40,7 @@ public:
|
||||
AudioFileDevice(OutputSettings const & outputSettings,
|
||||
const ch_cnt_t _channels, const QString & _file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileDevice();
|
||||
~AudioFileDevice() override;
|
||||
|
||||
QString outputFile() const
|
||||
{
|
||||
@@ -74,5 +76,6 @@ typedef AudioFileDevice * ( * AudioFileDeviceInstantiaton )
|
||||
AudioEngine* audioEngine,
|
||||
bool & successful );
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "AudioFileDevice.h"
|
||||
#include <sndfile.h>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileFlac: public AudioFileDevice
|
||||
{
|
||||
public:
|
||||
@@ -40,7 +43,7 @@ public:
|
||||
AudioEngine* audioEngine
|
||||
);
|
||||
|
||||
virtual ~AudioFileFlac();
|
||||
~AudioFileFlac() override;
|
||||
|
||||
static AudioFileDevice* getInst(QString const& outputFilename,
|
||||
OutputSettings const& outputSettings,
|
||||
@@ -62,7 +65,7 @@ private:
|
||||
SF_INFO m_sfinfo;
|
||||
SNDFILE* m_sf;
|
||||
|
||||
virtual void writeBuffer(surroundSampleFrame const* _ab,
|
||||
void writeBuffer(surroundSampleFrame const* _ab,
|
||||
fpp_t const frames,
|
||||
float master_gain) override;
|
||||
|
||||
@@ -71,4 +74,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif //AUDIO_FILE_FLAC_H
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "lame/lame.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileMP3 : public AudioFileDevice
|
||||
{
|
||||
@@ -43,7 +45,7 @@ public:
|
||||
bool & successful,
|
||||
const QString & _file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileMP3();
|
||||
~AudioFileMP3() override;
|
||||
|
||||
static AudioFileDevice * getInst( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
@@ -56,7 +58,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void writeBuffer( const surroundSampleFrame * /* _buf*/,
|
||||
void writeBuffer( const surroundSampleFrame * /* _buf*/,
|
||||
const fpp_t /*_frames*/,
|
||||
const float /*_master_gain*/ ) override;
|
||||
|
||||
@@ -69,6 +71,8 @@ private:
|
||||
lame_t m_lame;
|
||||
};
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_MP3LAME
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "AudioFileDevice.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileOgg : public AudioFileDevice
|
||||
{
|
||||
@@ -43,7 +45,7 @@ public:
|
||||
bool & _success_ful,
|
||||
const QString & _file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileOgg();
|
||||
~AudioFileOgg() override;
|
||||
|
||||
static AudioFileDevice * getInst( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
@@ -56,7 +58,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain ) override;
|
||||
|
||||
@@ -107,6 +109,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_OGGVORBIS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioFileWave : public AudioFileDevice
|
||||
{
|
||||
@@ -40,7 +42,7 @@ public:
|
||||
bool & successful,
|
||||
const QString & file,
|
||||
AudioEngine* audioEngine );
|
||||
virtual ~AudioFileWave();
|
||||
~AudioFileWave() override;
|
||||
|
||||
static AudioFileDevice * getInst( const QString & outputFilename,
|
||||
OutputSettings const & outputSettings,
|
||||
@@ -54,7 +56,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
float _master_gain ) override;
|
||||
|
||||
@@ -66,4 +68,7 @@ private:
|
||||
SNDFILE * m_sf;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,22 +41,30 @@
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
class QLineEdit;
|
||||
class LcdSpinBox;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class MidiJack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioJack : public QObject, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioJack( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioJack();
|
||||
~AudioJack() override;
|
||||
|
||||
// this is to allow the jack midi connection to use the same jack client connection
|
||||
// the jack callback is handled here, we call the midi client so that it can read
|
||||
// it's midi data during the callback
|
||||
AudioJack * addMidiClient(MidiJack *midiClient);
|
||||
void removeMidiClient(void) { m_midiClient = nullptr; }
|
||||
void removeMidiClient() { m_midiClient = nullptr; }
|
||||
jack_client_t * jackClient() {return m_client;};
|
||||
|
||||
inline static QString name()
|
||||
@@ -66,17 +74,17 @@ public:
|
||||
}
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
virtual void saveSettings();
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_clientName;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -88,13 +96,13 @@ private slots:
|
||||
private:
|
||||
bool initJackClient();
|
||||
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
|
||||
virtual void registerPort( AudioPort * _port );
|
||||
virtual void unregisterPort( AudioPort * _port );
|
||||
virtual void renamePort( AudioPort * _port );
|
||||
void registerPort( AudioPort * _port ) override;
|
||||
void unregisterPort( AudioPort * _port ) override;
|
||||
void renamePort( AudioPort * _port ) override;
|
||||
|
||||
int processCallback( jack_nframes_t _nframes, void * _udata );
|
||||
|
||||
@@ -132,6 +140,8 @@ signals:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_JACK
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,17 +34,24 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
|
||||
class LcdSpinBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class AudioOss : public QThread, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioOss( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioOss();
|
||||
~AudioOss() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -54,17 +61,17 @@ public:
|
||||
static QString probeDevice();
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -81,7 +88,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_OSS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "MemoryManager.h"
|
||||
#include "PlayHandle.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EffectChain;
|
||||
class FloatModel;
|
||||
class BoolModel;
|
||||
@@ -133,5 +136,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,9 +30,28 @@
|
||||
#include "lmmsconfig.h"
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
#ifdef LMMS_HAVE_PORTAUDIO
|
||||
|
||||
# include <portaudio.h>
|
||||
|
||||
# include "AudioDevice.h"
|
||||
# include "AudioDeviceSetupWidget.h"
|
||||
|
||||
# if defined paNeverDropInput || defined paNonInterleaved
|
||||
# define PORTAUDIO_V19
|
||||
# else
|
||||
# define PORTAUDIO_V18
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioPortAudioSetupUtil : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void updateBackends();
|
||||
void updateDevices();
|
||||
@@ -41,33 +60,24 @@ public slots:
|
||||
public:
|
||||
ComboBoxModel m_backendModel;
|
||||
ComboBoxModel m_deviceModel;
|
||||
} ;
|
||||
};
|
||||
|
||||
|
||||
#ifdef LMMS_HAVE_PORTAUDIO
|
||||
|
||||
#include <portaudio.h>
|
||||
|
||||
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
#if defined paNeverDropInput || defined paNonInterleaved
|
||||
# define PORTAUDIO_V19
|
||||
#else
|
||||
# define PORTAUDIO_V18
|
||||
#endif
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class ComboBox;
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioPortAudio : public AudioDevice
|
||||
{
|
||||
public:
|
||||
AudioPortAudio( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioPortAudio();
|
||||
~AudioPortAudio() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -80,26 +90,26 @@ public:
|
||||
unsigned long _framesPerBuffer );
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
virtual void saveSettings();
|
||||
virtual void show();
|
||||
void saveSettings() override;
|
||||
void show() override;
|
||||
|
||||
private:
|
||||
ComboBox * m_backend;
|
||||
ComboBox * m_device;
|
||||
gui::ComboBox * m_backend;
|
||||
gui::ComboBox * m_device;
|
||||
AudioPortAudioSetupUtil m_setupUtil;
|
||||
|
||||
} ;
|
||||
|
||||
private:
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
|
||||
#ifdef PORTAUDIO_V19
|
||||
static int _process_callback( const void *_inputBuffer, void * _outputBuffer,
|
||||
@@ -149,6 +159,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
#endif // LMMS_HAVE_PORTAUDIO
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,17 +36,23 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
|
||||
class LcdSpinBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioPulseAudio : public QThread, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioPulseAudio( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioPulseAudio();
|
||||
~AudioPulseAudio() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -56,17 +62,17 @@ public:
|
||||
static QString probeDevice();
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -94,6 +100,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
|
||||
#include "AudioDevice.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class SampleBuffer;
|
||||
|
||||
|
||||
@@ -38,14 +41,14 @@ class AudioSampleRecorder : public AudioDevice
|
||||
{
|
||||
public:
|
||||
AudioSampleRecorder( const ch_cnt_t _channels, bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioSampleRecorder();
|
||||
~AudioSampleRecorder() override;
|
||||
|
||||
f_cnt_t framesRecorded() const;
|
||||
void createSampleBuffer( SampleBuffer** sampleBuffer );
|
||||
|
||||
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain ) override;
|
||||
|
||||
@@ -54,5 +57,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,12 +41,14 @@
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioSdl : public AudioDevice
|
||||
{
|
||||
public:
|
||||
AudioSdl( bool & _success_ful, AudioEngine* audioEngine );
|
||||
virtual ~AudioSdl();
|
||||
~AudioSdl() override;
|
||||
|
||||
inline static QString name()
|
||||
{
|
||||
@@ -55,11 +57,11 @@ public:
|
||||
}
|
||||
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
~setupWidget() override;
|
||||
~setupWidget() override = default;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
@@ -108,6 +110,9 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_SDL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,40 +36,47 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
class LcdSpinBox;
|
||||
class QLineEdit;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
|
||||
class AudioSndio : public QThread, public AudioDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioSndio( bool & _success_ful, AudioEngine * _audioEngine );
|
||||
virtual ~AudioSndio();
|
||||
~AudioSndio() override;
|
||||
|
||||
inline static QString name( void )
|
||||
inline static QString name()
|
||||
{
|
||||
return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "sndio" );
|
||||
}
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override = default;
|
||||
|
||||
void saveSettings( void ) override;
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
LcdSpinBox * m_channels;
|
||||
gui::LcdSpinBox * m_channels;
|
||||
} ;
|
||||
|
||||
private:
|
||||
void startProcessing( void ) override;
|
||||
void stopProcessing( void ) override;
|
||||
void applyQualitySettings( void ) override;
|
||||
void run( void ) override;
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
void run() override;
|
||||
|
||||
struct sio_hdl *m_hdl;
|
||||
struct sio_par m_par;
|
||||
@@ -78,6 +85,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif /* LMMS_HAVE_SNDIO */
|
||||
|
||||
#endif /* _AUDIO_SNDIO_H */
|
||||
|
||||
@@ -37,15 +37,21 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class ComboBox;
|
||||
class LcdSpinBox;
|
||||
}
|
||||
|
||||
// Exists only to work around "Error: Meta object features not supported for nested classes"
|
||||
class AudioSoundIoSetupUtil : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~AudioSoundIoSetupUtil();
|
||||
virtual ~AudioSoundIoSetupUtil() = default;
|
||||
|
||||
void *m_setupWidget;
|
||||
public slots:
|
||||
@@ -64,7 +70,7 @@ public:
|
||||
return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "soundio" );
|
||||
}
|
||||
|
||||
class setupWidget : public AudioDeviceSetupWidget
|
||||
class setupWidget : public gui::AudioDeviceSetupWidget
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
@@ -78,8 +84,8 @@ public:
|
||||
private:
|
||||
|
||||
AudioSoundIoSetupUtil m_setupUtil;
|
||||
ComboBox * m_backend;
|
||||
ComboBox * m_device;
|
||||
gui::ComboBox * m_backend;
|
||||
gui::ComboBox * m_device;
|
||||
|
||||
ComboBoxModel m_backendModel;
|
||||
ComboBoxModel m_deviceModel;
|
||||
@@ -134,6 +140,9 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_SOUNDIO
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class automatableButtonGroup;
|
||||
|
||||
@@ -40,7 +42,7 @@ class LMMS_EXPORT AutomatableButton : public QPushButton, public BoolModelView
|
||||
public:
|
||||
AutomatableButton( QWidget * _parent, const QString & _name
|
||||
= QString() );
|
||||
virtual ~AutomatableButton();
|
||||
~AutomatableButton() override;
|
||||
|
||||
inline void setCheckable( bool _on )
|
||||
{
|
||||
@@ -85,7 +87,7 @@ class LMMS_EXPORT automatableButtonGroup : public QWidget, public IntModelView
|
||||
public:
|
||||
automatableButtonGroup( QWidget * _parent, const QString & _name
|
||||
= QString() );
|
||||
virtual ~automatableButtonGroup();
|
||||
~automatableButtonGroup() override;
|
||||
|
||||
void addButton( AutomatableButton * _btn );
|
||||
void removeButton( AutomatableButton * _btn );
|
||||
@@ -105,5 +107,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "MemoryManager.h"
|
||||
#include "ModelVisitor.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// simple way to map a property of a view to a model
|
||||
#define mapPropertyFromModelPtr(type,getfunc,setfunc,modelname) \
|
||||
public: \
|
||||
@@ -85,7 +89,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
virtual ~AutomatableModel();
|
||||
~AutomatableModel() override;
|
||||
|
||||
// Implement those by using the MODEL_IS_VISITABLE macro
|
||||
virtual void accept(ModelVisitor& v) = 0;
|
||||
@@ -416,7 +420,7 @@ private:
|
||||
|
||||
signals:
|
||||
void initValueChanged( float val );
|
||||
void destroyed( jo_id_t id );
|
||||
void destroyed( lmms::jo_id_t id );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -502,5 +506,8 @@ public:
|
||||
|
||||
typedef QMap<AutomatableModel*, float> AutomatedValueMap;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,11 +32,14 @@
|
||||
class QMenu;
|
||||
class QMouseEvent;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class LMMS_EXPORT AutomatableModelView : public ModelView
|
||||
{
|
||||
public:
|
||||
AutomatableModelView( Model* model, QWidget* _this );
|
||||
virtual ~AutomatableModelView() = default;
|
||||
~AutomatableModelView() override = default;
|
||||
|
||||
// some basic functions for convenience
|
||||
AutomatableModel* modelUntyped()
|
||||
@@ -132,5 +135,7 @@ using FloatModelView = TypedModelView<FloatModel>;
|
||||
using IntModelView = TypedModelView<IntModel>;
|
||||
using BoolModelView = TypedModelView<BoolModel>;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,13 +31,15 @@
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AutomatableSlider : public QSlider, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AutomatableSlider( QWidget * _parent, const QString & _name = QString() );
|
||||
virtual ~AutomatableSlider();
|
||||
~AutomatableSlider() override = default;
|
||||
|
||||
bool showStatus()
|
||||
{
|
||||
@@ -73,5 +75,6 @@ private slots:
|
||||
|
||||
typedef IntModel sliderModel;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,14 +29,25 @@
|
||||
|
||||
#include <QMap>
|
||||
#include <QPointer>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
|
||||
#include "AutomationNode.h"
|
||||
#include "Clip.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationTrack;
|
||||
class TimePos;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class AutomationClipView;
|
||||
} // namespace gui
|
||||
|
||||
|
||||
|
||||
class LMMS_EXPORT AutomationClip : public Clip
|
||||
@@ -57,7 +68,7 @@ public:
|
||||
|
||||
AutomationClip( AutomationTrack * _auto_track );
|
||||
AutomationClip( const AutomationClip & _clip_to_copy );
|
||||
virtual ~AutomationClip() = default;
|
||||
~AutomationClip() override = default;
|
||||
|
||||
bool addObject( AutomatableModel * _obj, bool _search_dup = true );
|
||||
|
||||
@@ -152,7 +163,7 @@ public:
|
||||
static const QString classNodeName() { return "automationclip"; }
|
||||
QString nodeName() const override { return classNodeName(); }
|
||||
|
||||
ClipView * createView( TrackView * _tv ) override;
|
||||
gui::ClipView * createView( gui::TrackView * _tv ) override;
|
||||
|
||||
|
||||
static bool isAutomated( const AutomatableModel * _m );
|
||||
@@ -168,7 +179,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void objectDestroyed( jo_id_t );
|
||||
void objectDestroyed( lmms::jo_id_t );
|
||||
void flipY( int min, int max );
|
||||
void flipY();
|
||||
void flipX( int length = -1 );
|
||||
@@ -181,7 +192,11 @@ private:
|
||||
|
||||
// Mutex to make methods involving automation clips thread safe
|
||||
// Mutable so we can lock it from const objects
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
mutable QRecursiveMutex m_clipMutex;
|
||||
#else
|
||||
mutable QMutex m_clipMutex;
|
||||
#endif
|
||||
|
||||
AutomationTrack * m_autoTrack;
|
||||
QVector<jo_id_t> m_idsToResolve;
|
||||
@@ -204,7 +219,7 @@ private:
|
||||
static const float DEFAULT_MIN_VALUE;
|
||||
static const float DEFAULT_MAX_VALUE;
|
||||
|
||||
friend class AutomationClipView;
|
||||
friend class gui::AutomationClipView;
|
||||
friend class AutomationNode;
|
||||
|
||||
} ;
|
||||
@@ -242,4 +257,7 @@ inline int POS(AutomationClip::TimemapIterator it)
|
||||
return it.key();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,14 @@
|
||||
|
||||
#include "ClipView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationClip;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class AutomationClipView : public ClipView
|
||||
{
|
||||
@@ -39,7 +45,7 @@ class AutomationClipView : public ClipView
|
||||
|
||||
public:
|
||||
AutomationClipView( AutomationClip * _clip, TrackView * _parent );
|
||||
virtual ~AutomationClipView();
|
||||
~AutomationClipView() override = default;
|
||||
|
||||
public slots:
|
||||
/// Opens this view's clip in the global automation editor
|
||||
@@ -75,4 +81,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,9 +40,16 @@ class QPainter;
|
||||
class QPixmap;
|
||||
class QScrollBar;
|
||||
|
||||
class ComboBox;
|
||||
class Knob;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class Knob;
|
||||
class ComboBox;
|
||||
class TimeLineWidget;
|
||||
|
||||
|
||||
@@ -128,7 +135,7 @@ protected slots:
|
||||
void setProgressionType(int type);
|
||||
void setTension();
|
||||
|
||||
void updatePosition( const TimePos & t );
|
||||
void updatePosition( const lmms::TimePos & t );
|
||||
|
||||
void zoomingXChanged();
|
||||
void zoomingYChanged();
|
||||
@@ -160,7 +167,7 @@ private:
|
||||
|
||||
AutomationEditor();
|
||||
AutomationEditor( const AutomationEditor & );
|
||||
virtual ~AutomationEditor();
|
||||
~AutomationEditor() override;
|
||||
|
||||
static QPixmap * s_toolDraw;
|
||||
static QPixmap * s_toolErase;
|
||||
@@ -234,7 +241,7 @@ private:
|
||||
|
||||
signals:
|
||||
void currentClipChanged();
|
||||
void positionChanged( const TimePos & );
|
||||
void positionChanged( const lmms::TimePos & );
|
||||
} ;
|
||||
|
||||
|
||||
@@ -248,7 +255,7 @@ class AutomationEditorWindow : public Editor
|
||||
static const int INITIAL_HEIGHT = 480;
|
||||
public:
|
||||
AutomationEditorWindow();
|
||||
~AutomationEditorWindow();
|
||||
~AutomationEditorWindow() override = default;
|
||||
|
||||
void setCurrentClip(AutomationClip* clip);
|
||||
const AutomationClip* currentClip();
|
||||
@@ -293,5 +300,8 @@ private:
|
||||
ComboBox * m_quantizeComboBox;
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#ifndef AUTOMATION_NODE_H
|
||||
#define AUTOMATION_NODE_H
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationClip;
|
||||
|
||||
|
||||
@@ -151,5 +154,6 @@ private:
|
||||
float m_outTangent;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,15 +29,17 @@
|
||||
|
||||
#include "Track.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationTrack : public Track
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AutomationTrack( TrackContainer* tc, bool _hidden = false );
|
||||
virtual ~AutomationTrack() = default;
|
||||
~AutomationTrack() override = default;
|
||||
|
||||
virtual bool play( const TimePos & _start, const fpp_t _frames,
|
||||
bool play( const TimePos & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
|
||||
|
||||
QString nodeName() const override
|
||||
@@ -45,10 +47,10 @@ public:
|
||||
return "automationtrack";
|
||||
}
|
||||
|
||||
TrackView * createView( TrackContainerView* ) override;
|
||||
gui::TrackView * createView( gui::TrackContainerView* ) override;
|
||||
Clip* createClip(const TimePos & pos) override;
|
||||
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent ) override;
|
||||
void loadTrackSpecificSettings( const QDomElement & _this ) override;
|
||||
|
||||
@@ -58,4 +60,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,18 +28,28 @@
|
||||
|
||||
#include "TrackView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomationTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class AutomationTrackView : public TrackView
|
||||
{
|
||||
public:
|
||||
AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv );
|
||||
virtual ~AutomationTrackView() = default;
|
||||
~AutomationTrackView() override = default;
|
||||
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,9 @@ class QString;
|
||||
#include "Engine.h"
|
||||
#include "AudioEngine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
constexpr int MAXLEN = 11;
|
||||
constexpr int MIPMAPSIZE = 2 << ( MAXLEN + 1 );
|
||||
constexpr int MIPMAPSIZE3 = 3 << ( MAXLEN + 1 );
|
||||
@@ -94,8 +97,8 @@ public:
|
||||
NumBLWaveforms
|
||||
};
|
||||
|
||||
BandLimitedWave() {};
|
||||
virtual ~BandLimitedWave() {};
|
||||
BandLimitedWave() = default;
|
||||
virtual ~BandLimitedWave() = default;
|
||||
|
||||
/*! \brief This method converts frequency to wavelength. The oscillate function takes wavelength as argument so
|
||||
* use this to convert your note frequency to wavelength before using it.
|
||||
@@ -168,5 +171,6 @@ public:
|
||||
static QString s_wavetableDir;
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
template<ch_cnt_t CHANNELS=DEFAULT_CHANNELS> class BasicFilters;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
@@ -55,7 +58,7 @@ public:
|
||||
m_sampleRate = sampleRate;
|
||||
clearHistory();
|
||||
}
|
||||
virtual ~LinkwitzRiley() {}
|
||||
virtual ~LinkwitzRiley() = default;
|
||||
|
||||
inline void clearHistory()
|
||||
{
|
||||
@@ -149,7 +152,7 @@ public:
|
||||
{
|
||||
clearHistory();
|
||||
}
|
||||
virtual ~BiQuad() {}
|
||||
virtual ~BiQuad() = default;
|
||||
|
||||
inline void setCoeffs( float a1, float a2, float b0, float b1, float b2 )
|
||||
{
|
||||
@@ -197,7 +200,7 @@ public:
|
||||
m_z1[i] = 0.0;
|
||||
}
|
||||
}
|
||||
virtual ~OnePole() {}
|
||||
virtual ~OnePole() = default;
|
||||
|
||||
inline void setCoeffs( float a0, float b1 )
|
||||
{
|
||||
@@ -913,4 +916,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,10 +29,14 @@
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT BufferManager
|
||||
{
|
||||
public:
|
||||
static void init( fpp_t framesPerPeriod );
|
||||
static void init( fpp_t fpp );
|
||||
static sampleFrame * acquire();
|
||||
// audio-buffer-mgm
|
||||
static void clear( sampleFrame * ab, const f_cnt_t frames,
|
||||
@@ -42,6 +46,12 @@ public:
|
||||
const f_cnt_t offset = 0 );
|
||||
#endif
|
||||
static void release( sampleFrame * buf );
|
||||
|
||||
private:
|
||||
static fpp_t s_framesPerPeriod;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,12 +34,16 @@
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class CPULoadWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CPULoadWidget( QWidget * _parent );
|
||||
virtual ~CPULoadWidget();
|
||||
~CPULoadWidget() override = default;
|
||||
|
||||
|
||||
protected:
|
||||
@@ -64,4 +68,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
///
|
||||
/// \brief A context menu with a caption
|
||||
///
|
||||
@@ -38,10 +41,10 @@ class LMMS_EXPORT CaptionMenu : public QMenu
|
||||
Q_OBJECT
|
||||
public:
|
||||
CaptionMenu( const QString & _title, QWidget * _parent = 0 );
|
||||
virtual ~CaptionMenu();
|
||||
~CaptionMenu() override = default;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,11 +30,20 @@
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Track;
|
||||
class ClipView;
|
||||
class TrackContainer;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ClipView;
|
||||
class TrackView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT Clip : public Model, public JournallingObject
|
||||
{
|
||||
@@ -44,7 +53,7 @@ class LMMS_EXPORT Clip : public Model, public JournallingObject
|
||||
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
|
||||
public:
|
||||
Clip( Track * track );
|
||||
virtual ~Clip();
|
||||
~Clip() override;
|
||||
|
||||
inline Track * getTrack() const
|
||||
{
|
||||
@@ -116,7 +125,7 @@ public:
|
||||
virtual void movePosition( const TimePos & pos );
|
||||
virtual void changeLength( const TimePos & length );
|
||||
|
||||
virtual ClipView * createView( TrackView * tv ) = 0;
|
||||
virtual gui::ClipView * createView( gui::TrackView * tv ) = 0;
|
||||
|
||||
inline void selectViewOnCreate( bool select )
|
||||
{
|
||||
@@ -177,4 +186,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,9 +36,16 @@
|
||||
class QMenu;
|
||||
class QContextMenuEvent;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DataFile;
|
||||
class TextFloat;
|
||||
class Clip;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class TextFloat;
|
||||
class TrackView;
|
||||
|
||||
|
||||
@@ -64,7 +71,7 @@ public:
|
||||
const static int BORDER_WIDTH = 2;
|
||||
|
||||
ClipView( Clip * clip, TrackView * tv );
|
||||
virtual ~ClipView();
|
||||
~ClipView() override;
|
||||
|
||||
bool fixedClips();
|
||||
|
||||
@@ -241,4 +248,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
class QMimeData;
|
||||
|
||||
namespace Clipboard
|
||||
namespace lmms::Clipboard
|
||||
{
|
||||
|
||||
enum class MimeType
|
||||
{
|
||||
StringPair,
|
||||
@@ -64,6 +65,7 @@ namespace Clipboard
|
||||
break;
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
} // namespace lmms::Clipboard
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,19 +21,26 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef COLOR_CHOOSER_H
|
||||
#define COLOR_CHOOSER_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
#include <QColorDialog>
|
||||
#include <QKeyEvent>
|
||||
#include <QVector>
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class ColorChooser: public QColorDialog
|
||||
{
|
||||
public:
|
||||
ColorChooser(const QColor &initial, QWidget *parent): QColorDialog(initial, parent) {};
|
||||
ColorChooser(QWidget *parent): QColorDialog(parent) {};
|
||||
//! For getting a color without having to initialise a color dialog
|
||||
ColorChooser() {};
|
||||
ColorChooser() = default;
|
||||
enum class Palette {Default, Track, Mixer};
|
||||
//! Set global palette via array, checking bounds
|
||||
void setPalette (QVector<QColor>);
|
||||
@@ -57,3 +64,9 @@ private:
|
||||
//! Generate a nice palette, with adjustable value
|
||||
static QVector<QColor> nicePalette (int);
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,12 +32,15 @@
|
||||
#include "ComboBoxModel.h"
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class LMMS_EXPORT ComboBox : public QWidget, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComboBox( QWidget* parent = nullptr, const QString& name = QString() );
|
||||
virtual ~ComboBox();
|
||||
~ComboBox() override = default;
|
||||
|
||||
ComboBoxModel* model()
|
||||
{
|
||||
@@ -78,4 +81,6 @@ private slots:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "AutomatableModel.h"
|
||||
#include "embed.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class LMMS_EXPORT ComboBoxModel : public IntModel
|
||||
{
|
||||
@@ -45,7 +47,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~ComboBoxModel()
|
||||
~ComboBoxModel() override
|
||||
{
|
||||
clear();
|
||||
}
|
||||
@@ -91,5 +93,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,11 @@
|
||||
#include "lmms_export.h"
|
||||
|
||||
|
||||
class LmmsCore;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class Engine;
|
||||
|
||||
const QString PROJECTS_PATH = "projects/";
|
||||
const QString TEMPLATE_PATH = "templates/";
|
||||
@@ -270,7 +274,7 @@ private:
|
||||
|
||||
ConfigManager();
|
||||
ConfigManager(const ConfigManager & _c);
|
||||
~ConfigManager();
|
||||
~ConfigManager() override;
|
||||
|
||||
void upgrade_1_1_90();
|
||||
void upgrade_1_1_91();
|
||||
@@ -304,6 +308,10 @@ private:
|
||||
settingsMap m_settings;
|
||||
|
||||
|
||||
friend class LmmsCore;
|
||||
friend class Engine;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -76,9 +76,15 @@
|
||||
#include <QLayout>
|
||||
#include <QMultiMap>
|
||||
#include <QStyle>
|
||||
|
||||
class QLayoutItem;
|
||||
class QRect;
|
||||
class QString;
|
||||
class QLineEdit;
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
/**
|
||||
Layout for controls (models)
|
||||
@@ -128,9 +134,11 @@ private:
|
||||
// relevant dimension is width, as later, heightForWidth() will be called
|
||||
// 400 looks good and is ~4 knobs in a row
|
||||
constexpr const static int m_minWidth = 400;
|
||||
class QLineEdit* m_searchBar;
|
||||
QLineEdit* m_searchBar;
|
||||
//! name of search bar, must be ASCII sorted before any alpha numerics
|
||||
static constexpr const char* s_searchBarName = "!!searchBar!!";
|
||||
};
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // CONTROLLAYOUT_H
|
||||
|
||||
@@ -33,10 +33,20 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "ValueBuffer.h"
|
||||
|
||||
class ControllerDialog;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Controller;
|
||||
class ControllerConnection;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ControllerDialog;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
typedef QVector<Controller *> ControllerVector;
|
||||
|
||||
|
||||
@@ -60,7 +70,7 @@ public:
|
||||
Controller( ControllerTypes _type, Model * _parent,
|
||||
const QString & _display_name );
|
||||
|
||||
virtual ~Controller();
|
||||
~Controller() override;
|
||||
|
||||
virtual float currentValue( int _offset );
|
||||
// The per-controller get-value-in-buffers function
|
||||
@@ -132,7 +142,7 @@ public:
|
||||
bool hasModel( const Model * m ) const;
|
||||
|
||||
public slots:
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
virtual gui::ControllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
virtual void setName( const QString & _new_name )
|
||||
{
|
||||
@@ -169,9 +179,12 @@ signals:
|
||||
// The value changed while the audio engine isn't running (i.e: MIDI CC)
|
||||
void valueChanged();
|
||||
|
||||
friend class ControllerDialog;
|
||||
friend class gui::ControllerDialog;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,8 +37,16 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "ValueBuffer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class ControllerConnection;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class ControllerConnectionDialog;
|
||||
}
|
||||
|
||||
typedef QVector<ControllerConnection *> ControllerConnectionVector;
|
||||
|
||||
|
||||
@@ -50,7 +58,7 @@ public:
|
||||
ControllerConnection(Controller * _controller);
|
||||
ControllerConnection( int _controllerId );
|
||||
|
||||
virtual ~ControllerConnection();
|
||||
~ControllerConnection() override;
|
||||
|
||||
inline Controller * getController()
|
||||
{
|
||||
@@ -115,8 +123,11 @@ signals:
|
||||
// The value changed while the audio engine isn't running (i.e: MIDI CC)
|
||||
void valueChanged();
|
||||
|
||||
friend class ControllerConnectionDialog;
|
||||
friend class gui::ControllerConnectionDialog;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -38,7 +38,15 @@
|
||||
class QLineEdit;
|
||||
class QListView;
|
||||
class QScrollArea;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutoDetectMidiController;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class TabWidget;
|
||||
@@ -47,14 +55,13 @@ class LedCheckBox;
|
||||
class MidiPortMenu;
|
||||
|
||||
|
||||
|
||||
class ControllerConnectionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllerConnectionDialog( QWidget * _parent,
|
||||
const AutomatableModel * _target_model );
|
||||
virtual ~ControllerConnectionDialog();
|
||||
~ControllerConnectionDialog() override;
|
||||
|
||||
Controller * chosenController()
|
||||
{
|
||||
@@ -99,4 +106,9 @@ private:
|
||||
AutoDetectMidiController * m_midiController;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,8 +30,13 @@
|
||||
|
||||
#include "ModelView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Controller;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ControllerDialog : public QWidget, public ModelView
|
||||
{
|
||||
@@ -39,7 +44,7 @@ class ControllerDialog : public QWidget, public ModelView
|
||||
public:
|
||||
ControllerDialog( Controller * _controller, QWidget * _parent );
|
||||
|
||||
virtual ~ControllerDialog();
|
||||
~ControllerDialog() override = default;
|
||||
|
||||
|
||||
signals:
|
||||
@@ -51,4 +56,9 @@ protected:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,16 +36,24 @@ class QPushButton;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
class ControllerView;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Controller;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ControllerView;
|
||||
|
||||
|
||||
class ControllerRackView : public QWidget, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllerRackView();
|
||||
virtual ~ControllerRackView();
|
||||
~ControllerRackView() override = default;
|
||||
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
@@ -57,9 +65,9 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
void deleteController( ControllerView * _view );
|
||||
void onControllerAdded( Controller * );
|
||||
void onControllerRemoved( Controller * );
|
||||
void deleteController( lmms::gui::ControllerView * _view );
|
||||
void onControllerAdded( lmms::Controller * );
|
||||
void onControllerRemoved( lmms::Controller * );
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
@@ -80,4 +88,8 @@ private:
|
||||
int m_nextIndex;
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,6 +36,10 @@ class QLabel;
|
||||
class QPushButton;
|
||||
class QMdiSubWindow;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class LedCheckBox;
|
||||
|
||||
|
||||
@@ -44,7 +48,7 @@ class ControllerView : public QFrame, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
ControllerView( Controller * _controller, QWidget * _parent );
|
||||
virtual ~ControllerView();
|
||||
~ControllerView() override;
|
||||
|
||||
inline Controller * getController()
|
||||
{
|
||||
@@ -64,7 +68,7 @@ public slots:
|
||||
void renameController();
|
||||
|
||||
signals:
|
||||
void deleteController( ControllerView * _view );
|
||||
void deleteController( lmms::gui::ControllerView * _view );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -81,4 +85,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,8 +34,20 @@
|
||||
|
||||
class QString;
|
||||
class QWidget;
|
||||
class QLabel;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AutomatableModel;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class AutomatableModelView;
|
||||
class Knob;
|
||||
class ComboBox;
|
||||
class LedCheckBox;
|
||||
|
||||
/**
|
||||
These classes provide
|
||||
@@ -52,15 +64,15 @@ public:
|
||||
|
||||
virtual void setModel(AutomatableModel* model) = 0;
|
||||
virtual AutomatableModel* model() = 0;
|
||||
virtual class AutomatableModelView* modelView() = 0;
|
||||
virtual AutomatableModelView* modelView() = 0;
|
||||
|
||||
virtual ~Control();
|
||||
virtual ~Control() = default;
|
||||
};
|
||||
|
||||
|
||||
class KnobControl : public Control
|
||||
{
|
||||
class Knob* m_knob;
|
||||
Knob* m_knob;
|
||||
|
||||
public:
|
||||
void setText(const QString& text) override;
|
||||
@@ -68,18 +80,18 @@ public:
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
FloatModel* model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
KnobControl(QWidget* parent = nullptr);
|
||||
~KnobControl() override;
|
||||
~KnobControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
class ComboControl : public Control
|
||||
{
|
||||
QWidget* m_widget;
|
||||
class ComboBox* m_combo;
|
||||
class QLabel* m_label;
|
||||
ComboBox* m_combo;
|
||||
QLabel* m_label;
|
||||
|
||||
public:
|
||||
void setText(const QString& text) override;
|
||||
@@ -87,10 +99,10 @@ public:
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
ComboBoxModel* model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
ComboControl(QWidget* parent = nullptr);
|
||||
~ComboControl() override;
|
||||
~ComboControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -104,17 +116,17 @@ public:
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
IntModel* model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
LcdControl(int numDigits, QWidget* parent = nullptr);
|
||||
~LcdControl() override;
|
||||
~LcdControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
class CheckControl : public Control
|
||||
{
|
||||
QWidget* m_widget;
|
||||
class LedCheckBox* m_checkBox;
|
||||
LedCheckBox* m_checkBox;
|
||||
QLabel* m_label;
|
||||
|
||||
public:
|
||||
@@ -122,12 +134,16 @@ public:
|
||||
QWidget* topWidget() override;
|
||||
|
||||
void setModel(AutomatableModel* model) override;
|
||||
BoolModel *model() override;
|
||||
class AutomatableModelView* modelView() override;
|
||||
BoolModel* model() override;
|
||||
AutomatableModelView* modelView() override;
|
||||
|
||||
CheckControl(QWidget* parent = nullptr);
|
||||
~CheckControl() override;
|
||||
~CheckControl() override = default;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // CONTROLS_H
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
#include "Knob.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT CustomTextKnob : public Knob
|
||||
{
|
||||
protected:
|
||||
@@ -21,10 +25,13 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
virtual QString displayValue() const;
|
||||
QString displayValue() const override;
|
||||
|
||||
protected:
|
||||
QString m_value_text;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,9 +33,14 @@
|
||||
#include "lmms_export.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class ProjectVersion;
|
||||
class QTextStream;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class ProjectVersion;
|
||||
|
||||
|
||||
class LMMS_EXPORT DataFile : public QDomDocument
|
||||
{
|
||||
MM_OPERATORS
|
||||
@@ -62,7 +67,7 @@ public:
|
||||
DataFile( const QByteArray& data );
|
||||
DataFile( Type type );
|
||||
|
||||
virtual ~DataFile();
|
||||
virtual ~DataFile() = default;
|
||||
|
||||
///
|
||||
/// \brief validate
|
||||
@@ -155,4 +160,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// brief usage
|
||||
|
||||
// Classes:
|
||||
@@ -360,4 +363,7 @@ typedef CombFeedfwd<2> StereoCombFeedfwd;
|
||||
typedef CombFeedbackDualtap<2> StereoCombFeedbackDualtap;
|
||||
typedef AllpassDelay<2> StereoAllpassDelay;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <QFontMetrics>
|
||||
#include <QWheelEvent>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief horizontalAdvance is a backwards-compatible adapter for
|
||||
* QFontMetrics::horizontalAdvance and width functions.
|
||||
@@ -60,4 +63,7 @@ inline QPoint position(QWheelEvent *wheelEvent)
|
||||
return wheelEvent->pos();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DEPRECATIONHELPER_H
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "InlineAutomation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DetuningHelper : public InlineAutomation
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -39,9 +42,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DetuningHelper()
|
||||
{
|
||||
}
|
||||
~DetuningHelper() override = default;
|
||||
|
||||
float defaultValue() const override
|
||||
{
|
||||
@@ -61,4 +62,6 @@ public:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,22 +24,25 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DRUMSYNTH_H__
|
||||
#define _DRUMSYNTH_H__
|
||||
#ifndef DRUMSYNTH_H
|
||||
#define DRUMSYNTH_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class QString;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DrumSynth {
|
||||
public:
|
||||
DrumSynth() {};
|
||||
DrumSynth() = default;
|
||||
int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs);
|
||||
|
||||
private:
|
||||
float LoudestEnv(void);
|
||||
int LongestEnv(void);
|
||||
float LoudestEnv();
|
||||
int LongestEnv();
|
||||
void UpdateEnv(int e, long t);
|
||||
void GetEnv(int env, const char *sec, const char *key, QString ini);
|
||||
|
||||
@@ -51,4 +54,7 @@ class DrumSynth {
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // DRUMSYNTH_H
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
namespace DspEffectLibrary
|
||||
namespace lmms::DspEffectLibrary
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
@@ -329,7 +329,7 @@ namespace DspEffectLibrary
|
||||
|
||||
} ;
|
||||
|
||||
} ;
|
||||
} // namespace lmms::DspEffectLibrary
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
#include "EffectControls.h"
|
||||
#include "EffectControlDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class Knob;
|
||||
|
||||
|
||||
@@ -44,6 +50,7 @@ public:
|
||||
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
class DummyEffectControls : public EffectControls
|
||||
{
|
||||
@@ -53,9 +60,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DummyEffectControls()
|
||||
{
|
||||
}
|
||||
~DummyEffectControls() override = default;
|
||||
|
||||
int controlCount() override
|
||||
{
|
||||
@@ -75,9 +80,9 @@ public:
|
||||
return "DummyControls";
|
||||
}
|
||||
|
||||
EffectControlDialog * createView() override
|
||||
gui::EffectControlDialog * createView() override
|
||||
{
|
||||
return new DummyEffectControlDialog( this );
|
||||
return new gui::DummyEffectControlDialog( this );
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -95,9 +100,7 @@ public:
|
||||
setName();
|
||||
}
|
||||
|
||||
virtual ~DummyEffect()
|
||||
{
|
||||
}
|
||||
~DummyEffect() override = default;
|
||||
|
||||
EffectControls * controls() override
|
||||
{
|
||||
@@ -144,4 +147,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "AudioEngine.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class DummyInstrument : public Instrument
|
||||
{
|
||||
public:
|
||||
@@ -43,9 +47,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DummyInstrument()
|
||||
{
|
||||
}
|
||||
~DummyInstrument() override = default;
|
||||
|
||||
void playNote( NotePlayHandle *, sampleFrame * buffer ) override
|
||||
{
|
||||
@@ -66,11 +68,13 @@ public:
|
||||
return "dummyinstrument";
|
||||
}
|
||||
|
||||
PluginView * instantiateView( QWidget * _parent ) override
|
||||
gui::PluginView * instantiateView( QWidget * _parent ) override
|
||||
{
|
||||
return new InstrumentViewFixedSize( this, _parent );
|
||||
return new gui::InstrumentViewFixedSize( this, _parent );
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "PluginView.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class DummyPlugin : public Plugin
|
||||
{
|
||||
public:
|
||||
@@ -38,9 +41,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~DummyPlugin()
|
||||
{
|
||||
}
|
||||
~DummyPlugin() override = default;
|
||||
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
@@ -57,12 +58,14 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
PluginView * instantiateView( QWidget * _parent ) override
|
||||
gui::PluginView * instantiateView( QWidget * _parent ) override
|
||||
{
|
||||
return new PluginView( this, _parent );
|
||||
return new gui::PluginView( this, _parent );
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namesplace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,14 +28,17 @@
|
||||
#include <QMainWindow>
|
||||
#include <QToolBar>
|
||||
|
||||
class QAction;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
static const int Quantizations[] = {
|
||||
1, 2, 4, 8, 16, 32, 64,
|
||||
3, 6, 12, 24, 48, 96, 192
|
||||
};
|
||||
|
||||
|
||||
class QAction;
|
||||
|
||||
class DropToolBar;
|
||||
|
||||
/// \brief Superclass for editors with a toolbar.
|
||||
@@ -78,7 +81,7 @@ protected:
|
||||
/// \param record If set true, the editor's toolbar will contain record
|
||||
/// buttons in addition to the play and stop buttons.
|
||||
Editor(bool record = false, bool record_step = false);
|
||||
virtual ~Editor();
|
||||
~Editor() override = default;
|
||||
|
||||
|
||||
DropToolBar* m_toolBar;
|
||||
@@ -108,4 +111,6 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,9 +33,19 @@
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EffectChain;
|
||||
class EffectControls;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT Effect : public Plugin
|
||||
{
|
||||
@@ -45,7 +55,7 @@ public:
|
||||
Effect( const Plugin::Descriptor * _desc,
|
||||
Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~Effect();
|
||||
~Effect() override;
|
||||
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
@@ -170,7 +180,7 @@ protected:
|
||||
*/
|
||||
void checkGate( double _out_sum );
|
||||
|
||||
PluginView * instantiateView( QWidget * ) override;
|
||||
gui::PluginView* instantiateView( QWidget * ) override;
|
||||
|
||||
// some effects might not be capable of higher sample-rates so they can
|
||||
// sample it down before processing and back after processing
|
||||
@@ -221,7 +231,7 @@ private:
|
||||
SRC_STATE * m_srcState[2];
|
||||
|
||||
|
||||
friend class EffectView;
|
||||
friend class gui::EffectView;
|
||||
friend class EffectChain;
|
||||
|
||||
} ;
|
||||
@@ -231,4 +241,6 @@ typedef Effect::Descriptor::SubPluginFeatures::Key EffectKey;
|
||||
typedef Effect::Descriptor::SubPluginFeatures::KeyList EffectKeyList;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,15 +30,25 @@
|
||||
#include "SerializingObject.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class Effect;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectRackView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT EffectChain : public Model, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectChain( Model * _parent );
|
||||
virtual ~EffectChain();
|
||||
~EffectChain() override;
|
||||
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
@@ -65,7 +75,7 @@ private:
|
||||
BoolModel m_enabledModel;
|
||||
|
||||
|
||||
friend class EffectRackView;
|
||||
friend class gui::EffectRackView;
|
||||
|
||||
|
||||
signals:
|
||||
@@ -73,5 +83,7 @@ signals:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,15 +30,21 @@
|
||||
|
||||
#include "ModelView.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EffectControls;
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectControlDialog( EffectControls * _controls );
|
||||
virtual ~EffectControlDialog();
|
||||
~EffectControlDialog() override = default;
|
||||
|
||||
virtual bool isResizable() const {return false;}
|
||||
|
||||
@@ -54,4 +60,8 @@ protected:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,16 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "Effect.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectControlDialog;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
class EffectControls : public JournallingObject, public Model
|
||||
{
|
||||
@@ -43,12 +51,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~EffectControls()
|
||||
{
|
||||
}
|
||||
~EffectControls() override = default;
|
||||
|
||||
virtual int controlCount() = 0;
|
||||
virtual EffectControlDialog * createView() = 0;
|
||||
virtual gui::EffectControlDialog * createView() = 0;
|
||||
|
||||
|
||||
void setViewVisible( bool _visible )
|
||||
@@ -73,4 +79,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class EffectView;
|
||||
class GroupBox;
|
||||
|
||||
@@ -44,15 +47,15 @@ class EffectRackView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectRackView( EffectChain* model, QWidget* parent = nullptr );
|
||||
virtual ~EffectRackView();
|
||||
~EffectRackView() override;
|
||||
|
||||
static constexpr int DEFAULT_WIDTH = 245;
|
||||
|
||||
public slots:
|
||||
void clearViews();
|
||||
void moveUp( EffectView* view );
|
||||
void moveDown( EffectView* view );
|
||||
void deletePlugin( EffectView* view );
|
||||
void moveUp( lmms::gui::EffectView* view );
|
||||
void moveDown( lmms::gui::EffectView* view );
|
||||
void deletePlugin( lmms::gui::EffectView* view );
|
||||
|
||||
|
||||
private slots:
|
||||
@@ -83,4 +86,6 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,13 +34,16 @@
|
||||
|
||||
namespace Ui { class EffectSelectDialog; }
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class EffectSelectDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectSelectDialog( QWidget * _parent );
|
||||
virtual ~EffectSelectDialog();
|
||||
~EffectSelectDialog() override;
|
||||
|
||||
Effect * instantiateSelectedPlugin( EffectChain * _parent );
|
||||
|
||||
@@ -65,5 +68,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,9 @@ class QLabel;
|
||||
class QPushButton;
|
||||
class QMdiSubWindow;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class EffectControlDialog;
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
@@ -46,7 +49,7 @@ class EffectView : public PluginView
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectView( Effect * _model, QWidget * _parent );
|
||||
virtual ~EffectView();
|
||||
~EffectView() override;
|
||||
|
||||
inline Effect * effect()
|
||||
{
|
||||
@@ -68,9 +71,9 @@ public slots:
|
||||
|
||||
|
||||
signals:
|
||||
void moveUp( EffectView * _plugin );
|
||||
void moveDown( EffectView * _plugin );
|
||||
void deletePlugin( EffectView * _plugin );
|
||||
void moveUp( lmms::gui::EffectView * _plugin );
|
||||
void moveDown( lmms::gui::EffectView * _plugin );
|
||||
void deletePlugin( lmms::gui::EffectView * _plugin );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -90,4 +93,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class AudioEngine;
|
||||
class Mixer;
|
||||
class PatternStore;
|
||||
@@ -41,20 +44,13 @@ class ProjectJournal;
|
||||
class Song;
|
||||
class Ladspa2LMMS;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class GuiApplication;
|
||||
}
|
||||
|
||||
// Note: This class is called 'LmmsCore' instead of 'Engine' because of naming
|
||||
// conflicts caused by ZynAddSubFX. See https://github.com/LMMS/lmms/issues/2269
|
||||
// and https://github.com/LMMS/lmms/pull/2118 for more details.
|
||||
//
|
||||
// The workaround was to rename Lmms' Engine so that it has a different symbol
|
||||
// name in the object files, but typedef it back to 'Engine' and keep it inside
|
||||
// of Engine.h so that the rest of the codebase can be oblivious to this issue
|
||||
// (and it could be fixed without changing every single file).
|
||||
|
||||
class LmmsCore;
|
||||
typedef LmmsCore Engine;
|
||||
|
||||
class LMMS_EXPORT LmmsCore : public QObject
|
||||
class LMMS_EXPORT Engine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -110,11 +106,11 @@ public:
|
||||
|
||||
static void updateFramesPerTick();
|
||||
|
||||
static inline LmmsCore * inst()
|
||||
static inline Engine * inst()
|
||||
{
|
||||
if( s_instanceOfMe == nullptr )
|
||||
{
|
||||
s_instanceOfMe = new LmmsCore();
|
||||
s_instanceOfMe = new Engine();
|
||||
}
|
||||
return s_instanceOfMe;
|
||||
}
|
||||
@@ -130,9 +126,9 @@ private:
|
||||
// small helper function which sets the pointer to NULL before actually deleting
|
||||
// the object it refers to
|
||||
template<class T>
|
||||
static inline void deleteHelper( T * * ptr )
|
||||
static inline void deleteHelper(T** ptr)
|
||||
{
|
||||
T * tmp = *ptr;
|
||||
T* tmp = *ptr;
|
||||
*ptr = nullptr;
|
||||
delete tmp;
|
||||
}
|
||||
@@ -149,15 +145,17 @@ private:
|
||||
#ifdef LMMS_HAVE_LV2
|
||||
static class Lv2Manager* s_lv2Manager;
|
||||
#endif
|
||||
static Ladspa2LMMS * s_ladspaManager;
|
||||
static Ladspa2LMMS* s_ladspaManager;
|
||||
static void* s_dndPluginKey;
|
||||
|
||||
// even though most methods are static, an instance is needed for Qt slots/signals
|
||||
static LmmsCore * s_instanceOfMe;
|
||||
static Engine* s_instanceOfMe;
|
||||
|
||||
friend class GuiApplication;
|
||||
friend class gui::GuiApplication;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,6 +33,15 @@
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EnvelopeAndLfoView;
|
||||
|
||||
}
|
||||
|
||||
class LMMS_EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject
|
||||
{
|
||||
@@ -41,13 +50,9 @@ public:
|
||||
class LfoInstances
|
||||
{
|
||||
public:
|
||||
LfoInstances()
|
||||
{
|
||||
}
|
||||
LfoInstances() = default;
|
||||
|
||||
~LfoInstances()
|
||||
{
|
||||
}
|
||||
~LfoInstances() = default;
|
||||
|
||||
inline bool isEmpty() const
|
||||
{
|
||||
@@ -69,7 +74,7 @@ public:
|
||||
|
||||
EnvelopeAndLfoParameters( float _value_for_zero_amount,
|
||||
Model * _parent );
|
||||
virtual ~EnvelopeAndLfoParameters();
|
||||
~EnvelopeAndLfoParameters() override;
|
||||
|
||||
static inline float expKnobVal( float _val )
|
||||
{
|
||||
@@ -179,8 +184,10 @@ private:
|
||||
void updateLfoShapeData();
|
||||
|
||||
|
||||
friend class EnvelopeAndLfoView;
|
||||
friend class gui::EnvelopeAndLfoView;
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,8 +33,14 @@
|
||||
class QPaintEvent;
|
||||
class QPixmap;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class EnvelopeAndLfoParameters;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class automatableButtonGroup;
|
||||
class Knob;
|
||||
class LedCheckBox;
|
||||
@@ -48,7 +54,7 @@ class EnvelopeAndLfoView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
EnvelopeAndLfoView( QWidget * _parent );
|
||||
virtual ~EnvelopeAndLfoView();
|
||||
~EnvelopeAndLfoView() override;
|
||||
|
||||
|
||||
protected:
|
||||
@@ -94,4 +100,8 @@ private:
|
||||
float m_randomGraph;
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,11 +32,15 @@
|
||||
#include "Plugin.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT ExportFilter : public Plugin
|
||||
{
|
||||
public:
|
||||
ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, nullptr ) {}
|
||||
virtual ~ExportFilter() {}
|
||||
~ExportFilter() override = default;
|
||||
|
||||
|
||||
virtual bool tryExport(const TrackContainer::TrackList &tracks,
|
||||
@@ -63,4 +67,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
#include "ProjectRenderer.h"
|
||||
#include "RenderManager.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class ExportProjectDialog : public QDialog, public Ui::ExportProjectDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -41,12 +45,12 @@ public:
|
||||
ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
|
||||
|
||||
protected:
|
||||
void reject( void ) override;
|
||||
void reject() override;
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
|
||||
private slots:
|
||||
void startBtnClicked( void );
|
||||
void startBtnClicked();
|
||||
void updateTitleBar( int );
|
||||
void accept() override;
|
||||
void startExport();
|
||||
@@ -63,4 +67,8 @@ private:
|
||||
std::unique_ptr<RenderManager> m_renderManager;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include <QElapsedTimer>
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class FadeButton : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -40,7 +44,7 @@ public:
|
||||
const QColor & _hold_color,
|
||||
QWidget * _parent );
|
||||
|
||||
virtual ~FadeButton();
|
||||
~FadeButton() override = default;
|
||||
void setActiveColor( const QColor & activated_color );
|
||||
|
||||
|
||||
@@ -71,4 +75,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class TextFloat;
|
||||
|
||||
|
||||
@@ -69,7 +72,7 @@ public:
|
||||
|
||||
Fader( FloatModel * _model, const QString & _name, QWidget * _parent );
|
||||
Fader( FloatModel * _model, const QString & _name, QWidget * _parent, QPixmap * back, QPixmap * leds, QPixmap * knob );
|
||||
virtual ~Fader() = default;
|
||||
~Fader() override = default;
|
||||
|
||||
void init(FloatModel * model, QString const & name);
|
||||
|
||||
@@ -169,4 +172,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include <QSemaphore>
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
template<typename T>
|
||||
class FifoBuffer
|
||||
{
|
||||
@@ -88,4 +92,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <QCheckBox>
|
||||
#include <QDir>
|
||||
#include <QMutex>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
#include <QRecursiveMutex>
|
||||
#endif
|
||||
#include <QTreeWidget>
|
||||
|
||||
|
||||
@@ -37,13 +40,18 @@
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
class FileItem;
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
class FileBrowserTreeWidget;
|
||||
class PlayHandle;
|
||||
class TrackContainer;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class FileItem;
|
||||
class FileBrowserTreeWidget;
|
||||
|
||||
class FileBrowser : public SideBarWidget
|
||||
{
|
||||
@@ -63,10 +71,10 @@ public:
|
||||
const QString& userDir = "",
|
||||
const QString& factoryDir = "");
|
||||
|
||||
virtual ~FileBrowser() = default;
|
||||
~FileBrowser() override = default;
|
||||
|
||||
private slots:
|
||||
void reloadTree( void );
|
||||
void reloadTree();
|
||||
void expandItems( QTreeWidgetItem * item=nullptr, QList<QString> expandedDirs = QList<QString>() );
|
||||
// call with item=NULL to filter the entire tree
|
||||
bool filterItems( const QString & filter, QTreeWidgetItem * item=nullptr );
|
||||
@@ -102,7 +110,7 @@ class FileBrowserTreeWidget : public QTreeWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
FileBrowserTreeWidget( QWidget * parent );
|
||||
virtual ~FileBrowserTreeWidget() = default;
|
||||
~FileBrowserTreeWidget() override = default;
|
||||
|
||||
//! This method returns a QList with paths (QString's) of all directories
|
||||
//! that are expanded in the tree.
|
||||
@@ -135,18 +143,23 @@ private:
|
||||
|
||||
//! This should only be accessed or modified when m_pphMutex is held
|
||||
PlayHandle* m_previewPlayHandle;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
QRecursiveMutex m_pphMutex;
|
||||
#else
|
||||
QMutex m_pphMutex;
|
||||
#endif
|
||||
|
||||
QList<QAction*> getContextActions(FileItem* item, bool songEditor);
|
||||
|
||||
|
||||
private slots:
|
||||
void activateListItem( QTreeWidgetItem * item, int column );
|
||||
void openInNewInstrumentTrack( FileItem* item, bool songEditor );
|
||||
bool openInNewSampleTrack( FileItem* item );
|
||||
void sendToActiveInstrumentTrack( FileItem* item );
|
||||
void openInNewInstrumentTrack( lmms::gui::FileItem* item, bool songEditor );
|
||||
bool openInNewSampleTrack( lmms::gui::FileItem* item );
|
||||
void sendToActiveInstrumentTrack( lmms::gui::FileItem* item );
|
||||
void updateDirectory( QTreeWidgetItem * item );
|
||||
void openContainingFolder( FileItem* item );
|
||||
void openContainingFolder( lmms::gui::FileItem* item );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -159,7 +172,7 @@ public:
|
||||
Directory( const QString & filename, const QString & path,
|
||||
const QString & filter );
|
||||
|
||||
void update( void );
|
||||
void update();
|
||||
|
||||
inline QString fullName( QString path = QString() )
|
||||
{
|
||||
@@ -182,7 +195,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
void initPixmaps( void );
|
||||
void initPixmaps();
|
||||
|
||||
bool addItems( const QString & path );
|
||||
|
||||
@@ -243,28 +256,28 @@ public:
|
||||
return QFileInfo(m_path, text(0)).absoluteFilePath();
|
||||
}
|
||||
|
||||
inline FileTypes type( void ) const
|
||||
inline FileTypes type() const
|
||||
{
|
||||
return( m_type );
|
||||
}
|
||||
|
||||
inline FileHandling handling( void ) const
|
||||
inline FileHandling handling() const
|
||||
{
|
||||
return( m_handling );
|
||||
}
|
||||
|
||||
inline bool isTrack( void ) const
|
||||
inline bool isTrack() const
|
||||
{
|
||||
return m_handling == LoadAsPreset || m_handling == LoadByPlugin;
|
||||
}
|
||||
|
||||
QString extension( void );
|
||||
QString extension();
|
||||
static QString extension( const QString & file );
|
||||
|
||||
|
||||
private:
|
||||
void initPixmaps( void );
|
||||
void determineFileType( void );
|
||||
void initPixmaps();
|
||||
void determineFileType();
|
||||
|
||||
static QPixmap * s_projectFilePixmap;
|
||||
static QPixmap * s_presetFilePixmap;
|
||||
@@ -281,4 +294,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT FileDialog : public QFileDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -50,4 +54,7 @@ public:
|
||||
void clearSelection();
|
||||
};
|
||||
|
||||
#endif // FILEDIALOG_HPP
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // FILEDIALOG_H
|
||||
|
||||
@@ -35,8 +35,15 @@
|
||||
#include "ModelView.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class graphModel;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
|
||||
class LMMS_EXPORT Graph : public QWidget, public ModelView
|
||||
{
|
||||
@@ -60,7 +67,7 @@ public:
|
||||
int _width = 132,
|
||||
int _height = 104
|
||||
);
|
||||
virtual ~Graph() = default;
|
||||
~Graph() override = default;
|
||||
|
||||
void setForeground( const QPixmap & _pixmap );
|
||||
|
||||
@@ -116,6 +123,9 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
/**
|
||||
@brief 2 dimensional function plot
|
||||
|
||||
@@ -137,11 +147,11 @@ public:
|
||||
graphModel( float _min,
|
||||
float _max,
|
||||
int _size,
|
||||
:: Model * _parent,
|
||||
Model * _parent,
|
||||
bool _default_constructed = false,
|
||||
float _step = 0.0 );
|
||||
|
||||
virtual ~graphModel() = default;
|
||||
~graphModel() override = default;
|
||||
|
||||
// TODO: saveSettings, loadSettings?
|
||||
|
||||
@@ -187,7 +197,7 @@ public slots:
|
||||
void setWaveToSaw();
|
||||
void setWaveToSquare();
|
||||
void setWaveToNoise();
|
||||
QString setWaveToUser( );
|
||||
QString setWaveToUser();
|
||||
|
||||
void smooth();
|
||||
void smoothNonCyclic();
|
||||
@@ -211,8 +221,11 @@ private:
|
||||
float m_maxValue;
|
||||
float m_step;
|
||||
|
||||
friend class Graph;
|
||||
friend class gui::Graph;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,13 +34,15 @@
|
||||
|
||||
class QPixmap;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class GroupBox : public QWidget, public BoolModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GroupBox( const QString & _caption, QWidget * _parent = nullptr );
|
||||
virtual ~GroupBox();
|
||||
~GroupBox() override;
|
||||
|
||||
void modelChanged() override;
|
||||
|
||||
@@ -70,6 +72,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
|
||||
class QLabel;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class AutomationEditorWindow;
|
||||
class ControllerRackView;
|
||||
class MixerView;
|
||||
@@ -47,7 +50,7 @@ class LMMS_EXPORT GuiApplication : public QObject
|
||||
Q_OBJECT;
|
||||
public:
|
||||
explicit GuiApplication();
|
||||
~GuiApplication();
|
||||
~GuiApplication() override;
|
||||
|
||||
static GuiApplication* instance();
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
@@ -88,4 +91,6 @@ private:
|
||||
// Short-hand function
|
||||
LMMS_EXPORT GuiApplication* getGUI();
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif // GUIAPPLICATION_H
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "Plugin.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class TrackContainer;
|
||||
|
||||
@@ -39,7 +42,7 @@ class LMMS_EXPORT ImportFilter : public Plugin
|
||||
public:
|
||||
ImportFilter( const QString & _file_name,
|
||||
const Descriptor * _descriptor );
|
||||
virtual ~ImportFilter();
|
||||
~ImportFilter() override = default;
|
||||
|
||||
|
||||
// tries to import given file to given track-container by having all
|
||||
@@ -109,4 +112,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "AutomationClip.h"
|
||||
#include "shared_object.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InlineAutomation : public FloatModel, public sharedObject
|
||||
{
|
||||
@@ -40,7 +42,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~InlineAutomation()
|
||||
~InlineAutomation() override
|
||||
{
|
||||
if( m_autoClip )
|
||||
{
|
||||
@@ -95,4 +97,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "Plugin.h"
|
||||
#include "TimePos.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// forward-declarations
|
||||
class InstrumentTrack;
|
||||
@@ -58,7 +60,7 @@ public:
|
||||
Instrument(InstrumentTrack * _instrument_track,
|
||||
const Descriptor * _descriptor,
|
||||
const Descriptor::SubPluginFeatures::Key * key = nullptr);
|
||||
virtual ~Instrument() = default;
|
||||
~Instrument() override = default;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// functions that can/should be re-implemented:
|
||||
@@ -146,6 +148,10 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(Instrument::Flags)
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,22 +30,27 @@
|
||||
#include <QWidget>
|
||||
|
||||
class QLabel;
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class Knob;
|
||||
class TempoSyncKnob;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentFunctionArpeggio;
|
||||
class InstrumentFunctionNoteStacking;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class Knob;
|
||||
class TempoSyncKnob;
|
||||
|
||||
class InstrumentFunctionNoteStackingView : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentFunctionNoteStackingView( InstrumentFunctionNoteStacking* cc, QWidget* parent = nullptr );
|
||||
virtual ~InstrumentFunctionNoteStackingView();
|
||||
~InstrumentFunctionNoteStackingView() override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -68,7 +73,7 @@ class InstrumentFunctionArpeggioView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentFunctionArpeggioView( InstrumentFunctionArpeggio* arp, QWidget* parent = nullptr );
|
||||
virtual ~InstrumentFunctionArpeggioView();
|
||||
~InstrumentFunctionArpeggioView() override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -90,5 +95,8 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,10 +31,19 @@
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class InstrumentFunctionNoteStackingView;
|
||||
class InstrumentFunctionArpeggioView;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class InstrumentFunctionNoteStacking : public Model, public JournallingObject
|
||||
@@ -49,7 +58,7 @@ private:
|
||||
|
||||
public:
|
||||
InstrumentFunctionNoteStacking( Model * _parent );
|
||||
virtual ~InstrumentFunctionNoteStacking();
|
||||
~InstrumentFunctionNoteStacking() override = default;
|
||||
|
||||
void processNote( NotePlayHandle* n );
|
||||
|
||||
@@ -149,7 +158,7 @@ private:
|
||||
FloatModel m_chordRangeModel;
|
||||
|
||||
|
||||
friend class InstrumentFunctionNoteStackingView;
|
||||
friend class gui::InstrumentFunctionNoteStackingView;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -171,7 +180,7 @@ public:
|
||||
} ;
|
||||
|
||||
InstrumentFunctionArpeggio( Model * _parent );
|
||||
virtual ~InstrumentFunctionArpeggio();
|
||||
~InstrumentFunctionArpeggio() override = default;
|
||||
|
||||
void processNote( NotePlayHandle* n );
|
||||
|
||||
@@ -207,9 +216,11 @@ private:
|
||||
|
||||
|
||||
friend class InstrumentTrack;
|
||||
friend class InstrumentFunctionArpeggioView;
|
||||
friend class gui::InstrumentFunctionArpeggioView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,12 +30,19 @@
|
||||
|
||||
#include "ModelView.h"
|
||||
|
||||
class QToolButton;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class GroupBox;
|
||||
class LcdSpinBox;
|
||||
class QToolButton;
|
||||
class LedCheckBox;
|
||||
class InstrumentTrack;
|
||||
|
||||
|
||||
class InstrumentMidiIOView : public QWidget, public ModelView
|
||||
@@ -43,7 +50,7 @@ class InstrumentMidiIOView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentMidiIOView( QWidget* parent );
|
||||
virtual ~InstrumentMidiIOView();
|
||||
~InstrumentMidiIOView() override = default;
|
||||
|
||||
|
||||
private:
|
||||
@@ -65,4 +72,9 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,10 +29,16 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
class InstrumentTrack;
|
||||
class LedCheckBox;
|
||||
|
||||
|
||||
@@ -60,4 +66,9 @@ private:
|
||||
LedCheckBox *m_rangeImportCheckbox;
|
||||
};
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,14 +30,15 @@
|
||||
#include "NotePlayHandle.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle
|
||||
{
|
||||
public:
|
||||
InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack );
|
||||
|
||||
virtual ~InstrumentPlayHandle()
|
||||
{
|
||||
}
|
||||
~InstrumentPlayHandle() override = default;
|
||||
|
||||
|
||||
void play( sampleFrame * _working_buffer ) override
|
||||
@@ -81,4 +82,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,18 +27,26 @@
|
||||
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class InstrumentTrack;
|
||||
class EnvelopeAndLfoParameters;
|
||||
class NotePlayHandle;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class InstrumentSoundShapingView;
|
||||
}
|
||||
|
||||
|
||||
class InstrumentSoundShaping : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentSoundShaping( InstrumentTrack * _instrument_track );
|
||||
virtual ~InstrumentSoundShaping();
|
||||
~InstrumentSoundShaping() override = default;
|
||||
|
||||
void processAudioBuffer( sampleFrame * _ab, const fpp_t _frames,
|
||||
NotePlayHandle * _n );
|
||||
@@ -77,9 +85,11 @@ private:
|
||||
static const char *const targetNames[InstrumentSoundShaping::NumTargets][3];
|
||||
|
||||
|
||||
friend class InstrumentSoundShapingView;
|
||||
friend class gui::InstrumentSoundShapingView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
|
||||
class QLabel;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class EnvelopeAndLfoView;
|
||||
class ComboBox;
|
||||
class GroupBox;
|
||||
@@ -44,7 +47,7 @@ class InstrumentSoundShapingView : public QWidget, public ModelView
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentSoundShapingView( QWidget * _parent );
|
||||
virtual ~InstrumentSoundShapingView();
|
||||
~InstrumentSoundShapingView() override;
|
||||
|
||||
void setFunctionsHidden( bool hidden );
|
||||
|
||||
@@ -67,4 +70,7 @@ private:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,9 +39,23 @@
|
||||
#include "Track.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
class Instrument;
|
||||
class DataFile;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class InstrumentTrackView;
|
||||
class InstrumentTrackWindow;
|
||||
class InstrumentMiscView;
|
||||
class MidiCCRackView;
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor
|
||||
{
|
||||
@@ -50,7 +64,7 @@ class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor
|
||||
mapPropertyFromModel(int,getVolume,setVolume,m_volumeModel);
|
||||
public:
|
||||
InstrumentTrack( TrackContainer* tc );
|
||||
virtual ~InstrumentTrack();
|
||||
~InstrumentTrack() override;
|
||||
|
||||
// used by instrument
|
||||
void processAudioBuffer( sampleFrame * _buf, const fpp_t _frames,
|
||||
@@ -108,17 +122,17 @@ public:
|
||||
}
|
||||
|
||||
// play everything in given frame-range - creates note-play-handles
|
||||
virtual bool play( const TimePos & _start, const fpp_t _frames,
|
||||
bool play( const TimePos & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
|
||||
// create new view for me
|
||||
TrackView * createView( TrackContainerView* tcv ) override;
|
||||
gui::TrackView* createView( gui::TrackContainerView* tcv ) override;
|
||||
|
||||
// create new track-content-object = clip
|
||||
Clip* createClip(const TimePos & pos) override;
|
||||
|
||||
|
||||
// called by track
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent ) override;
|
||||
void loadTrackSpecificSettings( const QDomElement & _this ) override;
|
||||
|
||||
@@ -223,8 +237,8 @@ public:
|
||||
|
||||
signals:
|
||||
void instrumentChanged();
|
||||
void midiNoteOn( const Note& );
|
||||
void midiNoteOff( const Note& );
|
||||
void midiNoteOn( const lmms::Note& );
|
||||
void midiNoteOff( const lmms::Note& );
|
||||
void nameChanged();
|
||||
void newNote();
|
||||
void endNote();
|
||||
@@ -294,12 +308,16 @@ private:
|
||||
std::unique_ptr<BoolModel> m_midiCCEnable;
|
||||
std::unique_ptr<FloatModel> m_midiCCModel[MidiControllerCount];
|
||||
|
||||
friend class InstrumentTrackView;
|
||||
friend class InstrumentTrackWindow;
|
||||
friend class gui::InstrumentTrackView;
|
||||
friend class gui::InstrumentTrackWindow;
|
||||
friend class NotePlayHandle;
|
||||
friend class InstrumentMiscView;
|
||||
friend class MidiCCRackView;
|
||||
friend class gui::InstrumentMiscView;
|
||||
friend class gui::MidiCCRackView;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
|
||||
class InstrumentTrackWindow;
|
||||
class Knob;
|
||||
class MidiCCRackView;
|
||||
@@ -42,7 +46,7 @@ class InstrumentTrackView : public TrackView
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tc );
|
||||
virtual ~InstrumentTrackView();
|
||||
~InstrumentTrackView() override;
|
||||
|
||||
InstrumentTrackWindow * getInstrumentTrackWindow();
|
||||
|
||||
@@ -114,5 +118,7 @@ private:
|
||||
friend class InstrumentTrackWindow;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,17 @@
|
||||
#include "ModelView.h"
|
||||
#include "SerializingObject.h"
|
||||
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QWidget;
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
class InstrumentTrack;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class EffectRackView;
|
||||
class MixerLineLcdSpinBox;
|
||||
@@ -38,7 +49,6 @@ class InstrumentFunctionNoteStackingView;
|
||||
class InstrumentMidiIOView;
|
||||
class InstrumentMiscView;
|
||||
class InstrumentSoundShapingView;
|
||||
class InstrumentTrack;
|
||||
class InstrumentTrackShapingView;
|
||||
class InstrumentTrackView;
|
||||
class Knob;
|
||||
@@ -46,9 +56,6 @@ class LcdSpinBox;
|
||||
class LeftRightNav;
|
||||
class PianoView;
|
||||
class PluginView;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QWidget;
|
||||
class TabWidget;
|
||||
|
||||
|
||||
@@ -58,7 +65,7 @@ class InstrumentTrackWindow : public QWidget, public ModelView,
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstrumentTrackWindow( InstrumentTrackView * _tv );
|
||||
virtual ~InstrumentTrackWindow();
|
||||
~InstrumentTrackWindow() override;
|
||||
|
||||
// parent for all internal tab-widgets
|
||||
TabWidget * tabWidgetParent()
|
||||
@@ -157,5 +164,9 @@ private:
|
||||
friend class InstrumentTrackView;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace gui
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "Instrument.h"
|
||||
#include "PluginView.h"
|
||||
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
|
||||
class InstrumentTrackWindow;
|
||||
|
||||
|
||||
@@ -66,8 +70,10 @@ class LMMS_EXPORT InstrumentViewFixedSize : public InstrumentView
|
||||
|
||||
public:
|
||||
using InstrumentView::InstrumentView;
|
||||
~InstrumentViewFixedSize() override;
|
||||
~InstrumentViewFixedSize() override = default;
|
||||
} ;
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,9 +27,23 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
#ifdef LMMS_HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
std::wstring toWString(const std::string& s)
|
||||
{
|
||||
@@ -44,15 +58,9 @@ std::wstring toWString(const std::string& s)
|
||||
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s.length(), &ret[0], len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
#ifdef LMMS_HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
@@ -62,6 +70,7 @@ FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int fileToDescriptor(FILE* f, bool closeFile = true)
|
||||
{
|
||||
int fh;
|
||||
@@ -76,3 +85,6 @@ int fileToDescriptor(FILE* f, bool closeFile = true)
|
||||
if (closeFile) {fclose(f);}
|
||||
return fh;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user