Commit Graph

1430 Commits

Author SHA1 Message Date
Andrew Kelley
45a2f81eaa Rough fix for freeze-up bug
Added startJobs() to the waitForJobs() loop, and don't give up in
masterMix() until status of master channel is Done.
2009-10-13 03:14:23 -07:00
Andrew Kelley
95eb60f05f Fixed the audio/visual screwups
With the help of Toby, effects in the channels work and the peak
displays correctly. However the freeze-up bug is still wreaking havoc.
2009-10-13 02:21:13 -07:00
Andrew Kelley
f6f4414c98 NOT WORKING! Fx Mixer uses job threads
The FxMixer now uses job threads to accomplish its mixing. It's
theoretically efficient, but there is a horrible thread bug
preventing the code from working. I've spent 5 hours debugging and
need some external help!
2009-10-12 01:09:35 -07:00
Tobias Doerffel
3fa96a576c Mixer: rewrote/reorganized job queueing for worker threads
In Mixer, the old C-macro based code has been replaced by an OOP-like
design. Management of job queue now happens via some static member
methods of MixerWorkerThread. All the moved code still needs to be
splitted into some new files but here's a first dirty version.

All objects that are intended to be processed by MixerWorkerThreads
have to inherit ThreadableJob (name of class is subject of change).

One can add jobs to the job queue even if the queue is already being
processed. This is merely important for multithreading with upcoming
FX sends support.
2009-10-11 01:43:16 +02:00
Andrew Kelley
abfdb6a74d Fixed bug - Instruments had wrong channel models
Instruments were initialized with hardcoded 0-10 for min/max
channel selector range. Fixed.
2009-10-01 17:42:14 -07:00
Andrew Kelley
1c9b24afb7 Fixed a mixer bug regarding deleting channels 2009-10-01 11:37:46 -07:00
Andrew Kelley
23e3301037 FxMixerView - Left and right to select channels 2009-10-01 03:45:04 -07:00
Andrew Kelley
333df687e6 Ability to save mixer sends to disk with the mmp
LMMS can load projects with the old mixer and new projects with
the new mixer. By "new mixer", I simply mean not hardcoded to 64
channels.
2009-10-01 02:45:32 -07:00
Andrew Kelley
dd28a654b5 Channel selector has a max range of num channels
When you add and remove channels, the range of the
L.E.D. channel selector is correct.
2009-09-30 17:04:28 -07:00
Andrew Kelley
33753495bd Ability to re-order mixer channels
In the Fx Mixer View, you can select a channel and press Alt+Left
and Alt+Right respectively to re-order Fx Channels. This should be
made more easily available in the GUI eventually.
2009-09-30 07:37:05 -07:00
Andrew Kelley
e09c12687a Ability to delete mixer channels in the FX Mixer
Users can now delete mixer channels from the FX mixer, and it
doesn't mess up the instrument send channels.
2009-09-30 07:36:40 -07:00
Paul Giblock
db6164ca91 Requested improvements to new FxMixerView$
* lock fx mixer height
 Done. channelArea->setFixedHeight and proper sizeConstraints
* width: pick a good min. size. keep max. size off.
 Done. Set to 6 fx-lines.
* effects chain should align to the right
 Done.
* get rid of padding in mixer
 Done. setSpacing and setMargin on chLayout
* scroll area so that vert scrollbar is  never seen.
 Done. setVerticalScrollBarPolicy and proper height calculation
* Get rid of scroll bar area border
 Done. FrameStyle.

