Remove old SampleBuffer

This commit is contained in:
sakertooth
2023-08-27 23:31:36 -04:00
parent 0017f66629
commit 53728ce70f
29 changed files with 203 additions and 2152 deletions

View File

@@ -97,8 +97,6 @@ signals:
void sampleUpdated();
private:
using handleState = SampleBuffer::handleState;
std::shared_ptr<Sample> m_sample;
FloatModel m_ampModel;

View File

@@ -46,7 +46,7 @@
#include "Knob.h"
#include "NotePlayHandle.h"
#include "PathUtil.h"
#include "SampleBuffer.h"
#include "Sample.h"
#include "Song.h"
#include "PatchesDialog.h"
@@ -437,7 +437,7 @@ void GigInstrument::play( sampleFrame * _working_buffer )
if (sample.region->PitchTrack == true) { freq_factor *= sample.freqFactor; }
// We need a bit of margin so we don't get glitching
samples = frames / freq_factor + MARGIN[m_interpolation];
samples = frames / freq_factor + Sample::s_interpolationMargins[m_interpolation];
}
// Load this note's data

View File

@@ -29,7 +29,7 @@
#include "Instrument.h"
#include "InstrumentView.h"
#include "Sample.h"
#include "SampleBuffer2.h"
#include "SampleBuffer.h"
#include "AutomatableModel.h"
#include "MemoryManager.h"

View File

@@ -93,7 +93,7 @@ OscillatorObject::OscillatorObject( Model * _parent, int _idx ) :
tr( "Modulation type %1" ).arg( _idx+1 ) ),
m_useWaveTableModel(true),
m_sampleBuffer( new SampleBuffer2 ),
m_sampleBuffer( new SampleBuffer ),
m_volumeLeft( 0.0f ),
m_volumeRight( 0.0f ),
m_detuningLeft( 0.0f ),
@@ -146,7 +146,7 @@ void OscillatorObject::oscUserDefWaveDblClick()
QString af = gui::SampleLoader::openWaveformFile();
auto buffer = gui::SampleLoader::createBufferFromFile(af);
// TODO C++20: Deprecated, use std::atomic<std::shared_ptr> instead
std::atomic_store(&m_sampleBuffer, std::shared_ptr<const SampleBuffer2>(std::move(buffer)));
std::atomic_store(&m_sampleBuffer, std::shared_ptr<const SampleBuffer>(std::move(buffer)));
if( af != "" )
{
@@ -293,7 +293,7 @@ void TripleOscillator::loadSettings( const QDomElement & _this )
auto buffer = gui::SampleLoader::createBufferFromFile(_this.attribute("userwavefile" + is));
// TODO C++20: Deprecated, use std::atomic<std::shared_ptr> instead
std::atomic_store(&m_osc[i]->m_sampleBuffer, std::shared_ptr<const SampleBuffer2>(std::move(buffer)));
std::atomic_store(&m_osc[i]->m_sampleBuffer, std::shared_ptr<const SampleBuffer>(std::move(buffer)));
}
}

View File

@@ -29,7 +29,7 @@
#include "Instrument.h"
#include "InstrumentView.h"
#include "AutomatableModel.h"
#include "SampleBuffer2.h"
#include "SampleBuffer.h"
namespace lmms
{
@@ -69,7 +69,7 @@ private:
IntModel m_waveShapeModel;
IntModel m_modulationAlgoModel;
BoolModel m_useWaveTableModel;
std::shared_ptr<const SampleBuffer2> m_sampleBuffer;
std::shared_ptr<const SampleBuffer> m_sampleBuffer;
float m_volumeLeft;
float m_volumeRight;