Commit Graph

1502 Commits

Author SHA1 Message Date
Tobias Doerffel
93681760d2 InstrumentTrackView: added one-window-mode + global piano focus
Added a one-window-mode which allows to have only one instrument track
window open at a time. The content of this window is replaced each time
you open a different track.

Furthermore added global reception and forwarding of key events to the
piano widget of the top-most instrument track window. This for example
enables the user to play test sounds while tweaking some effects in a
different subwindow.
2010-08-06 23:05:00 +02:00
Tobias Doerffel
68abd34908 AutomatableModelView/ContextMenu: option for unlinking all controls
Integrated patch by Rodrigo Rodrigues da Silva which adds an option
to all AutomatableModelView's context menu allowing to unlink all
linked controls.
2010-07-28 21:25:30 +02:00
Tobias Doerffel
9e42d4388e ClassicStyle: template-based derivation from native style
First attempts to get away from QPlastiqueStyle as the default style
and instead dynamically use an overloaded version of the native style.
Still needs lots of tuning, especially regarding colors.
2010-07-28 21:21:11 +02:00
Tobias Doerffel
db8de3450c TextFloat: fixed size calculation in simple mode
The height of TextFloat objects was not sufficient e.g. when used as
tooltips for knobs (while changing their values). Fixed improper
geometry calculation and static values in TextFloat::paintEvent().
2010-07-28 20:13:19 +02:00
Tobias Doerffel
206c30ff73 AudioJack: do not use QVector in processCallback()
Using QVector involves calls to malloc & friends which are not RT safe
and thus must not be used in AudioJack::processCallback(). Instead
allocate the required array upon initialization.
(cherry picked from commit ae7a4e4c2f13432d39b13c25b66231bdd6a1cc65)
2010-07-26 15:54:46 +02:00
Tobias Doerffel
31b099d74e AudioJack: more optional code for AudioPort support
There's been some more code that is only required if AUDIO_PORT_SUPPORT
is set. Added according #ifdefs and fixed a typo in AudioPort support
code.
(cherry picked from commit e98726ae992c77fb2dfdb6668319b5521ff8aaef)
2010-07-26 15:54:40 +02:00
Tobias Doerffel
b0822212b0 Merge branch 'remote-plugin-fixes'
* remote-plugin-fixes:
  RemotePlugin: sleep in waitForMessage() when actively waiting for data
  RemotePlugin: better code order in sendMessage() + cleanups
  RemotePlugin: coding style fixes + inline keyword reduces
  RemotePlugin: smaller buffers for number to string conversions
  RemotePlugin: added branch prediction hints
2010-07-26 15:52:14 +02:00
Tobias Doerffel
4ea8b9d9c2 Merge branch 'mingw64-compat-fixes'
* mingw64-compat-fixes:
  CMakeLists.txt: install libFLAC-8.dll for win32 build
  Improved support for MinGW cross compile builds
2010-07-26 15:04:00 +02:00
Tobias Doerffel
e07ed33827 3rdparty/libsamplerate: renamed config.h to src_config.h
We must not have any file called config.h in directories which are added
to global include directories. For example when building the CALF plugin
the file config.h from libsamplerate was used rather than CALF's local
one. Fixes missing LADSPA symbols in CALF library if no usable
libsamplerate was found in the system at configure time.

Also bumped version number in src_config.h.
2010-07-25 14:36:01 +02:00
Tobias Doerffel
5306f7b0ca TrackContentObject: keep position in paste()
When calling TrackContentObject::paste(), only the content should be
pasted, not the position. This fixes pasting for example note patterns
and is also a more generic solution for the bug fixed in commit
4ec5c6afe1.

Closes #3005649.
2010-07-25 01:26:43 +02:00
Tobias Doerffel
3b642271a8 When cloning BB track, indicate this fact in name of cloned BB track
Cloning a BB track can be rather confusing (e.g. two "Beat/Bassline 0").
Therefore prepend an indication to the name of the cloned BB track.
2010-07-25 01:13:39 +02:00
Tobias Doerffel
c16e04c0dd Fixed cloning of BB tracks
Not sure when it broke but cloning BB tracks erroneously cloned
positions of TCOs as well which made the source BB track have
two TCOs one upon the other while the destination BB did not have
any TCOs at all.

