Merge branch 'master' into mixer-new-fifo-arch
Conflicts: include/Mixer.h src/core/Mixer.cpp src/core/audio/AudioPort.cpp src/core/main.cpp
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QBuffer>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include "FlpImport.h"
|
||||
#include "note_play_handle.h"
|
||||
@@ -40,6 +41,7 @@
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
#include "FxMixer.h"
|
||||
#include "FxMixerView.h"
|
||||
#include "group_box.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
@@ -104,7 +106,7 @@ extern QString outstring;
|
||||
|
||||
}
|
||||
|
||||
|
||||
const int NumFLFxChannels = 64;
|
||||
|
||||
static void dump_mem( const void * buffer, uint n_bytes )
|
||||
{
|
||||
@@ -542,7 +544,7 @@ struct FL_Project
|
||||
int currentPattern;
|
||||
int activeEditPattern;
|
||||
|
||||
FL_EffectChannel effectChannels[NumFxChannels+1];
|
||||
FL_EffectChannel effectChannels[NumFLFxChannels+1];
|
||||
int currentEffectChannel;
|
||||
|
||||
QString projectNotes;
|
||||
@@ -903,7 +905,6 @@ bool FlpImport::tryFLPImport( trackContainer * _tc )
|
||||
const bool is_journ = engine::projectJournal()->isJournalling();
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
|
||||
|
||||
while( file().atEnd() == false )
|
||||
{
|
||||
FLP_Events ev = static_cast<FLP_Events>( readByte() );
|
||||
@@ -1022,7 +1023,7 @@ bool FlpImport::tryFLPImport( trackContainer * _tc )
|
||||
break;
|
||||
|
||||
case FLP_EffectChannelMuted:
|
||||
if( p.currentEffectChannel <= NumFxChannels )
|
||||
if( p.currentEffectChannel <= NumFLFxChannels )
|
||||
{
|
||||
p.effectChannels[p.currentEffectChannel].isMuted =
|
||||
( data & 0x08 ) > 0 ? false : true;
|
||||
@@ -1274,7 +1275,7 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
|
||||
case FLP_Text_EffectChanName:
|
||||
++p.currentEffectChannel;
|
||||
if( p.currentEffectChannel <= NumFxChannels )
|
||||
if( p.currentEffectChannel <= NumFLFxChannels )
|
||||
{
|
||||
p.effectChannels[p.currentEffectChannel].name = text;
|
||||
}
|
||||
@@ -1497,7 +1498,7 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
const int param = pi[i*3+1] & 0xffff;
|
||||
const int ch = ( pi[i*3+1] >> 22 )
|
||||
& 0x7f;
|
||||
if( ch < 0 || ch > NumFxChannels )
|
||||
if( ch < 0 || ch > NumFLFxChannels )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1558,9 +1559,15 @@ else
|
||||
|
||||
|
||||
// now create a project from FL_Project data structure
|
||||
|
||||
engine::getSong()->clearProject();
|
||||
|
||||
// configure the mixer
|
||||
for( int i=0; i<NumFLFxChannels; ++i )
|
||||
{
|
||||
engine::fxMixer()->createChannel();
|
||||
}
|
||||
engine::fxMixerView()->refreshDisplay();
|
||||
|
||||
// set global parameters
|
||||
engine::getSong()->setMasterVolume( p.mainVolume );
|
||||
engine::getSong()->setMasterPitch( p.mainPitch );
|
||||
@@ -1797,7 +1804,7 @@ p->putValue( jt->pos, value, false );
|
||||
}
|
||||
}
|
||||
|
||||
for( int fx_ch = 0; fx_ch <= NumFxChannels ; ++fx_ch )
|
||||
for( int fx_ch = 0; fx_ch <= NumFLFxChannels ; ++fx_ch )
|
||||
{
|
||||
FxChannel * ch = engine::fxMixer()->effectChannel( fx_ch );
|
||||
if( !ch )
|
||||
@@ -1857,7 +1864,7 @@ p->putValue( jt->pos, value, false );
|
||||
break;
|
||||
}
|
||||
if( effName.isEmpty() || it->fxChannel < 0 ||
|
||||
it->fxChannel > NumFxChannels )
|
||||
it->fxChannel > NumFLFxChannels )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user