The biggest change, however, was removing the multiple EffectRackViews
that were being used.  Now just a single EffectRackView exists and it is
shared by all models.
2009-09-30 03:12:25 -04:00
Andrew Kelley
d68d53b83a Scrollbar for the fx mixer channels
Still need to fix up the rest of the fx mixer
2009-09-29 20:54:30 -07:00
Andrew Kelley
504a03f2cf prevent infinite mixing loops
Prevent infinite mixing loops by disabling the send button for
a channel line when clicking it would cause an infinite loop.
2009-09-29 19:16:19 -07:00
Andrew Kelley
ce7891b7bd Fix mixer sends rendering in the backend
Fixed: Buffers was cleared too early resulting in some combinations
of sends not working.
2009-09-17 14:37:01 -07:00
Andrew Kelley
289f004c28 Pretty interface in default theme for fx sends
Created a user interface so you can add and remove FX sends as
well as tweak how much you are sending. The gui does not
yet prevent the user from creating endless render loops.
Additionally, there seems to be some issues to work out regarding
rendering with multiple sends.
2009-09-17 14:37:01 -07:00
Andrew Kelley
89d5be7855 Used FloatModels as the backend for mixer sends
Can add new channels in the mixer, and sends are implemented.
Instruments are hardcoded at 10. FL Import is hardcoded at 64.
2009-09-17 14:37:01 -07:00
Andrew Kelley
45c4b7b824 Mixer sends work in the backend
The backend code of mixer uses mixer sends to compute effects.
2009-09-17 14:37:01 -07:00
Tobias Doerffel
6940d19969 InstrumentPlayHandle: do not process if InstrumentTrack is muted
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.
2009-09-15 10:10:02 +02:00
Tobias Doerffel
bb4c93ce37 WebResourceProvider: moved from QHttp to QNetworkAccessManager
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.
2009-09-15 01:24:57 +02:00
Paul Giblock
669b4e7198 Fix bug 2819817: main window scrollbars
Fix problem with main-window scrollbars not adjusting when toggling
off-screen children.  Seems like Qt bug #260116.
2009-09-11 00:07:12 -04:00
Tobias Doerffel
b4526ec1b4 AudioFileFlac: allow compilation withoug FLAC support
Compilation of AudioFileFlac source files failed when there's been
no FLAC support on the system. Fix this by adding according #ifdef's.
2009-08-28 23:56:15 +02:00
Tobias Doerffel
ee63a13f2d RemotePlugin: do not skip audio processing when debugging
If DEBUG_REMOTE_PLUGIN was set, RemotePlugin::process() always returned
as RemotePlugin::isRunning() returned false. Fix this by always
returning true when debugging.
2009-08-28 23:54:18 +02:00
Tobias Doerffel
2287eca802 Plugin: typedef DescriptorList + more const improvements
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.
2009-08-26 01:46:27 +02:00
Tobias Doerffel
e8c3c21f7f Plugin::Descriptor: renamed sub_plugin_features to subPluginFeatures
Renamed field sub_plugin_features to subPluginFeatures in
Plugin::Descriptor struct.
2009-08-26 01:01:35 +02:00
Tobias Doerffel
cb85bfc906 EffectSelectDialog: rewritten using Designer
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.
2009-08-26 00:52:17 +02:00
Tobias Doerffel
d7365e4cf3 Fixed mistakes made by sed-mass-replaces
Some variables got renamed the way the shouldn't. Doesn't have any
functional impact but fix it for the sake of cosmetics.
2009-08-26 00:50:41 +02:00
Tobias Doerffel
166701f9f3 sed: s/( void )/(), s/FALSE/false/, s/TRUE/true
Replaced remaining occurences of old constants and superfluous "void"
on empty argument list of functions.
2009-08-24 23:25:26 +02:00
Tobias Doerffel
8c9a9dd14c File and class renames part 1
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.
2009-08-24 17:59:28 +02:00
Tobias Doerffel
b5d9fab944 AutomatableModel: do not return an out of range value in fittedValue()
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.
2009-08-23 23:38:34 +02:00
Tobias Doerffel
90e0cab629 QuickLoadDialog: implemented resource type filter
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.
2009-08-22 01:17:03 +02:00
Tobias Doerffel
1c56bf4e55 ResourceItem: added descriptiveTypeName() method
The new ResourceItem::descriptiveTypeName() allows to query a
descriptive name for a given ResourceItem type.
2009-08-22 01:16:04 +02:00
Tobias Doerffel
beed7a6ee6 Moved UI files from src/gui/dialogs to src/gui/Forms and renamed files
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.
2009-08-22 00:18:23 +02:00
Tobias Doerffel
fe99a7a35c WelcomeScreen: implemented project loading functionality
It's now possible to load projects by clicking them in one of the
two lists (recent projects, recent community resources).
2009-08-21 23:48:33 +02:00
Tobias Doerffel
97e52de521 RecentResourceListModel: added item(QModelIndex) method
Added an item(QModelIndex) method to RecentResourceListModel which
maps given QModelIndex to source model and returns the according
ResourceItem from the source model.
2009-08-21 23:45:25 +02:00
Tobias Doerffel
0404cc760f MainWindow: integrated new WelcomeScreen widget
Initial integration of (not yet fully functional) WelcomeScreen.
2009-08-21 19:14:03 +02:00
Tobias Doerffel
34a20ba610 Added new WelcomeScreen widget
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.
2009-08-21 19:11:40 +02:00
Tobias Doerffel
a5bf034575 RecentResourceListModel: new model providing resources sorted by date
RecentResourceListModel is a new proxy model which provides a list of
resources sorted by date (based on a ResourceListModel as source model).
2009-08-21 18:34:34 +02:00
Tobias Doerffel
0550132d1b Engine: provide individual ResourceDBs instead of one global provider
Pointers to individual ResourceDBs can be obtained from Engine now.
This allows for more specialized views and reduces complexity when
dealing with resources.
2009-08-21 18:17:32 +02:00
Tobias Doerffel
d3bb3ff13a ResourceModel: implement filter functionality
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.
2009-08-21 18:10:38 +02:00
Tobias Doerffel
36ec30f649 WebResourcesProvider: parse date from WebResources index
The last-mod property was not set for non-local ResourceItem's. Parse
it from WebResources index file and pass it to ResourceItem constructor.
2009-08-21 16:36:53 +02:00
Tobias Doerffel
7bea6d0e07 MainWindow: renamed class to match new style
Renamed mainWindow to MainWindow and engine::getMainWindow() to
engine::mainWindow(). Additionally reduced some header dependencies.
2009-08-21 12:09:39 +02:00
Tobias Doerffel
80f101cec6 AudioAlsa/AudioOss: set FD_CLOEXEC flag for file descriptors
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.
2009-08-18 15:27:43 +02:00
Tobias Doerffel
0a6c187b86 MainWindow: initial integration of new QuickLoadDialog
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.
2009-08-18 00:29:17 +02:00
Tobias Doerffel
562688e845 QuickLoadDialog: initial version
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.
2009-08-18 00:23:55 +02:00
Tobias Doerffel
cc987b2e6a ResourceListModel: new model providing resources in a flat list
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).
2009-08-18 00:15:14 +02:00
Tobias Doerffel
13df5c92cf ResourceTreeView: minor coding style improvements
Just some minor fixes to improve general coding style.
2009-08-17 23:05:45 +02:00
Tobias Doerffel
38155d95c4 ResourceTreeModel: moved keyword matching code into ResourceItem class
Place functionality to where it belongs. ResourceItem::matchKeywords()
now returns whether a given list of strings matches with various
string properties of the item.
2009-08-17 22:15:51 +02:00
Tobias Doerffel
0a9d3aba6f ResourceTreeModel: removed unused headers
There's no need to include various headers as according code moved
into ResourceModel class.
2009-08-17 21:11:13 +02:00
Tobias Doerffel
f873ad2693 ItemRelation: new template for making up relations between ResourceItems
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.
2009-08-17 20:44:36 +02:00