The fix is to save the position of the destination TCO before and
restore it manually after paste().
2010-07-25 01:13:32 +02:00
Tobias Doerffel
b30e91042b NotePlayHandle: fix broken note detuning feature
Commit 884b9ca671 completely broke the
note detuning feature as the detuning value was not incoorporated into
the frequency calculation anymore. Fix this by adding the detuning value
to the pitch variable.
2010-07-25 00:23:38 +02:00
Tobias Doerffel
87f1313e57 AboutDialog: show correct copyright years
It's been two years that the copyright years were not updated in the
AboutDialog. Fix this.
(cherry picked from commit 57540de703)
2010-07-24 22:54:35 +02:00
Andrew Kelley
f9015ac945 Save/Discard instead of Yes/No
Integrates Sami Boukortt's patch described below:

I have made a patch for the “Save changes?” dialog box to let the user choose
between “Save”, “Discard” and “Cancel” instead of “Yes”, “No” and “Cancel”.

I find this way more intuitive, since it enables Qt to reorganize the buttons
properly according to the platform and to give them an icon (at least on X11).

It also allows users to know what is going to happen without having to read
the question.
2010-05-24 17:53:12 -07:00
Tobias Doerffel
5f6c42f19c EnvelopeAndLfoParameters: moved global instances management into helper class
It's a bad style to manage global instances of an object in the object
itself. Therefore introduced a nested helper class which manages all
instances of EnvelopeAndLfoParameters globally. It is now responsible
for global reset/triggers of LFOs. In contrast to previous state, this
is now done thread-safe. Fixes crashes for example while importing
MIDI files.
2010-05-21 13:27:04 +02:00
Tobias Doerffel
fe7d5e3d5a Engine: introduced deleteHelper() function
The new deleteHelper() template function takes a pointer, saves it
to a temporary, sets the passed pointer to NULL and then deletes the
object it was referring to before. This way we can spot bugs caused by
undesired references to global objects at shutdown more easily.
2010-05-21 13:25:10 +02:00
Tobias Doerffel
afba8a7ad4 AutomationEditor: thread-safe handling of AutomationPattern pointer
It was not possible to call any of the functions of AutomationEditor
from threads other than the main GUI thread as the m_pattern pointer
was not protected by a mutex. It is however desired to be able to call
for example AutomationEditor::setCurrentPattern(...) from different
threads (mainly required when deleting AutomationPatterns in other
threads). Thus made this method and all accesses to the m_pattern
pointer thread-safe.
2010-05-21 13:19:15 +02:00
Tobias Doerffel
9c9bca7098 EffectControl: store visibility information of attached EffectView
For some effects it is helpful to know whether their attached EffectView
is visible or not. This mainly concerns effects that actually do not
touch the sound data but analyze it and display the results.
2010-05-17 23:17:16 +02:00
Tobias Doerffel
51103bb674 Improved support for MinGW cross compile builds
Cross compile support for Win32 and Win64 has been unified,
simplified and adapted to the new MinGW64-based build environment.
This finally allows to produce working Win64 binaries.
2010-04-06 11:47:50 +02:00
Tobias Doerffel
9fd3dacb67 Fixed spelling errors
Fixed some spelling errors found by Lintian while checking the Debian
package of LMMS. Thanks to Patrick Winnertz for pointing out this issue.
2010-01-25 23:24:42 +01:00
Tobias Doerffel
04699ba412 MainWindow: stop playing song when asking whether to save project
Users reported the last buffer played repeatedly while the dialog asking
whether to save project is shown. This behaviour even continued while
loading a project. An easy workaround for this is to stop playing song
(or whichever TrackContainer is active at the moment) in
MainWindow::mayChangeProject().

Closes bug #2904781.
2009-12-17 21:17:34 +01:00
Tobias Doerffel
fa9aeeb3b1 RemotePlugin: added branch prediction hints
Added some branch prediction hints, especially to ShmFifo locking
functions.
2009-12-14 10:19:14 +01:00
Tobias Doerffel
cef439b1ce AutomatableModel: made member variables private again
As of commit dd28a654b5 some member
variables were made protected without any actual requirement for it.
Revert the part of the commit.
2009-12-03 19:09:55 +01:00
Tobias Doerffel
d45de34c0d Revert "AutomatableModel: fix member variable initialization order"
This reverts commit a141fd477a.
2009-12-03 18:31:13 +01:00
Tobias Doerffel
a141fd477a AutomatableModel: fix member variable initialization order
Initialize member variables of AutomatableModel in order of their
declaration to fix compiler warning.
2009-12-03 01:10:12 +01:00
Andrew Kelley
48d7e7cf50 Bugfix: crash dealing with clearing the project
FxMixerView was being cleared before fxMixer which caused a crash.
Fixed.
2009-11-29 18:54:58 -07:00
Tobias Doerffel
0e82b0facc Merge branch 'master' into mixer-new-fifo-arch
Conflicts:
	include/Mixer.h
	src/core/Mixer.cpp
	src/core/audio/AudioPort.cpp
	src/core/main.cpp
