Commit Graph

7928 Commits

Author SHA1 Message Date
sakertooth
900e52cc1a Convert std::shared_ptr<Sample> to Sample
This conversion does not apply to Patman as there seems to be issues
with it causing heap-use-after-free issues, such as with
PatmanInstrument::unloadCurrentPatch
2023-09-27 17:20:59 -04:00
sakertooth
8689a68ad5 Fix error in c5f7ccba49
We still have to delete the Clip's, or else we would just be eating
up memory. But we should first make sure that the Track's no longer
see this Clip in their m_clips vector. This has to happen
as it's own operation because we have to wait for the audio thread(s)
first. This would ensure that Track's do not create
PlayHandle's that would refer to a Clip that is currently
being destroyed. After that, then we call deleteLater on the Clip.
2023-09-27 08:10:44 -04:00
sakertooth
7c8804bfcc Remove whitespace in EnvelopeAndLfoParameters.cpp L#121 2023-09-27 07:24:27 -04:00
sakertooth
d41d02ad04 Set user wave, even when value is empty
If the value or file is empty, I think showing a
error popup here is ideal.
2023-09-27 07:19:37 -04:00
sakertooth
73da2e1fa9 Clean up generateAntiAliasUserWaveTable function
Also, make it so that we actually call this function
when necessary in TripleOscillator.
2023-09-27 07:06:02 -04:00
sakertooth
c5f7ccba49 Don't manually delete Clip if it has a Track 2023-09-26 22:55:16 -04:00
sakertooth
99e628a5ab Use array specialization for unique_ptr when managing DrumSynth data
Also made it so that we don't create result
before checking if we failed to decode the file,
potentially saving us an allocation.
2023-09-26 22:07:13 -04:00
sakertooth
0600ced75a Remove ArrayVector comment 2023-09-26 13:24:55 -04:00
sakertooth
7d87637679 Remove use of atomic_store and atomic_load 2023-09-26 13:15:50 -04:00
sakertooth
8e41e4cf4f Use isEmpty() within SampleClipView::updateSample 2023-09-26 12:26:59 -04:00
sakertooth
b3245775ec Do not pass in unique_ptr by r-value reference 2023-09-26 12:16:41 -04:00
sakertooth
447045497f Return const QString& from SampleBuffer::audioFile 2023-09-26 12:15:34 -04:00
sakertooth
6900a2b114 Pass in unique_ptr to SampleClip::setSampleBuffer 2023-09-26 11:57:41 -04:00
sakertooth
1e0c75c656 Use if block in playSampleRange 2023-09-26 11:18:46 -04:00
sakertooth
d6e6c1c9ad Move in result to m_data 2023-09-26 07:59:13 -04:00
saker
42086bb691 Use std::min in Sample::visualize
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
2023-09-26 07:49:24 -04:00
saker
ee19205d77 Use typeInfo<float> for float equality comparison
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
2023-09-26 07:38:53 -04:00
saker
44c5bb5681 Update src/core/Oscillator.cpp
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
2023-09-26 07:37:31 -04:00
sakertooth
f0ff0f9e6b Remove SampleBuffer.h include in SampleRecordHandle.h 2023-09-26 07:35:08 -04:00
sakertooth
d4756de6a2 Format SampleLoader.h 2023-09-26 07:32:27 -04:00
saker
db77259157 Update include/SampleLoader.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
2023-09-26 07:27:27 -04:00
saker
5fa3dab644 Update include/SampleLoader.h
Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
2023-09-26 07:27:13 -04:00
sakertooth
700b7c7284 Cast processingSampleRate to float
Fixes division by zero error
2023-09-25 21:36:49 -04:00
sakertooth
7025194f8b Change copyright 2023-09-25 21:18:56 -04:00
saker
8d18010932 Merge branch 'master' into refactor-samplebuffer 2023-09-25 21:13:26 -04:00
sakertooth
e890aac3dc Merge remote-tracking branch 'upstream/master' into refactor-samplebuffer 2023-09-25 21:04:44 -04:00
sakertooth
1f932d3d6f Refactor play functionality (again)
The responsibility of resampling the buffer
and moving the frame index is now in Sample::play, allowing the removal
of both playSampleRangeLoop and playSampleRangePingPong.
2023-09-25 20:27:17 -04:00
sakertooth
a5a01cf47b Remove m_buffer asserts 2023-09-25 15:28:21 -04:00
Bimal Poudel
23ef89b4a1 Update SampleBuffer.cpp (#6892)
File information corrected.
2023-09-24 21:03:29 -04:00
Bimal Poudel
f664698c80 Update copyright year (#6888) 2023-09-24 18:58:56 -04:00
Johannes Lorenz
33d1baddc0 Implement Lv2 Worker (#6484) 2023-09-24 17:36:59 +02:00
Johannes Lorenz
83777dc1f7 Lv2Proc: Set def val for ComboModel, too 2023-09-24 17:36:59 +02:00
Johannes Lorenz
94608eaad1 Lv2Proc: Sort scale point maps (#6859)
lilv can return the scale points in randomized order, and so the linked
models (of stereo effects wit 2 `Lv2Proc`) may have different scale
points. This would mean that the same combo enumeration value would have
different float values in linked models. This problem is fixed by
sorting the scale values.

Also, it is more natural for users if scale points are enumerated in a
numerical order.
2023-09-24 17:36:59 +02:00
Johannes Lorenz
7aca8ae726 SetupDialog: Warn of unusual buffersizes
This displays a warning dialog if the users requests unusual
buffersizes:

- buffersizes less than 32
- buffersizes which are not a (natural number) power of 2

This commit also replaces some `setGeometry` stuff by `QBoxLayout`.
2023-09-24 17:36:59 +02:00
Johannes Lorenz
61b612634d Add plugin blacklist for buffersize<=32 2023-09-24 17:36:59 +02:00
Johannes Lorenz
9c46370234 Support LV2_BUF_SIZE__powerOf2BlockLength 2023-09-24 17:36:59 +02:00
Johannes Lorenz
d97377b640 Lv2: Improve LED widget's digit calculation
This improves the way digits are calculated for display in
`Lv2ViewProc`:

- More than 2 digits are now recognized
- Minus signs are now recognized
- Tests have been added
2023-09-24 17:36:59 +02:00
Johannes Lorenz
c309d8bd11 Lv2ViewProc: Improve variable names 2023-09-24 17:36:59 +02:00
Lost Robot
006c43820b Fix Compressor zero divisions (#6887)
* Fix threshold zero division

* Fix RMS zero division
2023-09-24 13:19:19 +02:00
saker
49c713df5b Use resid submodule from libsidplayfp (#6883) 2023-09-23 19:33:20 -04:00
Artur-Twardowski-Mobica
f0aa2862d7 Updated MIDI CC handling not to count from 1 (#6774) 2023-09-22 20:07:25 +01:00
Michael Gregorius
0576f9daa6 Merge pull request #6789 from michaelgregorius/2510-HiDPI-Fix-For-QTreeViews
HiDPI fixes for elements based on QTreeView
2023-09-22 18:54:50 +02:00
Michael Gregorius
93d3e8c82c Adjust the classic theme
Adjust the classic theme so that it is consistent with the changes made to the default theme.

It was only necessary to change the font-size of the check boxes in the file browser to points because the QTreeView already does not contain any font settings.
2023-09-22 18:16:45 +02:00
Michael Gregorius
910cdf22cb Merge pull request #6788 from michaelgregorius/2510-HiDPI-Fix-for-Sample-Track-Window
Fix HiDPI issue of sample track window
2023-09-22 17:47:25 +02:00
Michael Gregorius
e5bb07a5ae Merge pull request #6787 from michaelgregorius/2510-Fix-HiDPI-Issues-For-Menus
Fix HiDPI issues for menus
2023-09-22 17:34:51 +02:00
Alexandre Almeida
07229b6404 Show error message when loading an invalid sample file (#6286) 2023-09-22 00:18:23 +01:00
Michael Gregorius
21fb430c76 Merge pull request #6867 from michaelgregorius/RemoveIdenticalCalls
(Re)move identical calls to `InstrumentTrack::processAudioBuffer`
2023-09-21 20:12:04 +02:00
Michael Gregorius
b6c80bd736 Replace check for nullptr
Replace the check for a `nullptr` buffer with a check that checks if the NotePlayHandle uses a buffer. This is effectively the same condition that's used by `PlayHandle::doProcessing` to decide if it should call play with a `nullptr` in the first place. Hence it should be the most fitting check.
2023-09-21 19:24:06 +02:00
Maxwell Voorhes
3df28e30b6 Changed sharps to music sharps unicode (#6873) 2023-09-20 18:32:21 -04:00
Michael Gregorius
7e8c79a191 Enable build under NixOS (#6855)
Explicitly call the perl interpreter when building the SWH LADSPA plugins
2023-09-20 13:52:59 -04:00