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.
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.
If a certain step was set for a model, the fitted value (i.e. value
divided by step, rounded and multiplied with step again) could become
smaller than minValue or greater than maxValue. Therefore explicitely
check those cases after performing the described calculation.
Closes#2840202.
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.
Per default child processes inherit all file descriptors of their
parent process. This applied for file descriptors pointing to sound
devices as well. Reopening sound devices while e.g. a ZynAddSubFX
process was running always failed due to this "feature".
By manually setting the FD_CLOEXEC flag for the sound device file
descriptors they do not get inherited by child processes anymore.
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).
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.
A port name is constructed from snd_seq_* structures at various places,
therefore separate it into a static helper function. This avoids
redundancy and eases maintainability.
Use poll() with a finite timeout so we can quit the thread properly
without manually writing stuff into the pipe.
Check for pending events at the beginning of the loop so we can't end up
in an endless loop.
Furthermore check return value of snd_seq_event_input() and get out of
loop if it indicates an error.
Use QString::isEmpty() rather than comparing against an empty string.
Furthermore use QStrin::toUtf8() instead of QString::toAscii() for
retrieving name of a MidiPort.
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.
The audio_jack driver currently treats the jack transport status as a
flag for whether or not to output audio. This is incorrect and
unintended usage of jack transport. The attached patch simply removes
all references to jack transport from the driver, so that LMMS will
always be able to produce audio.
Closes#2816029.