Huge structural changes

Well, this commit got a bit out of hand, what with 26 files changed. Oh well.

Basically, we're using the buffermanager to dispense temporary buffers for playhandles and audioports to use.
This allows us to change the way playhandles work. Earlier, playhandles of the same track were waiting in line
to push their output to the audioport. This was of course inefficient, so now they just register themselves to the port,
then the port handles mixing the buffers.

Caveat: this is still a work in progress, the vol/pan knobs on instruments are temporarily non-functional - will be fixed in
the next commit, but I have to get some sleep now.
This commit is contained in:
Vesa
2014-08-27 00:59:49 +03:00
parent 311d33d648
commit 857de8d2c8
26 changed files with 292 additions and 201 deletions

View File

@@ -353,7 +353,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
filterChanged();
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
engine::mixer()->addPlayHandle( iph );
}

View File

@@ -138,7 +138,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
trem_depth_mdl(false, this, tr( "Tremolo Depth" ) )
{
// Connect the plugin to the mixer...
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
engine::mixer()->addPlayHandle( iph );
// Voices are laid out in a funny way...

View File

@@ -118,7 +118,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
// everytime we load a new soundfont.
m_synth = new_fluid_synth( m_settings );
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
engine::mixer()->addPlayHandle( iph );
loadFile( ConfigManager::inst()->defaultSoundfont() );

View File

@@ -82,7 +82,7 @@ vestigeInstrument::vestigeInstrument( InstrumentTrack * _instrument_track ) :
p_subWindow( NULL )
{
// now we need a play-handle which cares for calling play()
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
engine::mixer()->addPlayHandle( iph );
}

View File

@@ -129,7 +129,7 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
connect( &m_resBandwidthModel, SIGNAL( dataChanged() ), this, SLOT( updateResBandwidth() ) );
// now we need a play-handle which cares for calling play()
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this );
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
engine::mixer()->addPlayHandle( iph );
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),