Commit Graph

99 Commits

Author SHA1 Message Date
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
Lukas W
e65ccea7ba Merge branch 'stable-1.2' 2018-07-22 11:49:20 +02:00
Hyunjin Song
f2d68326a7 Fix occasional audio interface deadlock (#4450) 2018-07-10 11:13:56 +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
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
Hyunin Song
0a5d056bdb Merge branch 'stable-1.2'
# Conflicts:
        #       .travis/osx..install.sh
        #       .travis/osx..script.sh
        #       cmake/linux/package_linux.sh.in
        #       data/locale/en.ts
        #       src/core/CMakeLists.txt
        #       src/core/ProjectRenderer.cpp
        #       src/gui/FileBrowser.cpp
2018-03-07 23:54:28 +09:00
Hyunjin Song
926b6542ae Don't restore audio device during exporting (#4083)
Fixes deadlock on multi-track export with SDL
2018-03-02 13:28:56 +09:00
Lukas W
aa1406bac9 Merge pull request #4000 from LMMS/fix/msvc
MSVC fixes
2017-11-24 11:58:12 +01:00
Lukas W
8f3ab4b1b0 Merge branch 'master' into fix/msvc
# Conflicts:
#	plugins/LadspaEffect/CMakeLists.txt
#	plugins/Xpressive/Xpressive.cpp
#	plugins/opl2/CMakeLists.txt
#	plugins/papu/CMakeLists.txt
#	plugins/xpressive/CMakeLists.txt
#	src/CMakeLists.txt
2017-11-22 17:34:22 +01:00
Oskar Wallgren
01265ace66 Default project when cancelling project loading (#3941)
Default project when cancelling project loading

If a user isn't aware that the loading of a project has been
cancelled, it may be in an incomplete state. Saving such a project
will overwrite the original file and result in data loss. This is
solved by loading the default project on cancelling project loading.

Add Mixer::clearNewPlayHandles() to prevent crash when cancelling
loading of a single streamed instrument.
2017-11-17 02:03:49 +01:00
Lukas W
8d6cb120b9 Replace MemoryManager implementation with rpmalloc (#3873)
* Replace MemoryManager implementation with rpmalloc
    Fixes #3865
* Travis: Specify OSX image for Qt5 build
2017-10-18 17:02:40 +02:00
Lukas W
9ae1bdecda MSVC compilation fixes 2017-10-16 15:51:21 +02:00
Lukas W
f23cf4e0bf Fix "out of buffers" crash (#3783)
Remove BufferManager implementation. Use MemoryManager allocation instead and re-use buffers where they are allocated (AudioPort.cpp & PlayHandle.cpp)
2017-09-26 20:33:09 +02:00
Lukas W
31ade1ad2c Fix Mixer renderOnly flag 2017-03-21 22:48:23 +01:00
Lukas W
435c898781 Mixer: Save renderOnly flag 2017-03-21 17:52:10 +01:00
Lukas W
10e28c26b9 Merge branch 'renderer' of https://github.com/PaulBatchelor/lmms 2017-03-21 17:51:51 +01:00
Lukas W
29f832034a Remove unused includes (#3429) 2017-03-16 11:35:18 +00:00
Paul Batchelor
5e536319b7 when rendering, use dummy Audio/MIDI devices 2017-03-04 22:10:36 -08:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Oskar Wallgren
6e66665687 Don't run metronome when project is empty (#3173) 2016-12-22 15:30:18 +01:00
Shane Ambler
05ace7e348 Support for using jack midi input (#2038)
* Support jack midi input

* If jack is used for audio then use the same connection for midi as well

* Remove old FreeBSD adjustment for portaudio as multiple version support has been dropped.

* Disable jack midi out port until it is functional
2016-11-10 00:03:35 +01:00
Javier Serrano Polo
5f54995188 Add LocklessAllocator and use it in LocklessList (#2998) 2016-09-04 00:13:45 +00:00
Javier Serrano Polo
c2a406e70f Merge pull request #2895 from jasp00/worker-lock
Added LocklessList and use it for new play handles
2016-07-06 15:18:09 +00:00
Javier Serrano Polo
f7aa773005 Added LocklessList and use it for new play handles 2016-07-03 16:42:07 +02:00
Javier Serrano Polo
8497d39eec Do not busy wait when writing buffer in mixer 2016-07-02 21:57:55 +02:00
Javier Serrano Polo
e55ec80c3d Fixed freeze when finishing export
Fixed stopping processing
2016-06-28 00:50:00 +02:00
Javier Serrano Polo
2c796f9503 Removed more locks from the mixer 2016-06-20 00:30:23 +02:00
Javier Serrano Polo
5606a04ad7 Defer updates to SampleBuffer
Removed global lock from the Mixer
2016-06-18 05:29:21 +02:00
Javier Serrano Polo
d31089ceb5 Fixed removal of track when notes are playing 2016-06-16 17:42:00 +02:00
David Carlier
9d06b9a7cb adding missing sndio Midi name setting. 2016-04-02 22:28:32 +01:00
David Carlier
43a0718d0b Adding OpenBSD's sndio support.
Updating jackmsr's work, adding sndio cmake module.
Updating 64 bits OS arch detection (amd64).
2016-03-26 12:48:28 +00:00
Michael Gregorius
f6317f126b Performance fixes
Removes some repeated calls to Qt's font layouting by using QStaticText
in FxLine and removing the overridden method ComboBox::sizeHint.

Unifies Mixer::peakValueLeft and Mixer::peakValueRight into
Mixer::getPeakValues so the array is only iterated once.
2016-03-06 18:23:35 +01:00
Fastigium
60038b5f55 Synchronize access to Mixer::m_playHandlesToRemove
Put every access to m_playHandlesToRemove between lockPlayHandleRemoval() and
unlockPlayHandleRemoval(). Fixes #2610 where a SIGSEGV would occur due to
concurrent access.
2016-03-02 09:47:24 +01:00
Fastigium
9d1867c7eb Make Mixer::removePlayHandle check m_newPlayHandles, too
This fixes a problem where a PresetPreviewPlayHandle would be put in
m_newPlayHandles to be added, then "removed" before it was actually added,
leaving it dangling.
2016-02-16 19:23:17 +01:00
Fastigium
da8040764f Require explicit types when removing PlayHandles in the Mixer
This fixes a few deadlocks where a PresetPreviewPlayHandle would be removed by
the creation of a new PresetPreviewPlayHandle.
2016-02-16 19:23:08 +01:00
M374LX
ccb2f73dc0 Fix "Dummy" actually using ALSA 2015-11-11 22:55:18 -02:00
Colin Wallace
3a8f491ddb Merge pull request #2394 from M374LX/decouple-mixer-visualization
Partially decouple VisualizationWidget from Mixer
2015-10-05 05:18:41 +00:00
Colin Wallace
fb46bfc753 Merge pull request #2383 from M374LX/audiobuffercontainer
Move Mixer::clearAudioBuffer() to BufferManager
2015-10-02 18:14:27 +00:00
M374LX
12e2da9b44 Remove unused Mixer::m_workingBuf 2015-09-30 23:00:06 -03:00
M374LX
5489040f20 Partially decouple Mixer from VisualizationWidget 2015-09-30 22:38:10 -03:00
M374LX
efb1a4fdf3 Mixer cleanup 2015-09-27 17:11:52 -03:00
M374LX
e801384eed Move Mixer::clearAudioBuffer() to BufferManager 2015-09-27 00:36:17 -03:00
Tres Finocchiaro
1bb276b365 Make SDL default for all platforms
Closes #1600
2015-09-18 14:08:57 -04:00
Andrew Kelley
f7e5bf4860 core: fix cleanup race condition in mixer 2015-09-13 16:54:16 -07:00
Andrew Kelley
f7ff96fe4f add libsoundio audio backend
This adds libsoundio (http://libsound.io/) as an available audio
backend. libsoundio supports JACK, PulseAudio, ALSA, CoreAudio,
WASAPI, and a dummy backend.
2015-09-13 16:07:10 -07:00
Michael Gregorius
5b2e77b444 Improved metronome (on/off during song, pattern and bb playback)
There is a new tool button that can be used to turn the metronome on and
off. Per default the metronome is turned off. When enabled the metronome
will during on song playback, pattern playback and BB playback. During
export it is ignored.

A new icon was added as well.

The state is currently stored in the Mixer. It might make sense to put
the metronome configuration in its own class in the future. The state is
currently not stored in the file but this might be a good choice for now
until a better place is found for the metronome data.

Also removed some repeated calls to Engine::getSong() and
Engine::fxMixer().
2015-08-29 15:04:41 +02:00
Colin Wallace
65467eb66c Merge pull request #2237 from M374LX/iss1878
Fix #1878
2015-08-09 09:08:25 -07:00
Alexandre Almeida
2f24d635c3 Add a MINIMUM_BUFFER_SIZE constant and comments 2015-08-09 11:50:12 -03:00
Maurizio Lo Bosco
275bcb52df #1153: added basic apple midi support 2015-08-09 09:59:12 +02:00
Alexandre Almeida
c73edc5d94 Adjust coding conventions 2015-08-05 20:50:10 -03:00