While regular instruments were excluded from processing when muted
this did not happen for InstrumentPlayHandle-based instruments. Muting
for exampling tracks with VSTi's inside did not decrease CPU usage.
Checking whether related InstrumentTrack is muted before calling
Instrument::play() fixes this issue.
Closes#2857426.
QHttp is quite low-level while QNetworkAccessManager offers a well
designed API for accessing network resources. Therefore switched backend
of WebResourceProvider from QHttp to QNetworkAccessManager.
If DEBUG_REMOTE_PLUGIN was set, RemotePlugin::process() always returned
as RemotePlugin::isRunning() returned false. Fix this by always
returning true when debugging.
Instead of writing QVector<Plugin::Descriptor> everywhere, mit up
iterators etc. centrally define Plugin::DescriptorList and use it
everywhere.
Additionally made pointers to Plugin::Descriptor and
Plugin::Descriptor::SubPluginFeatures::Key const in various places
so we can use ConstIterator everywhere when iterating through
Plugin::DescriptorList.
We can safely make fillDescriptionWidget() and listSubPluginKeys()
const methods. Furthermore descriptor pointer to listSubPluginKeys()
can be const as well. Might allow more optimizations by the compiler.
All of the GUI code of EffectSelectDialog has been replaced by an
according UI file. Also merged EffectListWidget class into
EffectSelectDialog to further simplify logic.
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:
391 files changed, 25400 insertions(+), 25598 deletions(-)
Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.
Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
One can filter resource types now using the combobox. It's also possible
to pass a certain ResourceItem::Type to the QuickLoadDialog constructor
so the according type is preselected.
All UI files are now located in src/gui/Forms and have been renamed.
Old classes using some of the forms (AboutDialog, ExportProjectDialog)
have been adapted to instantiate Ui::* instead of inheriting from it.
Added an item(QModelIndex) method to RecentResourceListModel which
maps given QModelIndex to source model and returns the according
ResourceItem from the source model.
The new WelcomeScreen widget is intended to be shown after startup
by default. It allows the user to choose how to start the session,
i.e. shows a list of recently edited projects, a list of new stuff
at the Sharing Platform as well as some help related information and
links.
Pointers to individual ResourceDBs can be obtained from Engine now.
This allows for more specialized views and reduces complexity when
dealing with resources.
So far all subclasses implemented filtering on their own which doesn't
make much sense. Now one can set filter keywords and a filter type for
all ResourceModels. Subclasses simply have to call
ResourceModel::itemMatchesFilter( ResourceItem ) in order to determine
whether an item should be hidden or not. Additionally they have to
implement the updateFilters() method in order to update their internal
management data each time the filters change.
This is an initial integration of the new QuickLoadDialog into LMMS.
One can either open up the dialog via Ctrl+L or the "Edit" menu.
The dialog is for testing only and not useful at all yet.
This commit introduces initial version of the QuickLoadDialog.
It's a simple dialog with a filter line-edit as well as a ListView
showing all (filtered) ResourceItem's. Once integrated properly it'll
allow to quickly load a specific resource into current context, e.g. a
sample into AudioFileProcessor or a MIDI file into SongEditor.
The new ResourceListModel implements a ResourceModel to be used with
QListView & friends. It provides all items of the given ResourceDB as
a flat unsorted list. It'll be mainly used for the upcoming
QuickLoadDialog.
ResourceListModel features an internal lookup table, resulting in very
good performance when filtering (even with thousands of items).
Making setFilter(QString) a pure virtual public slot forces all derived
models to implement this slot. Furthermore it allows external GUI code
to connect e.g. QLineEdit::textChanged(QString) signal directly to the
setFilter(...) method.
Place functionality to where it belongs. ResourceItem::matchKeywords()
now returns whether a given list of strings matches with various
string properties of the item.
The new generic ItemRelation template class replaces ResourceTreeItem's,
resulting in cleaner and better organized code.
In the future other kind of items can be linked hierarchically using
the ItemRelation template.
All functionality which is not related to a ResourceTreeModel has been
moved into ResourceModel base class, allowing to share them in other
resource model implementations.
The hidden flag has been moved from ResourceTreeItem to ResourceItem
and has been made multi-model capable, i.e. a ResourceModel pointer is
being used for looking up the flag in a hash table.
When opening up the ControllerConnectionDialog by default auto detect
is enabled and all MIDI input devices are selected. Upon the first
event all devices but the one the event came from get unchecked. This
eases the process of assigning MIDI controls to software controls.
The MidiClient::writablePorts() method was not overloaded properly in
MidiWinMM implementation due to a typo. This should fix list of output
devices being empty on win32.
Suppressed a message box that would pop up in command
line interface causing a crash and made lmms act properly
when a rendering plugin fails. Need to figure out how to
terminate program in project_renderer line 222.
The mp3 decoder was using an uncomfortably large buffer,
laughably because of a negative overflow. Fixed this and
added a failsafe check to prevent buffer overflows.
Additionally changed printfs to qWarnings and fixed copyright
notice in audio_file_mp3.
Per request, make the Controller-rack vertically sizable. This is also
part of our effort to slowly deprecate old fixed-positioning code in
favor of layouts.
Casting to panning_t in calculation in panningToMidi() leads to
integer overflows and thus to miscalculations. This resulted for
example in wrong panning during note preview when editing panning
of a note in PianoRoll. Casting to int instead fixes the issue.
* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible
The new CPU framework replaces the old BasicOps framework. It is more
flexible and the build process isn't such a mess anymore (pre-compiled
assembler files etc.). It will hopefully see some improvements and
extensions soon.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
QString::toStdString() is not aware of locale specific characters (it
just converts to ASCII). Therefore added new macro QSTR_TO_STDSTR which
converts a QString to std::string with UTF8 characters.
Use this new macro in LMMS VST Support Layer and ZynAddSubFX plugin.
This fixes for example VST plugins not being loaded when the path to
the DLL contains non-ASCII (e.g. cyrillic) characters.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Removed myself from list of copyright holders as I didn't help out
with LAME support at all.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>