Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.
Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .
Co-authored-by: allejok96 <allejok96@gmail.com>
This commit is contained in:
@@ -29,6 +29,10 @@
|
||||
#endif
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
#ifdef SYNC_WITH_SHM_FIFO
|
||||
RemotePluginBase::RemotePluginBase( shmFifo * _in, shmFifo * _out ) :
|
||||
m_in( _in ),
|
||||
@@ -186,3 +190,5 @@ RemotePluginBase::message RemotePluginBase::waitForMessage(
|
||||
|
||||
return message();
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -44,10 +44,12 @@
|
||||
# include <QSharedMemory>
|
||||
#endif
|
||||
|
||||
namespace detail {
|
||||
|
||||
namespace lmms::detail {
|
||||
|
||||
#if _POSIX_SHARED_MEMORY_OBJECTS > 0
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
template<typename F>
|
||||
@@ -198,4 +200,4 @@ SharedMemoryData::SharedMemoryData(SharedMemoryData&& other) noexcept :
|
||||
m_ptr{other.m_ptr}
|
||||
{ }
|
||||
|
||||
} // namespace detail
|
||||
} // namespace lmms::detail
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
|
||||
#include "BufferManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
typedef LocklessList<PlayHandle *>::Element LocklessListElement;
|
||||
|
||||
|
||||
@@ -1284,3 +1288,5 @@ void AudioEngine::fifoWriter::write( surroundSampleFrame * buffer )
|
||||
m_audioEngine->m_waitingForWrite = false;
|
||||
m_audioEngine->m_doChangesMutex.unlock();
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "AudioEngineProfiler.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioEngineProfiler::AudioEngineProfiler() :
|
||||
m_periodTimer(),
|
||||
@@ -61,3 +63,4 @@ void AudioEngineProfiler::setOutputFile( const QString& outputFile )
|
||||
m_outputFile.open( QFile::WriteOnly | QFile::Truncate );
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioEngineWorkerThread::JobQueue AudioEngineWorkerThread::globalJobQueue;
|
||||
QWaitCondition * AudioEngineWorkerThread::queueReadyWaitCond = nullptr;
|
||||
QList<AudioEngineWorkerThread *> AudioEngineWorkerThread::workerThreads;
|
||||
@@ -177,4 +180,4 @@ void AudioEngineWorkerThread::run()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "ProjectJournal.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
long AutomatableModel::s_periodCounter = 0;
|
||||
|
||||
|
||||
@@ -326,7 +329,7 @@ void AutomatableModel::setValue( const float value )
|
||||
|
||||
template<class T> T AutomatableModel::logToLinearScale( T value ) const
|
||||
{
|
||||
return castValue<T>( ::logToLinearScale( minValue<float>(), maxValue<float>(), static_cast<float>( value ) ) );
|
||||
return castValue<T>( lmms::logToLinearScale( minValue<float>(), maxValue<float>(), static_cast<float>( value ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -342,7 +345,7 @@ float AutomatableModel::inverseScaledValue( float value ) const
|
||||
{
|
||||
return m_scaleType == Linear
|
||||
? value
|
||||
: ::linearToLogScale( minValue<float>(), maxValue<float>(), value );
|
||||
: lmms::linearToLogScale( minValue<float>(), maxValue<float>(), value );
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +367,7 @@ void roundAt( T& value, const T& where, const T& step_size )
|
||||
template<class T>
|
||||
void AutomatableModel::roundAt( T& value, const T& where ) const
|
||||
{
|
||||
::roundAt(value, where, m_step);
|
||||
lmms::roundAt(value, where, m_step);
|
||||
}
|
||||
|
||||
|
||||
@@ -824,3 +827,6 @@ QString BoolModel::displayValue( const float val ) const
|
||||
{
|
||||
return QString::number( castValue<bool>( scaledValue( val ) ) );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -37,6 +37,9 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
int AutomationClip::s_quantization = 1;
|
||||
const float AutomationClip::DEFAULT_MIN_VALUE = 0;
|
||||
const float AutomationClip::DEFAULT_MAX_VALUE = 1;
|
||||
@@ -127,8 +130,8 @@ bool AutomationClip::addObject( AutomatableModel * _obj, bool _search_dup )
|
||||
|
||||
m_objects += _obj;
|
||||
|
||||
connect( _obj, SIGNAL( destroyed( jo_id_t ) ),
|
||||
this, SLOT( objectDestroyed( jo_id_t ) ),
|
||||
connect( _obj, SIGNAL( destroyed( lmms::jo_id_t ) ),
|
||||
this, SLOT( objectDestroyed( lmms::jo_id_t ) ),
|
||||
Qt::DirectConnection );
|
||||
|
||||
emit dataChanged();
|
||||
@@ -870,11 +873,11 @@ const QString AutomationClip::name() const
|
||||
|
||||
|
||||
|
||||
ClipView * AutomationClip::createView( TrackView * _tv )
|
||||
gui::ClipView * AutomationClip::createView( gui::TrackView * _tv )
|
||||
{
|
||||
QMutexLocker m(&m_clipMutex);
|
||||
|
||||
return new AutomationClipView( this, _tv );
|
||||
return new gui::AutomationClipView( this, _tv );
|
||||
}
|
||||
|
||||
|
||||
@@ -1183,3 +1186,5 @@ void AutomationClip::generateTangents(timeMap::iterator it, int numToGenerate)
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -27,6 +27,9 @@
|
||||
#include "AutomationClip.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// Dummy constructor for the QMap
|
||||
AutomationNode::AutomationNode() :
|
||||
m_clip(nullptr),
|
||||
@@ -107,3 +110,5 @@ void AutomationNode::resetOutValue()
|
||||
// the tangents
|
||||
setOutValue(m_inValue);
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -27,6 +27,9 @@
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
WaveMipMap BandLimitedWave::s_waveforms[4] = { };
|
||||
bool BandLimitedWave::s_wavesGenerated = false;
|
||||
QString BandLimitedWave::s_wavetableDir = "";
|
||||
@@ -270,3 +273,5 @@ moogfile.close();
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,17 +30,20 @@
|
||||
|
||||
#include "MemoryManager.h"
|
||||
|
||||
static fpp_t framesPerPeriod;
|
||||
|
||||
void BufferManager::init( fpp_t framesPerPeriod )
|
||||
namespace lmms
|
||||
{
|
||||
::framesPerPeriod = framesPerPeriod;
|
||||
|
||||
fpp_t BufferManager::s_framesPerPeriod;
|
||||
|
||||
void BufferManager::init( fpp_t fpp )
|
||||
{
|
||||
s_framesPerPeriod = fpp;
|
||||
}
|
||||
|
||||
|
||||
sampleFrame * BufferManager::acquire()
|
||||
{
|
||||
return MM_ALLOC<sampleFrame>( ::framesPerPeriod );
|
||||
return MM_ALLOC<sampleFrame>( s_framesPerPeriod );
|
||||
}
|
||||
|
||||
void BufferManager::clear( sampleFrame *ab, const f_cnt_t frames, const f_cnt_t offset )
|
||||
@@ -62,3 +65,4 @@ void BufferManager::release( sampleFrame * buf )
|
||||
MM_FREE( buf );
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/*! \brief Create a new Clip
|
||||
*
|
||||
* Creates a new clip for the given track.
|
||||
@@ -145,7 +148,7 @@ void Clip::copyStateTo( Clip *src, Clip *dst )
|
||||
dst->movePosition( pos );
|
||||
|
||||
AutomationClip::resolveAllIDs();
|
||||
GuiApplication::instance()->automationEditor()->m_editor->updateAfterClipChange();
|
||||
gui::getGUI()->automationEditor()->m_editor->updateAfterClipChange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,3 +200,4 @@ bool Clip::hasColor()
|
||||
return usesCustomClipColor() || getTrack()->useColor();
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -29,8 +29,9 @@
|
||||
#include "Clipboard.h"
|
||||
|
||||
|
||||
namespace Clipboard
|
||||
namespace lmms::Clipboard
|
||||
{
|
||||
|
||||
const QMimeData * getMimeData()
|
||||
{
|
||||
return QApplication::clipboard()->mimeData( QClipboard::Clipboard );
|
||||
@@ -90,4 +91,6 @@ namespace Clipboard
|
||||
{
|
||||
return( QString::fromUtf8( mimeData->data( mimeType( MimeType::StringPair ) ) ).section( ':', 1, -1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::Clipboard
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::move;
|
||||
|
||||
@@ -69,6 +72,6 @@ int ComboBoxModel::findText( const QString& txt ) const
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
|
||||
#include "lmmsversion.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
// Vector with all the upgrade methods
|
||||
const std::vector<ConfigManager::UpgradeMethod> ConfigManager::UPGRADE_METHODS = {
|
||||
@@ -514,10 +517,10 @@ void ConfigManager::loadConfigFile(const QString & configFile)
|
||||
#endif
|
||||
setBackgroundPicFile(value("paths", "backgroundtheme"));
|
||||
}
|
||||
else if(getGUI() != nullptr)
|
||||
else if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::warning(nullptr, MainWindow::tr("Configuration file"),
|
||||
MainWindow::tr("Error while parsing configuration file at line %1:%2: %3").
|
||||
QMessageBox::warning(nullptr, gui::MainWindow::tr("Configuration file"),
|
||||
gui::MainWindow::tr("Error while parsing configuration file at line %1:%2: %3").
|
||||
arg(errorLine).
|
||||
arg(errorCol).
|
||||
arg(errorString));
|
||||
@@ -634,6 +637,8 @@ void ConfigManager::saveConfigFile()
|
||||
QFile outfile(m_lmmsRcFile);
|
||||
if(!outfile.open(QIODevice::WriteOnly | QIODevice::Truncate))
|
||||
{
|
||||
using gui::MainWindow;
|
||||
|
||||
QString title, message;
|
||||
title = MainWindow::tr("Could not open file");
|
||||
message = MainWindow::tr("Could not open file %1 "
|
||||
@@ -643,7 +648,7 @@ void ConfigManager::saveConfigFile()
|
||||
"the directory containing the "
|
||||
"file and try again!"
|
||||
).arg(m_lmmsRcFile);
|
||||
if(getGUI() != nullptr)
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::critical(nullptr, title, message,
|
||||
QMessageBox::Ok,
|
||||
@@ -734,3 +739,6 @@ unsigned int ConfigManager::legacyConfigVersion()
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include "MidiController.h"
|
||||
#include "PeakController.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
long Controller::s_periods = 0;
|
||||
QVector<Controller *> Controller::s_controllers;
|
||||
@@ -194,7 +197,7 @@ Controller * Controller::create( ControllerTypes _ct, Model * _parent )
|
||||
break;
|
||||
|
||||
case Controller::LfoController:
|
||||
c = new ::LfoController( _parent );
|
||||
c = new class LfoController( _parent );
|
||||
break;
|
||||
|
||||
case Controller::PeakController:
|
||||
@@ -203,7 +206,7 @@ Controller * Controller::create( ControllerTypes _ct, Model * _parent )
|
||||
break;
|
||||
|
||||
case Controller::MidiController:
|
||||
c = new ::MidiController( _parent );
|
||||
c = new class MidiController( _parent );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -291,9 +294,9 @@ QString Controller::nodeName() const
|
||||
|
||||
|
||||
|
||||
ControllerDialog * Controller::createDialog( QWidget * _parent )
|
||||
gui::ControllerDialog * Controller::createDialog( QWidget * _parent )
|
||||
{
|
||||
ControllerDialog * d = new ControllerDialog( this, _parent );
|
||||
gui::ControllerDialog * d = new gui::ControllerDialog( this, _parent );
|
||||
|
||||
return d;
|
||||
}
|
||||
@@ -323,7 +326,7 @@ int Controller::connectionCount() const{
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#include "Song.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
ControllerConnectionVector ControllerConnection::s_connections;
|
||||
|
||||
@@ -233,4 +236,4 @@ void ControllerConnection::deleteConnection()
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
|
||||
#include "lmmsversion.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
static void findIds(const QDomElement& elem, QList<jo_id_t>& idList);
|
||||
|
||||
|
||||
@@ -139,11 +143,11 @@ DataFile::DataFile( const QString & _fileName ) :
|
||||
QFile inFile( _fileName );
|
||||
if( !inFile.open( QIODevice::ReadOnly ) )
|
||||
{
|
||||
if( getGUI() != nullptr )
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::critical( nullptr,
|
||||
SongEditor::tr( "Could not open file" ),
|
||||
SongEditor::tr( "Could not open file %1. You probably "
|
||||
gui::SongEditor::tr( "Could not open file" ),
|
||||
gui::SongEditor::tr( "Could not open file %1. You probably "
|
||||
"have no permissions to read this "
|
||||
"file.\n Please make sure to have at "
|
||||
"least read permissions to the file "
|
||||
@@ -295,7 +299,7 @@ bool DataFile::writeFile(const QString& filename, bool withResources)
|
||||
{
|
||||
// Small lambda function for displaying errors
|
||||
auto showError = [this](QString title, QString body){
|
||||
if (getGUI() != nullptr)
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox mb;
|
||||
mb.setWindowTitle(title);
|
||||
@@ -325,6 +329,8 @@ bool DataFile::writeFile(const QString& filename, bool withResources)
|
||||
const QString fullNameTemp = fullName + ".new";
|
||||
const QString fullNameBak = fullName + ".bak";
|
||||
|
||||
using gui::SongEditor;
|
||||
|
||||
// If we are saving with resources, setup the bundle folder first
|
||||
if (withResources)
|
||||
{
|
||||
@@ -1884,8 +1890,10 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile )
|
||||
}
|
||||
if( line >= 0 && col >= 0 )
|
||||
{
|
||||
using gui::SongEditor;
|
||||
|
||||
qWarning() << "at line" << line << "column" << errorMsg;
|
||||
if( getGUI() != nullptr )
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::critical( nullptr,
|
||||
SongEditor::tr( "Error in file" ),
|
||||
@@ -1918,18 +1926,20 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile )
|
||||
|
||||
if (root.hasAttribute("creatorversion"))
|
||||
{
|
||||
using gui::SongEditor;
|
||||
|
||||
// compareType defaults to All, so it doesn't have to be set here
|
||||
ProjectVersion createdWith = root.attribute("creatorversion");
|
||||
ProjectVersion openedWith = LMMS_VERSION;
|
||||
|
||||
if (createdWith.setCompareType(ProjectVersion::Minor)
|
||||
!= openedWith.setCompareType(ProjectVersion::Minor)
|
||||
&& getGUI() != nullptr && root.attribute("type") == "song"
|
||||
&& gui::getGUI() != nullptr && root.attribute("type") == "song"
|
||||
){
|
||||
auto projectType = _sourceFile.endsWith(".mpt") ?
|
||||
SongEditor::tr("template") : SongEditor::tr("project");
|
||||
|
||||
TextFloat::displayMessage(
|
||||
gui::TextFloat::displayMessage(
|
||||
SongEditor::tr("Version difference"),
|
||||
SongEditor::tr("This %1 was created with LMMS %2")
|
||||
.arg(projectType).arg(createdWith.getVersion()),
|
||||
@@ -1973,3 +1983,6 @@ unsigned int DataFile::legacyFileVersion()
|
||||
// Convert the iterator to an index, which is our file version (starting at 0)
|
||||
return std::distance( UPGRADE_VERSIONS.begin(), firstRequiredUpgrade );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -741,3 +744,5 @@ int DrumSynth::GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sa
|
||||
return Length;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -32,6 +32,9 @@
|
||||
|
||||
#include "ConfigManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Effect::Effect( const Plugin::Descriptor * _desc,
|
||||
Model * _parent,
|
||||
@@ -162,9 +165,9 @@ void Effect::checkGate( double _out_sum )
|
||||
|
||||
|
||||
|
||||
PluginView * Effect::instantiateView( QWidget * _parent )
|
||||
gui::PluginView * Effect::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new EffectView( this, _parent );
|
||||
return new gui::EffectView( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
@@ -215,3 +218,4 @@ void Effect::resample( int _i, const sampleFrame * _src_buf,
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#include "DummyEffect.h"
|
||||
#include "MixHelpers.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
EffectChain::EffectChain( Model * _parent ) :
|
||||
Model( _parent ),
|
||||
@@ -240,3 +243,6 @@ void EffectChain::clear()
|
||||
|
||||
m_enabledModel.setValue( false );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -37,24 +37,27 @@
|
||||
#include "BandLimitedWave.h"
|
||||
#include "Oscillator.h"
|
||||
|
||||
float LmmsCore::s_framesPerTick;
|
||||
AudioEngine* LmmsCore::s_audioEngine = nullptr;
|
||||
Mixer * LmmsCore::s_mixer = nullptr;
|
||||
PatternStore * LmmsCore::s_patternStore = nullptr;
|
||||
Song * LmmsCore::s_song = nullptr;
|
||||
ProjectJournal * LmmsCore::s_projectJournal = nullptr;
|
||||
#ifdef LMMS_HAVE_LV2
|
||||
Lv2Manager * LmmsCore::s_lv2Manager = nullptr;
|
||||
#endif
|
||||
Ladspa2LMMS * LmmsCore::s_ladspaManager = nullptr;
|
||||
void* LmmsCore::s_dndPluginKey = nullptr;
|
||||
|
||||
|
||||
|
||||
|
||||
void LmmsCore::init( bool renderOnly )
|
||||
namespace lmms
|
||||
{
|
||||
LmmsCore *engine = inst();
|
||||
|
||||
float Engine::s_framesPerTick;
|
||||
AudioEngine* Engine::s_audioEngine = nullptr;
|
||||
Mixer * Engine::s_mixer = nullptr;
|
||||
PatternStore * Engine::s_patternStore = nullptr;
|
||||
Song * Engine::s_song = nullptr;
|
||||
ProjectJournal * Engine::s_projectJournal = nullptr;
|
||||
#ifdef LMMS_HAVE_LV2
|
||||
Lv2Manager * Engine::s_lv2Manager = nullptr;
|
||||
#endif
|
||||
Ladspa2LMMS * Engine::s_ladspaManager = nullptr;
|
||||
void* Engine::s_dndPluginKey = nullptr;
|
||||
|
||||
|
||||
|
||||
|
||||
void Engine::init( bool renderOnly )
|
||||
{
|
||||
Engine *engine = inst();
|
||||
|
||||
emit engine->initProgress(tr("Generating wavetables"));
|
||||
// generate (load from file) bandlimited wavetables
|
||||
@@ -89,7 +92,7 @@ void LmmsCore::init( bool renderOnly )
|
||||
|
||||
|
||||
|
||||
void LmmsCore::destroy()
|
||||
void Engine::destroy()
|
||||
{
|
||||
s_projectJournal->stopAllJournalling();
|
||||
s_audioEngine->stopProcessing();
|
||||
@@ -123,7 +126,7 @@ void LmmsCore::destroy()
|
||||
|
||||
|
||||
|
||||
bool LmmsCore::ignorePluginBlacklist()
|
||||
bool Engine::ignorePluginBlacklist()
|
||||
{
|
||||
const char* envVar = getenv("LMMS_IGNORE_BLACKLIST");
|
||||
return (envVar && *envVar);
|
||||
@@ -132,7 +135,7 @@ bool LmmsCore::ignorePluginBlacklist()
|
||||
|
||||
|
||||
|
||||
float LmmsCore::framesPerTick(sample_rate_t sampleRate)
|
||||
float Engine::framesPerTick(sample_rate_t sampleRate)
|
||||
{
|
||||
return sampleRate * 60.0f * 4 /
|
||||
DefaultTicksPerBar / s_song->getTempo();
|
||||
@@ -141,7 +144,7 @@ float LmmsCore::framesPerTick(sample_rate_t sampleRate)
|
||||
|
||||
|
||||
|
||||
void LmmsCore::updateFramesPerTick()
|
||||
void Engine::updateFramesPerTick()
|
||||
{
|
||||
s_framesPerTick = s_audioEngine->processingSampleRate() * 60.0f * 4 / DefaultTicksPerBar / s_song->getTempo();
|
||||
}
|
||||
@@ -149,7 +152,7 @@ void LmmsCore::updateFramesPerTick()
|
||||
|
||||
|
||||
|
||||
void LmmsCore::setDndPluginKey(void *newKey)
|
||||
void Engine::setDndPluginKey(void *newKey)
|
||||
{
|
||||
Q_ASSERT(static_cast<Plugin::Descriptor::SubPluginFeatures::Key*>(newKey));
|
||||
s_dndPluginKey = newKey;
|
||||
@@ -158,7 +161,7 @@ void LmmsCore::setDndPluginKey(void *newKey)
|
||||
|
||||
|
||||
|
||||
void *LmmsCore::pickDndPluginKey()
|
||||
void *Engine::pickDndPluginKey()
|
||||
{
|
||||
return s_dndPluginKey;
|
||||
}
|
||||
@@ -166,4 +169,6 @@ void *LmmsCore::pickDndPluginKey()
|
||||
|
||||
|
||||
|
||||
LmmsCore * LmmsCore::s_instanceOfMe = nullptr;
|
||||
Engine * Engine::s_instanceOfMe = nullptr;
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "Oscillator.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// how long should be each envelope-segment maximal (e.g. attack)?
|
||||
extern const float SECS_PER_ENV_SEGMENT = 5.0f;
|
||||
// how long should be one LFO-oscillation maximal?
|
||||
@@ -540,4 +543,4 @@ void EnvelopeAndLfoParameters::updateSampleVars()
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "ProjectJournal.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
using std::unique_ptr;
|
||||
|
||||
ImportFilter::ImportFilter( const QString & _file_name,
|
||||
@@ -117,3 +120,4 @@ bool ImportFilter::openFile()
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -27,6 +27,9 @@
|
||||
#include "InlineAutomation.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
void InlineAutomation::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent )
|
||||
{
|
||||
@@ -58,3 +61,5 @@ void InlineAutomation::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "lmms_constants.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Instrument::Instrument(InstrumentTrack * _instrument_track,
|
||||
const Descriptor * _descriptor,
|
||||
const Descriptor::SubPluginFeatures::Key *key) :
|
||||
@@ -201,3 +205,6 @@ QString Instrument::fullDisplayName() const
|
||||
{
|
||||
return instrumentTrack()->displayName();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#include "InstrumentTrack.h"
|
||||
#include "PresetPreviewPlayHandle.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
InstrumentFunctionNoteStacking::ChordTable::Init InstrumentFunctionNoteStacking::ChordTable::s_initTable[] =
|
||||
{
|
||||
@@ -556,3 +559,6 @@ void InstrumentFunctionArpeggio::loadSettings( const QDomElement & _this )
|
||||
m_arpDirectionModel.loadSettings( _this, "arpdir" );
|
||||
m_arpModeModel.loadSettings( _this, "arpmode" );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -26,9 +26,16 @@
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
InstrumentPlayHandle::InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack ) :
|
||||
PlayHandle( TypeInstrumentPlayHandle ),
|
||||
m_instrument( instrument )
|
||||
{
|
||||
setAudioPort( instrumentTrack->audioPort() );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -34,6 +34,9 @@
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const float CUT_FREQ_MULTIPLIER = 6000.0f;
|
||||
const float RES_MULTIPLIER = 2.0f;
|
||||
@@ -377,4 +380,4 @@ void InstrumentSoundShaping::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "ProjectJournal.h"
|
||||
#include "Engine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
JournallingObject::JournallingObject() :
|
||||
@@ -140,3 +142,4 @@ void JournallingObject::changeID( jo_id_t _id )
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "Note.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Keymap::Keymap() :
|
||||
m_description(tr("empty")),
|
||||
m_firstKey(0),
|
||||
@@ -149,3 +153,6 @@ void Keymap::loadSettings(const QDomElement &element)
|
||||
node = node.nextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "Ladspa2LMMS.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Ladspa2LMMS::Ladspa2LMMS()
|
||||
{
|
||||
l_sortable_plugin_t plugins = getSortedPlugins();
|
||||
@@ -126,3 +130,6 @@ QString Ladspa2LMMS::getShortName( const ladspa_key_t & _key )
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "LadspaControl.h"
|
||||
#include "LadspaBase.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port,
|
||||
bool _link ) :
|
||||
@@ -379,5 +382,4 @@ void LadspaControl::setLink( bool _state )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
#include "PluginFactory.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
LadspaManager::LadspaManager()
|
||||
{
|
||||
@@ -715,3 +718,6 @@ bool LadspaManager::cleanup( const ladspa_key_t & _plugin,
|
||||
}
|
||||
return( false );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
LfoController::LfoController( Model * _parent ) :
|
||||
Controller( Controller::LfoController, _parent, tr( "LFO Controller" ) ),
|
||||
m_baseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ),
|
||||
@@ -220,12 +224,10 @@ QString LfoController::nodeName() const
|
||||
|
||||
|
||||
|
||||
ControllerDialog * LfoController::createDialog( QWidget * _parent )
|
||||
gui::ControllerDialog * LfoController::createDialog( QWidget * _parent )
|
||||
{
|
||||
return new LfoControllerDialog( this, _parent );
|
||||
return new gui::LfoControllerDialog( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -22,15 +22,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "LinkedModelGroups.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
|
||||
#include "LinkedModelGroups.h"
|
||||
|
||||
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/*
|
||||
LinkedModelGroup
|
||||
@@ -182,3 +185,5 @@ void LinkedModelGroups::loadSettings(const QDomElement& that)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
static const size_t SIZEOF_SET = sizeof( int ) * 8;
|
||||
|
||||
|
||||
@@ -162,3 +165,6 @@ invalid:
|
||||
}
|
||||
++m_available;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -26,6 +26,10 @@
|
||||
#include "lmms_basics.h"
|
||||
#include "MemoryHelper.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Allocate a number of bytes and return them.
|
||||
* @param byteNum is the number of bytes
|
||||
@@ -63,3 +67,5 @@ void MemoryHelper::alignedFree( void* _buffer )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include <QtGlobal>
|
||||
#include "rpmalloc.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
/// Global static object handling rpmalloc intializing and finalizing
|
||||
struct MemoryManagerGlobalGuard {
|
||||
MemoryManagerGlobalGuard() {
|
||||
@@ -75,3 +79,6 @@ void MemoryManager::free(void * ptr)
|
||||
Q_ASSERT_X(rpmalloc_is_thread_initialized(), "MemoryManager::free", "Thread not initialized");
|
||||
return rpfree(ptr);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
#include "AutomationClip.h"
|
||||
|
||||
|
||||
MeterModel::MeterModel( ::Model * _parent ) :
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
MeterModel::MeterModel( Model * _parent ) :
|
||||
Model( _parent ),
|
||||
m_numeratorModel( 4, 1, 32, this, tr( "Numerator" ) ),
|
||||
m_denominatorModel( 4, 1, 32, this, tr( "Denominator" ) )
|
||||
@@ -78,6 +81,4 @@ void MeterModel::loadSettings( const QDomElement & _this,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "MicroTimer.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
using namespace std;
|
||||
using namespace std::chrono;
|
||||
|
||||
@@ -25,3 +28,5 @@ int MicroTimer::elapsed() const
|
||||
auto now = steady_clock::now();
|
||||
return std::chrono::duration_cast<std::chrono::duration<int, std::micro>>(now - begin).count();
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "Scale.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Microtuner::Microtuner() :
|
||||
Model(nullptr, tr("Microtuner")),
|
||||
@@ -165,3 +168,6 @@ void Microtuner::loadSettings(const QDomElement &element)
|
||||
m_keymapModel.loadSettings(element, "keymap");
|
||||
m_keyRangeImportModel.loadSettings(element, "range_import");
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -38,7 +38,7 @@
|
||||
static bool s_NaNHandler;
|
||||
|
||||
|
||||
namespace MixHelpers
|
||||
namespace lmms::MixHelpers
|
||||
{
|
||||
|
||||
/*! \brief Function for applying MIXOP on all sample frames */
|
||||
@@ -328,5 +328,5 @@ void multiplyAndAddMultipliedJoined( sampleFrame* dst,
|
||||
run<>( dst, srcLeft, srcRight, frames, MultiplyAndAddMultipliedOp(coeffDst, coeffSrc) );
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace lmms::MixHelpers
|
||||
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
#include "SampleTrack.h"
|
||||
#include "TrackContainer.h" // For TrackContainer::TrackList typedef
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
MixerRoute::MixerRoute( MixerChannel * from, MixerChannel * to, float amount ) :
|
||||
m_from( from ),
|
||||
m_to( to ),
|
||||
@@ -827,3 +831,6 @@ void Mixer::validateChannelName( int index, int oldIndex )
|
||||
m_mixerChannels[index]->m_name = tr( "Channel %1" ).arg( index );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "Model.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
QString Model::fullDisplayName() const
|
||||
{
|
||||
@@ -46,5 +48,5 @@ QString Model::fullDisplayName() const
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#include "ComboBoxModel.h"
|
||||
#include "TempoSyncKnobModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
void ModelVisitor::visit(BoolModel &m) { up(m); }
|
||||
void ModelVisitor::visit(IntModel &m) { up(m); }
|
||||
void ModelVisitor::visit(FloatModel &m) { up(m); }
|
||||
@@ -42,3 +46,6 @@ void ConstModelVisitor::visit(const TempoSyncKnobModel &m) { up<FloatModel>(m);
|
||||
|
||||
ModelVisitor::~ModelVisitor() {}
|
||||
ConstModelVisitor::~ConstModelVisitor() {}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "Note.h"
|
||||
#include "DetuningHelper.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Note::Note( const TimePos & length, const TimePos & pos,
|
||||
int key, volume_t volume, panning_t panning,
|
||||
@@ -232,3 +235,6 @@ bool Note::withinRange(int tickStart, int tickEnd) const
|
||||
return pos().getTicks() >= tickStart && pos().getTicks() <= tickEnd
|
||||
&& length().getTicks() != 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "Instrument.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) :
|
||||
m_value( detuning ? detuning->automationClip()->valueAt( 0 ) : 0 )
|
||||
{
|
||||
@@ -663,3 +666,6 @@ void NotePlayHandleManager::free()
|
||||
{
|
||||
MM_FREE(s_available);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -38,6 +38,9 @@
|
||||
#include "fft_helpers.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
void Oscillator::waveTableInit()
|
||||
{
|
||||
@@ -814,4 +817,4 @@ inline sample_t Oscillator::getSample<Oscillator::UserDefinedWave>(
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace PathUtil
|
||||
namespace lmms::PathUtil
|
||||
{
|
||||
Base relativeBases[] = { Base::ProjectDir, Base::FactorySample, Base::UserSample, Base::UserVST, Base::Preset,
|
||||
Base::UserLADSPA, Base::DefaultLADSPA, Base::UserSoundfont, Base::DefaultSoundfont, Base::UserGIG, Base::DefaultGIG,
|
||||
@@ -187,4 +187,5 @@ namespace PathUtil
|
||||
}
|
||||
return basePrefix(shortestBase) + relativeOrAbsolute(absolutePath, shortestBase);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lmms::PathUtil
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#include "PatternStore.h"
|
||||
#include "PatternTrack.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
PatternClip::PatternClip(Track* track) :
|
||||
Clip(track)
|
||||
@@ -109,7 +112,10 @@ int PatternClip::patternIndex()
|
||||
|
||||
|
||||
|
||||
ClipView* PatternClip::createView(TrackView* tv)
|
||||
gui::ClipView* PatternClip::createView(gui::TrackView* tv)
|
||||
{
|
||||
return new PatternClipView(this, tv);
|
||||
return new gui::PatternClipView(this, tv);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "PatternTrack.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
PatternStore::PatternStore() :
|
||||
@@ -257,3 +259,5 @@ AutomatedValueMap PatternStore::automatedValuesAt(TimePos time, int clipNum) con
|
||||
return TrackContainer::automatedValuesAt(time + (TimePos::ticksPerBar() * clipNum), clipNum);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -34,6 +34,10 @@
|
||||
#include "EffectChain.h"
|
||||
#include "plugins/PeakControllerEffect/PeakControllerEffect.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
PeakControllerEffectVector PeakController::s_effects;
|
||||
int PeakController::m_getCount;
|
||||
int PeakController::m_loadCount;
|
||||
@@ -247,11 +251,10 @@ QString PeakController::nodeName() const
|
||||
|
||||
|
||||
|
||||
ControllerDialog * PeakController::createDialog( QWidget * _parent )
|
||||
gui::ControllerDialog * PeakController::createDialog( QWidget * _parent )
|
||||
{
|
||||
return new PeakControllerDialog( this, _parent );
|
||||
return new gui::PeakControllerDialog( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
# include <sys/times.h>
|
||||
#endif
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
PerfTime::PerfTime()
|
||||
: m_real(-1)
|
||||
{
|
||||
@@ -129,3 +134,6 @@ void PerfLogTimer::end()
|
||||
// Invalidate so destructor won't call print another log entry
|
||||
begin_time = PerfTime();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -41,6 +41,10 @@
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
/*! The black / white order of keys as they appear on the keyboard.
|
||||
*/
|
||||
static const Piano::KeyTypes KEY_ORDER[] =
|
||||
@@ -137,3 +141,5 @@ bool Piano::isWhiteKey( int key )
|
||||
return !isBlackKey( key );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <QThread>
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
PlayHandle::PlayHandle(const Type type, f_cnt_t offset) :
|
||||
m_type(type),
|
||||
m_offset(offset),
|
||||
@@ -71,3 +74,5 @@ sampleFrame* PlayHandle::buffer()
|
||||
{
|
||||
return m_bufferReleased ? nullptr : reinterpret_cast<sampleFrame*>(m_playHandleBuffer);
|
||||
};
|
||||
|
||||
} // namespace lmms
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "DummyPlugin.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "Song.h"
|
||||
#include "PluginFactory.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
static PixmapLoader dummyLoader;
|
||||
@@ -183,7 +187,6 @@ AutomatableModel * Plugin::childModel( const QString & )
|
||||
|
||||
|
||||
|
||||
#include "PluginFactory.h"
|
||||
Plugin * Plugin::instantiateWithKey(const QString& pluginName, Model * parent,
|
||||
const Descriptor::SubPluginFeatures::Key *key,
|
||||
bool keyFromDnd)
|
||||
@@ -218,7 +221,7 @@ Plugin * Plugin::instantiate(const QString& pluginName, Model * parent,
|
||||
Plugin* inst;
|
||||
if( pi.isNull() )
|
||||
{
|
||||
if( getGUI() != nullptr )
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::information( nullptr,
|
||||
tr( "Plugin not found" ),
|
||||
@@ -240,7 +243,7 @@ Plugin * Plugin::instantiate(const QString& pluginName, Model * parent,
|
||||
}
|
||||
else
|
||||
{
|
||||
if( getGUI() != nullptr )
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::information( nullptr,
|
||||
tr( "Error while loading plugin" ),
|
||||
@@ -265,9 +268,9 @@ void Plugin::collectErrorForUI( QString errMsg )
|
||||
|
||||
|
||||
|
||||
PluginView * Plugin::createView( QWidget * parent )
|
||||
gui::PluginView * Plugin::createView( QWidget * parent )
|
||||
{
|
||||
PluginView * pv = instantiateView( parent );
|
||||
gui::PluginView * pv = instantiateView( parent );
|
||||
if( pv != nullptr )
|
||||
{
|
||||
pv->setModel( this );
|
||||
@@ -312,3 +315,4 @@ QDomElement Plugin::Descriptor::SubPluginFeatures::Key::saveXML(
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -34,17 +34,22 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "Plugin.h"
|
||||
|
||||
// QT qHash specialization, needs to be in global namespace
|
||||
qint64 qHash(const QFileInfo& fi)
|
||||
{
|
||||
return qHash(fi.absoluteFilePath());
|
||||
}
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
QStringList nameFilters("*.dll");
|
||||
#else
|
||||
QStringList nameFilters("lib*.so");
|
||||
#endif
|
||||
|
||||
qint64 qHash(const QFileInfo& fi)
|
||||
{
|
||||
return qHash(fi.absoluteFilePath());
|
||||
}
|
||||
|
||||
std::unique_ptr<PluginFactory> PluginFactory::s_instance;
|
||||
|
||||
PluginFactory::PluginFactory()
|
||||
@@ -251,3 +256,6 @@ const QString PluginFactory::PluginInfo::name() const
|
||||
{
|
||||
return descriptor ? descriptor->name : QString();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include "PluginIssue.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const char *PluginIssue::msgFor(const PluginIssueType &it)
|
||||
{
|
||||
switch (it)
|
||||
@@ -91,8 +95,6 @@ bool PluginIssue::operator<(const PluginIssue &other) const
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QDebug operator<<(QDebug stream, const PluginIssue &iss)
|
||||
{
|
||||
stream << PluginIssue::msgFor(iss.m_issueType);
|
||||
@@ -103,4 +105,7 @@ QDebug operator<<(QDebug stream, const PluginIssue &iss)
|
||||
return stream;
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// invisible track-container which is needed as parent for preview-channels
|
||||
class PreviewTrackContainer : public TrackContainer
|
||||
{
|
||||
@@ -274,4 +277,4 @@ bool PresetPreviewPlayHandle::isPreviewing()
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "JournallingObject.h"
|
||||
#include "Song.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
//! Avoid clashes between loaded IDs (have the bit cleared)
|
||||
//! and newly created IDs (have the bit set)
|
||||
static const int EO_ID_MSB = 1 << 23;
|
||||
@@ -206,3 +209,4 @@ void ProjectJournal::stopAllJournalling()
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
#include "AudioFileMP3.h"
|
||||
#include "AudioFileFlac.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
const ProjectRenderer::FileEncodeDevice ProjectRenderer::fileEncodeDevices[] =
|
||||
{
|
||||
|
||||
@@ -246,3 +251,4 @@ void ProjectRenderer::updateConsoleProgress()
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "ProjectVersion.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
ProjectVersion::ProjectVersion(QString version, CompareType c) :
|
||||
@@ -135,3 +137,6 @@ int ProjectVersion::compare(ProjectVersion v1, ProjectVersion v2)
|
||||
{
|
||||
return compare(v1, v2, std::min(v1.getCompareType(), v2.getCompareType()));
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -71,6 +71,9 @@ HANDLE getRemotePluginJob()
|
||||
|
||||
#endif // LMMS_BUILD_WIN32
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
// simple helper thread monitoring our RemotePlugin - if process terminates
|
||||
// unexpectedly invalidate plugin so LMMS doesn't lock up
|
||||
ProcessWatcher::ProcessWatcher( RemotePlugin * _p ) :
|
||||
@@ -571,3 +574,6 @@ bool RemotePlugin::processMessage( const message & _m )
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
RenderManager::RenderManager(
|
||||
const AudioEngine::qualitySettings & qualitySettings,
|
||||
const OutputSettings & outputSettings,
|
||||
@@ -200,3 +204,6 @@ void RenderManager::updateConsoleProgress()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "Engine.h"
|
||||
#include "MixHelpers.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
RingBuffer::RingBuffer( f_cnt_t size ) :
|
||||
m_fpp( Engine::audioEngine()->framesPerPeriod() ),
|
||||
@@ -314,3 +317,4 @@ void RingBuffer::updateSamplerate()
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
|
||||
#include "FileDialog.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
SampleBuffer::SampleBuffer() :
|
||||
m_userAntiAliasWaveTable(nullptr),
|
||||
@@ -367,7 +369,7 @@ void SampleBuffer::update(bool keepSettings)
|
||||
QString message = tr("Audio files are limited to %1 MB "
|
||||
"in size and %2 minutes of playing time"
|
||||
).arg(fileSizeMax).arg(sampleLengthMax);
|
||||
if (getGUI() != nullptr)
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::information(nullptr,
|
||||
title, message, QMessageBox::Ok);
|
||||
@@ -1121,7 +1123,7 @@ void SampleBuffer::visualize(
|
||||
|
||||
QString SampleBuffer::openAudioFile() const
|
||||
{
|
||||
FileDialog ofd(nullptr, tr("Open audio file"));
|
||||
gui::FileDialog ofd(nullptr, tr("Open audio file"));
|
||||
|
||||
QString dir;
|
||||
if (!m_audioFile.isEmpty())
|
||||
@@ -1144,7 +1146,7 @@ QString SampleBuffer::openAudioFile() const
|
||||
}
|
||||
// change dir to position of previously opened file
|
||||
ofd.setDirectory(dir);
|
||||
ofd.setFileMode(FileDialog::ExistingFiles);
|
||||
ofd.setFileMode(gui::FileDialog::ExistingFiles);
|
||||
|
||||
// set filters
|
||||
QStringList types;
|
||||
@@ -1587,3 +1589,5 @@ SampleBuffer::handleState::~handleState()
|
||||
{
|
||||
src_delete(m_resamplingData);
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
#include "SampleTrack.h"
|
||||
#include "TimeLineWidget.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
SampleClip::SampleClip( Track * _track ) :
|
||||
Clip( _track ),
|
||||
m_sampleBuffer( new SampleBuffer ),
|
||||
@@ -42,13 +47,13 @@ SampleClip::SampleClip( Track * _track ) :
|
||||
|
||||
// we need to receive bpm-change-events, because then we have to
|
||||
// change length of this Clip
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ),
|
||||
this, SLOT( updateLength() ), Qt::DirectConnection );
|
||||
connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int,int ) ),
|
||||
this, SLOT( updateLength() ) );
|
||||
|
||||
//care about positionmarker
|
||||
TimeLineWidget * timeLine = Engine::getSong()->getPlayPos( Engine::getSong()->Mode_PlaySong ).m_timeLine;
|
||||
gui::TimeLineWidget* timeLine = Engine::getSong()->getPlayPos( Engine::getSong()->Mode_PlaySong ).m_timeLine;
|
||||
if( timeLine )
|
||||
{
|
||||
connect( timeLine, SIGNAL( positionMarkerMoved() ), this, SLOT( playbackPositionChanged() ) );
|
||||
@@ -316,7 +321,10 @@ void SampleClip::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
ClipView * SampleClip::createView( TrackView * _tv )
|
||||
gui::ClipView * SampleClip::createView( gui::TrackView * _tv )
|
||||
{
|
||||
return new SampleClipView( this, _tv );
|
||||
return new gui::SampleClipView( this, _tv );
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "SampleClip.h"
|
||||
#include "SampleTrack.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
SamplePlayHandle::SamplePlayHandle( SampleBuffer* sampleBuffer , bool ownAudioPort ) :
|
||||
@@ -148,5 +150,4 @@ f_cnt_t SamplePlayHandle::totalFrames() const
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
SampleRecordHandle::SampleRecordHandle( SampleClip* clip ) :
|
||||
PlayHandle( TypeSamplePlayHandle ),
|
||||
m_framesRecorded( 0 ),
|
||||
@@ -148,4 +152,4 @@ void SampleRecordHandle::writeBuffer( const sampleFrame * _ab, const f_cnt_t _fr
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <cmath>
|
||||
#include <QDomElement>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Interval::Interval(float cents) :
|
||||
m_numerator(0),
|
||||
@@ -121,3 +124,6 @@ void Scale::loadSettings(const QDomElement &element)
|
||||
node = node.nextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
#include "SerializingObject.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
SerializingObject::SerializingObject() :
|
||||
m_hook( nullptr )
|
||||
@@ -110,4 +111,4 @@ void SerializingObject::loadSettings( const QDomElement& element )
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
#include "PeakController.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
tick_t TimePos::s_ticksPerBar = DefaultTicksPerBar;
|
||||
|
||||
|
||||
@@ -184,7 +187,7 @@ void Song::setTimeSignature()
|
||||
|
||||
void Song::savePos()
|
||||
{
|
||||
TimeLineWidget * tl = m_playPos[m_playMode].m_timeLine;
|
||||
gui::TimeLineWidget* tl = m_playPos[m_playMode].m_timeLine;
|
||||
|
||||
if( tl != nullptr )
|
||||
{
|
||||
@@ -636,6 +639,8 @@ void Song::stop()
|
||||
return;
|
||||
}
|
||||
|
||||
using gui::TimeLineWidget;
|
||||
|
||||
// To avoid race conditions with the processing threads
|
||||
Engine::audioEngine()->requestChangeInModel();
|
||||
|
||||
@@ -851,6 +856,8 @@ AutomatedValueMap Song::automatedValuesAt(TimePos time, int clipNum) const
|
||||
|
||||
void Song::clearProject()
|
||||
{
|
||||
using gui::getGUI;
|
||||
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
if( m_playing )
|
||||
@@ -1008,6 +1015,8 @@ void Song::createNewProjectFromTemplate( const QString & templ )
|
||||
// load given song
|
||||
void Song::loadProject( const QString & fileName )
|
||||
{
|
||||
using gui::getGUI;
|
||||
|
||||
QDomNode node;
|
||||
|
||||
m_loadingProject = true;
|
||||
@@ -1225,6 +1234,8 @@ void Song::loadProject( const QString & fileName )
|
||||
// only save current song as filename and do nothing else
|
||||
bool Song::saveProjectFile(const QString & filename, bool withResources)
|
||||
{
|
||||
using gui::getGUI;
|
||||
|
||||
DataFile dataFile( DataFile::SongProject );
|
||||
m_savingProject = true;
|
||||
|
||||
@@ -1551,3 +1562,6 @@ void Song::setKeymap(unsigned int index, std::shared_ptr<Keymap> newMap)
|
||||
emit keymapListChanged(index);
|
||||
Engine::audioEngine()->doneChangeInModel();
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,12 +27,16 @@
|
||||
#include "PianoRoll.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
using std::min;
|
||||
using std::max;
|
||||
|
||||
const int REMOVE_RELEASED_NOTE_TIME_THRESHOLD_MS = 70;
|
||||
|
||||
StepRecorder::StepRecorder(PianoRoll& pianoRoll, StepRecorderWidget& stepRecorderWidget):
|
||||
StepRecorder::StepRecorder(gui::PianoRoll& pianoRoll, gui::StepRecorderWidget& stepRecorderWidget):
|
||||
m_pianoRoll(pianoRoll),
|
||||
m_stepRecorderWidget(stepRecorderWidget),
|
||||
m_midiClip(nullptr)
|
||||
@@ -367,3 +371,5 @@ StepRecorder::StepNote* StepRecorder::findCurStepNote(const int key)
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -31,6 +31,10 @@
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min,
|
||||
const float _max, const float _step,
|
||||
const float _scale, Model * _parent,
|
||||
@@ -41,8 +45,8 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min,
|
||||
m_scale( _scale ),
|
||||
m_custom( _parent )
|
||||
{
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
this, SLOT( calculateTempoSyncTime( bpm_t ) ),
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ),
|
||||
this, SLOT( calculateTempoSyncTime( lmms::bpm_t ) ),
|
||||
Qt::DirectConnection );
|
||||
}
|
||||
|
||||
@@ -181,8 +185,4 @@ void TempoSyncKnobModel::updateCustom()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
|
||||
#include "MeterModel.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
TimeSig::TimeSig( int num, int denom ) :
|
||||
m_num(num),
|
||||
m_denom(denom)
|
||||
@@ -216,3 +219,6 @@ double TimePos::ticksToMilliseconds(double ticks, bpm_t beatsPerMinute)
|
||||
// 60 * 1000 / 48 = 1250
|
||||
return ( ticks * 1250 ) / beatsPerMinute;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -26,6 +26,10 @@
|
||||
#include "ToolPlugin.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
ToolPlugin::ToolPlugin( const Descriptor * _descriptor, Model * _parent ) :
|
||||
Plugin( _descriptor, _parent )
|
||||
{
|
||||
@@ -56,3 +60,5 @@ ToolPlugin * ToolPlugin::instantiate( const QString & _plugin_name, Model * _par
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -43,6 +43,9 @@
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
/*! \brief Create a new (empty) track object
|
||||
*
|
||||
* The track object is the whole track, linking its contents, its
|
||||
@@ -106,14 +109,14 @@ Track * Track::create( TrackTypes tt, TrackContainer * tc )
|
||||
|
||||
switch( tt )
|
||||
{
|
||||
case InstrumentTrack: t = new ::InstrumentTrack( tc ); break;
|
||||
case PatternTrack: t = new ::PatternTrack( tc ); break;
|
||||
case SampleTrack: t = new ::SampleTrack( tc ); break;
|
||||
case InstrumentTrack: t = new class InstrumentTrack( tc ); break;
|
||||
case PatternTrack: t = new class PatternTrack( tc ); break;
|
||||
case SampleTrack: t = new class SampleTrack( tc ); break;
|
||||
// case EVENT_TRACK:
|
||||
// case VIDEO_TRACK:
|
||||
case AutomationTrack: t = new ::AutomationTrack( tc ); break;
|
||||
case AutomationTrack: t = new class AutomationTrack( tc ); break;
|
||||
case HiddenAutomationTrack:
|
||||
t = new ::AutomationTrack( tc, true ); break;
|
||||
t = new class AutomationTrack( tc, true ); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@@ -656,3 +659,4 @@ BoolModel *Track::getMutedModel()
|
||||
return &m_mutedModel;
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -41,6 +41,10 @@
|
||||
#include "MainWindow.h"
|
||||
#include "TextFloat.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
TrackContainer::TrackContainer() :
|
||||
Model( nullptr ),
|
||||
JournallingObject(),
|
||||
@@ -87,14 +91,14 @@ void TrackContainer::loadSettings( const QDomElement & _this )
|
||||
|
||||
static QProgressDialog * pd = nullptr;
|
||||
bool was_null = ( pd == nullptr );
|
||||
if( !journalRestore && getGUI() != nullptr )
|
||||
if (!journalRestore && gui::getGUI() != nullptr)
|
||||
{
|
||||
if( pd == nullptr )
|
||||
{
|
||||
pd = new QProgressDialog( tr( "Loading project..." ),
|
||||
tr( "Cancel" ), 0,
|
||||
Engine::getSong()->getLoadingTrackCount(),
|
||||
getGUI()->mainWindow() );
|
||||
gui::getGUI()->mainWindow());
|
||||
pd->setWindowModality( Qt::ApplicationModal );
|
||||
pd->setWindowTitle( tr( "Please wait..." ) );
|
||||
pd->show();
|
||||
@@ -111,9 +115,9 @@ void TrackContainer::loadSettings( const QDomElement & _this )
|
||||
QEventLoop::AllEvents, 100 );
|
||||
if( pd->wasCanceled() )
|
||||
{
|
||||
if ( getGUI() != nullptr )
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
TextFloat::displayMessage( tr( "Loading cancelled" ),
|
||||
gui::TextFloat::displayMessage( tr( "Loading cancelled" ),
|
||||
tr( "Project loading was cancelled." ),
|
||||
embed::getIconPixmap( "project_file", 24, 24 ),
|
||||
2000 );
|
||||
@@ -330,3 +334,5 @@ AutomatedValueMap TrackContainer::automatedValuesFromTracks(const TrackList &tra
|
||||
return valueMap;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
#include "interpolation.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
ValueBuffer::ValueBuffer()
|
||||
{}
|
||||
|
||||
@@ -41,3 +45,6 @@ void ValueBuffer::interpolate(float start, float end_)
|
||||
return linearInterpolate( start, end_, i++ / length());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "RemotePlugin.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
VstSyncController::VstSyncController() :
|
||||
m_syncData( nullptr )
|
||||
{
|
||||
@@ -140,6 +144,4 @@ void VstSyncController::updateSampleRate()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "Engine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioAlsa::AudioAlsa( bool & _success_ful, AudioEngine* _audioEngine ) :
|
||||
AudioDevice( qBound<ch_cnt_t>(
|
||||
@@ -538,4 +540,6 @@ int AudioAlsa::setSWParams()
|
||||
return 0; // all ok
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioDevice::AudioDevice( const ch_cnt_t _channels, AudioEngine* _audioEngine ) :
|
||||
m_supportsCapture( false ),
|
||||
@@ -267,3 +268,4 @@ bool AudioDevice::hqAudio() const
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "ExportProjectDialog.h"
|
||||
#include "GuiApplication.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioFileDevice::AudioFileDevice( OutputSettings const & outputSettings,
|
||||
const ch_cnt_t _channels,
|
||||
@@ -38,6 +40,8 @@ AudioFileDevice::AudioFileDevice( OutputSettings const & outputSettings,
|
||||
m_outputFile( _file ),
|
||||
m_outputSettings(outputSettings)
|
||||
{
|
||||
using gui::ExportProjectDialog;
|
||||
|
||||
setSampleRate( outputSettings.getSampleRate() );
|
||||
|
||||
if( m_outputFile.open( QFile::WriteOnly | QFile::Truncate ) == false )
|
||||
@@ -52,7 +56,7 @@ AudioFileDevice::AudioFileDevice( OutputSettings const & outputSettings,
|
||||
"file and try again!"
|
||||
).arg( _file );
|
||||
|
||||
if( getGUI() != nullptr )
|
||||
if (gui::getGUI() != nullptr)
|
||||
{
|
||||
QMessageBox::critical( nullptr, title, message,
|
||||
QMessageBox::Ok,
|
||||
@@ -87,3 +91,4 @@ int AudioFileDevice::writeData( const void* data, int len )
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
#include "endian_handling.h"
|
||||
#include "AudioEngine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioFileFlac::AudioFileFlac(OutputSettings const& outputSettings, ch_cnt_t const channels, bool& successful, QString const& file, AudioEngine* audioEngine):
|
||||
AudioFileDevice(outputSettings,channels,file,audioEngine),
|
||||
m_sf(nullptr)
|
||||
@@ -124,3 +127,5 @@ void AudioFileFlac::finishEncoding()
|
||||
sf_close(m_sf);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioFileMP3::AudioFileMP3( OutputSettings const & outputSettings,
|
||||
const ch_cnt_t channels,
|
||||
@@ -130,4 +132,6 @@ void AudioFileMP3::tearDownEncoder()
|
||||
lame_close(m_lame);
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "AudioEngine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioFileOgg::AudioFileOgg( OutputSettings const & outputSettings,
|
||||
const ch_cnt_t channels,
|
||||
@@ -268,6 +270,8 @@ void AudioFileOgg::finishEncoding()
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "AudioEngine.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioFileWave::AudioFileWave( OutputSettings const & outputSettings,
|
||||
const ch_cnt_t channels, bool & successful,
|
||||
@@ -136,3 +138,4 @@ void AudioFileWave::finishEncoding()
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "MidiJack.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioJack::AudioJack( bool & _success_ful, AudioEngine* _audioEngine ) :
|
||||
AudioDevice( qBound<int>(
|
||||
@@ -102,7 +104,7 @@ void AudioJack::restartAfterZombified()
|
||||
{
|
||||
m_active = false;
|
||||
startProcessing();
|
||||
QMessageBox::information( getGUI()->mainWindow(),
|
||||
QMessageBox::information(gui::getGUI()->mainWindow(),
|
||||
tr( "JACK client restarted" ),
|
||||
tr( "LMMS was kicked by JACK for some reason. "
|
||||
"Therefore the JACK backend of LMMS has been "
|
||||
@@ -111,7 +113,7 @@ void AudioJack::restartAfterZombified()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information( getGUI()->mainWindow(),
|
||||
QMessageBox::information(gui::getGUI()->mainWindow(),
|
||||
tr( "JACK server down" ),
|
||||
tr( "The JACK server seems to have been shutdown "
|
||||
"and starting a new instance failed. "
|
||||
@@ -464,13 +466,13 @@ AudioJack::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
cn_lbl->setFont( pointSize<7>( cn_lbl->font() ) );
|
||||
cn_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiojack",
|
||||
"channels" ).toInt() );
|
||||
|
||||
m_channels = new LcdSpinBox( 1, this );
|
||||
m_channels = new gui::LcdSpinBox( 1, this );
|
||||
m_channels->setModel( m );
|
||||
m_channels->setLabel( tr( "Channels" ) );
|
||||
m_channels->move( 180, 20 );
|
||||
@@ -498,6 +500,6 @@ void AudioJack::setupWidget::saveSettings()
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
|
||||
#include "ConfigManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
static const QString PATH_DEV_DSP =
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
@@ -325,13 +327,13 @@ AudioOss::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiooss",
|
||||
"channels" ).toInt() );
|
||||
|
||||
m_channels = new LcdSpinBox( 1, this );
|
||||
m_channels = new gui::LcdSpinBox( 1, this );
|
||||
m_channels->setModel( m );
|
||||
m_channels->setLabel( tr( "Channels" ) );
|
||||
m_channels->move( 180, 20 );
|
||||
@@ -358,5 +360,7 @@ void AudioOss::setupWidget::saveSettings()
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include "MixHelpers.h"
|
||||
#include "BufferManager.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioPort::AudioPort( const QString & _name, bool _has_effect_chain,
|
||||
FloatModel * volumeModel, FloatModel * panningModel,
|
||||
@@ -247,3 +249,5 @@ void AudioPort::removePlayHandle( PlayHandle * handle )
|
||||
}
|
||||
m_playHandleLock.unlock();
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
@@ -27,6 +27,10 @@
|
||||
#include "AudioPortAudio.h"
|
||||
|
||||
#ifndef LMMS_HAVE_PORTAUDIO
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
void AudioPortAudioSetupUtil::updateBackends()
|
||||
{
|
||||
}
|
||||
@@ -38,6 +42,9 @@ void AudioPortAudioSetupUtil::updateDevices()
|
||||
void AudioPortAudioSetupUtil::updateChannels()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HAVE_PORTAUDIO
|
||||
@@ -50,6 +57,9 @@ void AudioPortAudioSetupUtil::updateChannels()
|
||||
#include "ComboBox.h"
|
||||
#include "AudioEngine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
AudioPortAudio::AudioPortAudio( bool & _success_ful, AudioEngine * _audioEngine ) :
|
||||
AudioDevice( qBound<ch_cnt_t>(
|
||||
@@ -407,6 +417,8 @@ void AudioPortAudioSetupUtil::updateChannels()
|
||||
AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
AudioDeviceSetupWidget( AudioPortAudio::name(), _parent )
|
||||
{
|
||||
using gui::ComboBox;
|
||||
|
||||
m_backend = new ComboBox( this, "BACKEND" );
|
||||
m_backend->setGeometry( 64, 15, 260, ComboBox::DEFAULT_HEIGHT );
|
||||
|
||||
@@ -496,6 +508,8 @@ void AudioPortAudio::setupWidget::show()
|
||||
AudioDeviceSetupWidget::show();
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "gui_templates.h"
|
||||
#include "Engine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
static void stream_write_callback(pa_stream *s, size_t length, void *userdata)
|
||||
{
|
||||
@@ -317,13 +319,13 @@ AudioPulseAudio::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiopa",
|
||||
"channels" ).toInt() );
|
||||
|
||||
m_channels = new LcdSpinBox( 1, this );
|
||||
m_channels = new gui::LcdSpinBox( 1, this );
|
||||
m_channels->setModel( m );
|
||||
m_channels->setLabel( tr( "Channels" ) );
|
||||
m_channels->move( 180, 20 );
|
||||
@@ -349,6 +351,7 @@ void AudioPulseAudio::setupWidget::saveSettings()
|
||||
QString::number( m_channels->value<int>() ) );
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
AudioSampleRecorder::AudioSampleRecorder( const ch_cnt_t _channels,
|
||||
bool & _success_ful,
|
||||
@@ -111,4 +114,4 @@ void AudioSampleRecorder::writeBuffer( const surroundSampleFrame * _ab,
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) :
|
||||
AudioDevice( DEFAULT_CHANNELS, _audioEngine ),
|
||||
m_outBuf( new surroundSampleFrame[audioEngine()->framesPerPeriod()] )
|
||||
@@ -351,5 +354,7 @@ void AudioSdl::setupWidget::saveSettings()
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "ConfigManager.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioSndio::AudioSndio(bool & _success_ful, AudioEngine * _audioEngine) :
|
||||
AudioDevice( qBound<ch_cnt_t>(
|
||||
@@ -188,13 +190,13 @@ AudioSndio::setupWidget::setupWidget( QWidget * _parent ) :
|
||||
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
|
||||
dev_lbl->setGeometry( 10, 40, 160, 10 );
|
||||
|
||||
LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ );
|
||||
gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ );
|
||||
m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS );
|
||||
m->setStep( 2 );
|
||||
m->setValue( ConfigManager::inst()->value( "audiosndio",
|
||||
"channels" ).toInt() );
|
||||
|
||||
m_channels = new LcdSpinBox( 1, this );
|
||||
m_channels = new gui::LcdSpinBox( 1, this );
|
||||
m_channels->setModel( m );
|
||||
m_channels->setLabel( tr( "Channels" ) );
|
||||
m_channels->move( 180, 20 );
|
||||
@@ -217,4 +219,6 @@ void AudioSndio::setupWidget::saveSettings( void )
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif /* LMMS_HAVE_SNDIO */
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
#include "ComboBox.h"
|
||||
#include "AudioEngine.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
AudioSoundIo::AudioSoundIo( bool & outSuccessful, AudioEngine * _audioEngine ) :
|
||||
AudioDevice( qBound<ch_cnt_t>(
|
||||
DEFAULT_CHANNELS,
|
||||
@@ -519,4 +522,7 @@ void AudioSoundIo::setupWidget::saveSettings()
|
||||
ConfigManager::inst()->setValue( "audiosoundio", "out_device_raw", configDeviceRaw);
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QBuffer>
|
||||
#include <QDataStream>
|
||||
|
||||
namespace base64
|
||||
namespace lmms::base64
|
||||
{
|
||||
|
||||
|
||||
@@ -54,5 +54,4 @@ QVariant decode( const QString & _b64, QVariant::Type _force_type )
|
||||
}
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
} // namespace lmms::base64
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <cmath>
|
||||
#include "lmms_constants.h"
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
/* Returns biggest value from abs_spectrum[spec_size] array.
|
||||
*
|
||||
* return -1 on error, otherwise the maximum value
|
||||
@@ -212,3 +216,6 @@ int compressbands(const float *absspec_buffer, float *compressedband, int num_ol
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
#ifdef LMMS_HAVE_LV2
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
QString qStringFromPluginNode(const LilvPlugin* plug,
|
||||
LilvNode* (*getFunc)(const LilvPlugin*))
|
||||
{
|
||||
@@ -45,5 +48,7 @@ std::string stdStringFromPortName(const LilvPlugin* plug, const LilvPort* port)
|
||||
lilv_node_as_string(AutoLilvNode(lilv_port_get_name(plug, port)).get()));
|
||||
}
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
#endif // LMMS_HAVE_LV2
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "Lv2Proc.h"
|
||||
|
||||
|
||||
namespace lmms
|
||||
{
|
||||
|
||||
|
||||
Plugin::PluginTypes Lv2ControlBase::check(const LilvPlugin *plugin,
|
||||
@@ -213,6 +215,7 @@ void Lv2ControlBase::handleMidiInputEvent(const MidiEvent &event,
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms
|
||||
|
||||
|
||||
#endif // LMMS_HAVE_LV2
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user