Commit Graph

1942 Commits

Author SHA1 Message Date
Hyunjin Song
12d251cc3e Merge branch 'stable-1.2'
# Conflicts:
#	cmake/linux/package_linux.sh.in
#	data/locale/cs.ts
2018-08-24 09:50:36 +09:00
Michael Gregorius
8d00e90322 Remove peak value references from Mixer::getPeakValues
Adjust Mixer::getPeakValues so client do not have to allocate the
variables that will store the peak values.

Adjust both existing clients: FxMixer and VisualizationWidget.
2018-08-16 19:49:30 +02:00
Hyunin Song
112d34226a Fix broken MIDI import
Fix a regression in 3e538d510c (#4401) that
readAllData doesn't read the file from the beginning
2018-07-27 15:48:58 +09:00
Lukas W
e65ccea7ba Merge branch 'stable-1.2' 2018-07-22 11:49:20 +02:00
Lukas W
a35d23f3b8 Merge remote-tracking branch 'lukas/cleanup/qt4' 2018-07-17 08:57:57 +02:00
Lukas W
ff1c30e35d Merge remote-tracking branch 'lukas/cleanup/qt4'
# Conflicts:
#	cmake/toolchains/common/MSYS.cmake
2018-07-17 08:52:49 +02:00
Lukas W
820d006c4e Add Appveyor script, fix 32bit Windows compilation 2018-07-17 08:49:13 +02:00
Lukas W
c670d4827a Minor QString usage improvements 2018-07-11 20:13:47 +02:00
Michael Gregorius
0dc28436fa Add option to show note values on notes in Piano Roll (#4466)
Add the option to show note values on notes in the Piano Roll. This
functionality is currently coupled with the option "Enable note labels
in piano roll" which can be found in the main menu.

The notes are rendered at about 80% of the notes height. They are only
rendered if they fit on the whole note and if the font does not become
too tiny.

Enable the configuration of the note value text's color via the
stylesheets and set the value to white for both shipped themes.

Other changes:
* Clean up some warnings about old school casts and implicit casts.
2018-07-10 22:43:16 +02:00
Hyunjin Song
f2d68326a7 Fix occasional audio interface deadlock (#4450) 2018-07-10 11:13:56 +09:00
Shmuel H
ec28a65c89 AudioSdl: Add support for full SDL2 with float samples and recording
(with backward compatibility for SDL1).

Cherry-picked from dcc442411f
2018-07-07 17:16:08 +02:00
Lukas W
fe2483e309 Enable 64bit VSTs on Linux
* Remove trial-and-error approach of detecting VST's machine types. Read PE
  headers instead.
* Add RemoteVstPlugin64 to AppImage
2018-07-07 17:16:08 +02:00
justnope
f2a8f56944 MSVC fixes (#4352)
* locale: using path instead of individual files to reduce command line size
* remotevstplugin: changed order return type & calling convention (compiler error)
* lmmsobj: removed single quotes for command line defines
* added vcpkg support & std::make_unique for MSVC
* carla: include exports header
* package_linux: corrected RemoteVstPlugin name
* vstbase: toolchain file conditional on MSVC
* Added install for remotevstplugin
* msvc: installer works with vcpkg

Remotevst 64bit install removed due to an ApImage problem
2018-07-07 17:16:08 +02:00
Lukas W
20a6b96161 Fix 64bit VSTs on Linux by fixing callback calling convention 2018-07-07 17:16:08 +02:00
Lukas W
d756a7ade0 MSVC: Fix VST build 2018-07-07 16:40:37 +02:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Lukas W
3c6f200beb Merge branch 'stable-1.2'
# Conflicts:
#	cmake/modules/BuildPlugin.cmake
#	plugins/CMakeLists.txt
#	plugins/LadspaEffect/swh/CMakeLists.txt
#	plugins/LadspaEffect/tap/CMakeLists.txt
#	plugins/zynaddsubfx/zynaddsubfx
#	plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp
#	src/gui/MainWindow.cpp
2018-07-06 12:42:15 +02:00
Hyunin Song
3e538d510c Fix MIDI import encoding issue on Windows 2018-07-05 20:16:01 +09:00
Hyunin Song
1af0f083ea Fix WAV exporting on Windows 2018-07-05 20:16:01 +09:00
Hyunin Song
ddcae478d4 Fix sample file loading on Windows 2018-07-05 20:16:01 +09:00
Hyunin Song
792e4786ad Fix file name encoding issues with VST on Windows
Fix plugin loading and setting loading/saving
2018-07-05 20:16:01 +09:00
Hyunin Song
e9f2b57107 Fix project URL for some files
They were created before https://github.com/LMMS/lmms/pull/3326
and added after it.
2018-06-28 20:23:53 +09:00
Lukas W
11c693205e Remove usage of deprecated Qt API
Removes usage of the following deprecated Qt functions:
- QPixmap::grabWidget
- QString::null
- qFind
- qSort
- qGreater
- qCopy
2018-06-17 14:27:28 +02:00
Lukas W
da1c78ce86 Remove Qt4 compatibility code 2018-06-17 12:47:12 +02:00
dobbelaj
d11966a7ea Introduce UI_CTRL_KEY and use where appropriate (#4431)
This is an abstraction for the name of the 'Ctrl' (or equivalent) key on
linux, windows and apple
2018-06-17 11:20:00 +02:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Colin Wallace
2c672d47fe Prefer = default over empty destructor.
Same thing but less verbose.
2018-05-28 19:28:05 -07:00
Hyunin Song
3cf2afd831 Merge branch 'stable-1.2'
# Conflicts:
#	include/MixerWorkerThread.h
#	src/core/MixerWorkerThread.cpp
2018-05-26 16:09:38 +09:00
Colin Wallace
a3cdda04c0 Give our threads names (#4356)
* Give our threads names

It helps with debugging.

* Use Q_OBJECT macro to automatically name threads.

By default, QThread sets its name based on the Qt meta class. To get an
accurate metaclass, the class which inherits QThread must declare
Q_OBJECT in its header. Futhermore, Qt's MOC requires that a Qt type be
the primary base class when declaring Q_OBJECT, hence the order of
base classes has been rearranged for some classes.
2018-05-24 18:01:51 -07:00
SecondFlight
4585a07673 Allow renaming of FX mixer channels with the F2 and enter keys. (#4348)
* Add f2 as a FX mixer rename shortcut. Enter doesn't work yet.

* Add both enter keys, remove code duplication

* Fix renaming with enter/return

* Clean up
2018-05-13 17:15:32 -04:00
Premik
e8b69b9700 Zooming with mouse wheel center (#3835)
* Horizontal mouse-wheel zooming. Ensure zoom center is always on the current mouse position.

* Horizontal zoom using mouse wheel center on the mouse position. For the SongEditor too.

* Wheel center on the Automation editor too.
2018-05-10 00:45:45 +02:00
Hyunjin Song
03aa5fb3c7 Fix crash on exit from MIDI connections (#4340) 2018-05-07 17:08:43 -07:00
Matt Kline
68c9d227d0 Default some empty destructors
Moving empty destructors out of the .cpp files and into headers
allows them to be devirtualized in certain cases.
(When the compiler can't "see" a function in a header, it must largely
assume it's some black box that the linker will resolve.)

While we're at it, use C++11's `= default` to define empty virtual
desturctors for us.

For some classes (e.g., Piano), nothing is derived from it, so we can
mark the class as final and remove any explicit virtual dtor.

There are many other places where this can be done, but this is a large
enough patch as-is.
2018-05-06 16:34:08 -07:00
Lukas W
9a52c7b901 JobQueue: Rename m_queueSize to m_writeIndex
Hopefully makes it less confusing that m_writeIndex grows beyond
JOB_QUEUE_SIZE when the queue is full.
2018-05-02 12:54:45 +02:00
Hyunin Song
8a41def616 Merge branch 'stable-1.2'
# Conflicts:
#       .circleci/config.yml
#       .travis/osx..install.sh
#       CMakeLists.txt
#       plugins/zynaddsubfx/zynaddsubfx
#       plugins/zynaddsubfx/zynaddsubfx/src/DSP/FFTwrapper.h
#       plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp
#       plugins/zynaddsubfx/zynaddsubfx/src/Params/PADnoteParameters.cpp
#       plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp
#       src/CMakeLists.txt
#       src/core/Track.cpp
#       src/tracks/Pattern.cpp
2018-05-01 09:59:07 +09:00
Lukas W
ccd4ff3c2c Fix job queue crash
* Don't add jobs when job queue is full
* Icrease job queue size from 1024 to 8192
2018-04-29 17:01:51 +02:00
Matt Kline
ebed0296b3 Axe atomic int (#4326)
* ThreadableJob: Move from AtomicInt to std::atomic

This is the first in a series of commits that migrates away from
AtomicInt towards the C++11 standard library types.
This would allow the removal of AtomicInt and related Qt
version-specific code.

While we're at it, also make ProcessingState an `enum class` so that
it's not implicitly convertible to integers.

* LocklessAllocator: Switch from AtomicInt to std::atomic_int

If it looks like some assignments around the Compare & Swap loops went
missing, it's because compare_exchange_weak() updates the first argument
to the current value when it fails (i.e., returns false).

* BufferManager: Remove extra AtomicInt include

* MixerWorkerThread: AtomicInt to std::atomic_int

* NotePlayHandle: AtomicInt to std::atomic_int

* Remove AtomicInt.h

* Move from QAtomicPointer to std::atomic<T*>

This removes some #ifdef trickery that was being used to get
load-acquire and store-release from Qt5 and "plain" (presumably
sequentially-consistent) loads and stores from Qt4.
2018-04-28 12:54:46 -07:00
Lukas W
d42a685007 Refactoring: Remove duplicate code (#4310) 2018-04-25 18:49:39 +02:00
Matt Kline
ffccd6ddd2 Use atomics to count shared_object without locks
C++11 (and subsequent C++ standards) provide portable ways to issue
atomic hardware instructions, which allow multiple threads to load,
store, and modify integers without taking a lock. The standard also
defines a memory model that lets you express the ordering guarantees
around these atomic operations. (x86 is relatively strongly-ordered, but
many other common architectures, such as ARM, are free to reorder loads
and stores unless told not to.)

This patch removes the lock from shared_object and replaces it with the
standard thread-safe reference counting implementation used in
C++'s std::shared_ptr, Rust's std::sync::Arc, and many others.

Additional resources on the topic:
https://assets.bitbashing.io/papers/concurrency-primer.pdf
https://www.youtube.com/watch?v=ZQFzMfHIxng
2018-04-25 12:50:44 +02:00
Hussam Eddin Alhomsi
f7a0553e6a Responsive "Effects chain" & "User controller" LEDs (#4297) 2018-04-24 11:25:49 +03:00
Colin Wallace
3401de4a83 Use themed file dialogs everywhere. (#4298)
Previously lmms used themed dialogs for project saving/opening, but not
when editing settings (edit -> settings).

With this change, the settings editor also uses themed dialogs.
2018-04-20 19:01:11 -07:00
Colin Wallace
da126bfb5c Use range-based for loops + fix const correctness 2018-04-17 09:17:33 +02:00
Tres Finocchiaro
ae0dd21df3 Upgrade Calf LADSPA plugins to 0.90 (#3987)
Upgrade Calf LADSPA plugins to 0.90
2018-04-15 21:38:37 -04:00
Hussam Eddin Alhomsi
e554a4c4b0 Better behavior when left-clicking a TCO (#4290)
Instead of calling MouseMoveEvent(), the TCO's "text float" text and position are updated.
This prevents left-clicking the right edge of a resizable TCO from decreasing its size.

Also, removed an unused variable: m_oldTime
2018-04-11 13:39:43 +03:00
Tres Finocchiaro
9af7821eb1 Add PerfLog (#3974)
Add `PerfTime` class representing a point in CPU time and `PerfLogTimer`, used for measuring and logging a time period. Used in `ProjectRenderer::run()
2018-04-03 13:37:25 +02:00
Colin Wallace
ca3a7f3015 Remove unused method and extraneous state from AutomatableModelView (#4258)
* Remove DataType.

An AutomatableModel should not need to know what concrete type it is.
Use virtual methods and implement them in the derived class instead of
testing the type in the base class.

* Remove unused method

* Remove m_hasLinkedModels

We can compute it on-the-fly with very little cost, and doing so
simplifies the code.

* Remove extra 'public:'

Probably a remnant of merging master
2018-03-28 00:03:10 -07:00
Colin Wallace
56b4740146 Copy/paste model values to system clipboard
Previously they were copy/pasted internally, and not visible across LMMS
instances.
2018-03-20 00:43:15 -07:00
Colin Wallace
7593b2ee58 Replace macro magic with a template base class 2018-03-20 00:42:21 -07:00
Colin Wallace
b706ee208d Replace more instances new/delete with owning types (#4245)
* Use owning types when possible.

Note: the QByteArray s is detached to mimic previous behavior;
detach() guarantees that the QByteArray uniquely owns its data, since
otherwise it's COW. This may be relevant in case Plugin:instantiate
modifies s.data() -- this way the original QString is safe.

* Make m_filter a unique_ptr.

* Make m_activeRenderer a unique_ptr

* use std::string instead of strcpy + buffers
2018-03-15 18:46:55 -07:00
Colin Wallace
45f9fc03c2 Make *ModelView a templated type instead of macro-based class.
Among other things, this makes it easier to grep for FloatModelView,
BoolModelView, IntModelView in the code base.
2018-03-13 20:57:34 -07:00