2009-11-30 00:50:31 +01:00
Tobias Doerffel
9bb3ab5f16 ProjectRenderer: lock Mixer while calling Song::{start,stop}Export()
We have to lock Mixer when touching Song's state via Song::startExport()
and Song::stopExport() in ProjectRenderer::run() as the FIFO writer
thread may call Mixer::renderNextBuffer() (which calls Song::doActions())
simultaneously. Fixes a random segfault when exporting project.

This was a new bug as the ProjectRenderer does not operate FIFO-less
anymore.
2009-11-29 23:57:30 +01:00
Tobias Doerffel
294fa87475 Merge branch 'auto-save'
* auto-save:
  don't change the current project when auto-saving
  auto-saves every minute and recovers upon crash
  don't show WelcomeScreen when importing/loading

Conflicts:
	src/gui/MainWindow.cpp
2009-11-29 23:21:54 +01:00
Tobias Doerffel
c9802d8a26 ProjectRenderer: start thread with normal priority
There's no need to start the ProjectRenderer thread with high priority
anymore as the actual rendering is done on the other side of the FIFO.
The ProjectRenderer just waits for new data in the FIFO and encodes
them as they arrive.
2009-11-29 15:49:21 +01:00
Tobias Doerffel
03d3548ba1 ProjectRenderer: renamed OutputSettings to EncoderSettings + Doxygen comments
Renamed the ProjectRenderer::OutputSettings structure to
ProjectRenderer::EncoderSettings to better reflect its meaning.

Additionally added some basic Doxygen comments.
2009-11-29 15:37:04 +01:00
Tobias Doerffel
20589f19e4 Mixer: rewrote processing chain of rendered audio buffers
Until now, Mixer not only was responsible for rendering audio buffers
but also managed writing them to audio backend (through a FIFO) and
handled various quality related parameters.

All this functionality has been moved into the new AudioOutputContext
class. It glues together AudioBackend (formerly called AudioDevice),
global quality settings and the Mixer.

The AudioOutputContext class creates a FifoWriter which calls
Mixer::renderNextBuffer() and writes the output into the BufferFifo of
the AudioOutputContext it belongs to. The BufferFifo is read by the
according AudioBackend which belongs to the AudioOutputContext as well.

The AudioOutputContext also handles resampling in case the AudioBackend
wants the buffers in a different samplerate.

During this rewrite the Mixer class and the according source files have
been renamed from "mixer" to "Mixer". This results in small changes
all over LMMS' code base.
2009-11-29 01:46:23 +01:00
Tobias Doerffel
ced0d8ecc6 Merge branch 'master' into fx-mixer-rework 2009-11-26 01:47:38 +01:00
Tobias Doerffel
63cb220090 ResourceDB: added Doxygen comments
Documented the ResourceDB class and all its members.
2009-11-26 01:41:57 +01:00
Tobias Doerffel
dc561a07e7 Revert "Mixer, FifoBuffer, AudioDevice: removed memory allocation/free cycles"
This reverts commit c517f1fa5a.

The commit was not very helpful and introduced new xrun problems.
Instead I'll be rewriting the part of LMMS where Mixer, Mixer's
quality settings, Buffer FIFO and AudioDevice are sticked together.
2009-11-26 01:36:36 +01:00
Tobias Doerffel
c517f1fa5a Mixer, FifoBuffer, AudioDevice: removed memory allocation/free cycles
There's really no need to allocate a buffer each period, push it to the
FifoBuffer and free it when fetching the buffer in
AudioDevice::getNextBuffer(). Instead keep the pointer in FifoBuffer's
pool and reuse it.
2009-11-24 12:46:08 +01:00
Armin Kazmi
92047f5e9e AudioPulseAudio: fixed latency and underrun problems
Try to adjust latency of PulseAudio according to our settings of mixer
so it does not have such a bad latency anymore.

Furthermore force PulseAudio to play silence instead of rewinding
streams in case of underruns.
2009-11-20 23:08:07 +01:00
Tobias Doerffel
168805745e AudioPulseAudio: fixed improper shutdown + free allocated resources
There have been some problems with the threading logic in the
AudioPulseAudio backend resulting in an endless loop when quitting LMMS.

Furthermore allocated PulseAudio resources were not freed properly.
Thanks to Armin Kazmi <armin.kazmi@tu-dortmund.de> for pointing out
this issue.
2009-11-20 22:28:47 +01:00
Andrew Kelley
953522f34a don't change the current project when auto-saving
every time auto-save ran, it would change the current project to
"recover.mmp". Now it doesn't do this because Song has
guiSaveProject(), guiSaveProjectAs(), and saveProjectFile().
(the latter is used for auto-save)
2009-11-13 18:43:08 -07:00
Tobias Doerffel
58f53d9f5b PreferencesDialog: initial draft
Here's an initial draft for the new preferences dialog. The basics of
the GUI are done, however there's absolutely no functionality yet.
2009-11-14 00:36:52 +01:00
Andrew Kelley
b7e73fbe0c don't show WelcomeScreen when importing/loading
WelcomeScreen was incorrectly shown when lmms loaded or imported
a project (for example via command line). Fixed.
2009-11-13 08:18:03 -07:00
Tobias Doerffel
0679c83c33 LocalResourceProvider: watch out for changes in base directory
Changes in base directory were not tracked by filesystem watcher.
Explicitely add base directory to filesystem watcher and add a special
case to LocalResourceProvider::reloadDirectory().
2009-11-11 13:23:14 +01:00
Tobias Doerffel
0b5dae4a2a WelcomeScreen: disable horizontal scrollbars for listviews
When customizing background color of a widget via CSS, Qt somehow
falls back to ugly old windows style. This resulted in ugly looking
scrollbars in WelcomeScreen when working at a low screen resolution.
Therefore disable those scrollbars as they're rather useless anyways.
QListView automatically shows three dots for too wide text items.
2009-11-11 11:16:14 +01:00
Andrew Kelley
f73ccadc17 auto-saves every minute and recovers upon crash
auto-save time is not configurable yet. saves "recover.mmp" to
WORKING_DIR every 60 seconds. Deletes recover.mmp on successful
close of LMMS. If recover.mmp is found upon start, it loads that
project.
2009-11-10 21:41:45 -07:00
Andrew Kelley
96c8dcbeb4 don't show WelcomeScreen when importing/loading
WelcomeScreen was incorrectly shown when lmms loaded or imported
a project (for example via command line). Fixed.
2009-11-10 20:22:38 -07:00
Tobias Doerffel
598bbcd1f7 AudioPulseAudio: alloc pcmbuf via CPU class
In AudioPulseAudio::streamWriteCallback() we're operating on pcmbuf
via an operation from CPU class. All methods of CPU assume the buffer
being aligned on 16 byte boundaries. However pa_xmalloc() & friends do
not allocate aligned memory which resulted in a crash when calling
CPU::convertToS16() (SSE2 version takes advantage of aligned memory).

Replacing pa_xmalloc()/pa_xfree() with CPU::memAlloc()/CPU::memFree()
fixes this crash.

Closes bug #2890465.
2009-11-05 10:18:23 +01:00
Tobias Doerffel
822a22ca37 SideBar: rewritten to use QToolBar instead of KMultiTabBar
Rewrote implementation of class SideBar to use QToolBar instead of
KMultiTabBar. We can style the SideBar now easily via CSS and do not
have to ship 3rd party KDE code with LMMS. Also the QToolBar based
SideBar integrates much better into the according widget style.

Furthermore renamed SideBar related classes and files to match new
coding style.
2009-10-31 13:08:03 +01:00
Tobias Doerffel
1633cf2593 Removed usage of ASCII C strings in several places
Still QString::toAscii() & friends were used in several places causing
problems such as failed access to files with non-ASCII characters in
name.

Closes #2884115.
2009-10-27 17:54:40 +01:00
Tobias Doerffel
871c4ae06f Added new DirectorySelectDialog
DirectorySelectDialog is another subclass of ResourceSelectDialog,
allowing to pick a certain directory via a tree view and a filter
line edit.
2009-10-27 00:35:07 +01:00