mirror of
https://github.com/LMMS/lmms.git
synced 2026-06-14 00:58:59 -04:00
fixed too late initialization of member-variables - fixes crash
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@491 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2007-07-17 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/audio/audio_port.cpp:
|
||||
initialize all member-variables in initialization-list of
|
||||
audioPort-constructor - this way the audio-port isn't being added to
|
||||
the mixer before it's completely initialized - fixes some segfaults
|
||||
|
||||
* include/midi.h:
|
||||
* plugins/midi_import/midi_import.h:
|
||||
* plugins/midi_import/midi_import.cpp:
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "audio_device.h"
|
||||
#include "engine.h"
|
||||
|
||||
|
||||
audioPort::audioPort( const QString & _name ) :
|
||||
m_bufferUsage( NONE ),
|
||||
m_firstBuffer( new surroundSampleFrame[
|
||||
@@ -40,7 +41,9 @@ audioPort::audioPort( const QString & _name ) :
|
||||
engine::getMixer()->framesPerAudioBuffer()] ),
|
||||
m_extOutputEnabled( FALSE ),
|
||||
m_nextFxChannel( -1 ),
|
||||
m_name( "unnamed port" )
|
||||
m_name( "unnamed port" ),
|
||||
m_effects( new effectChain ),
|
||||
m_frames( engine::getMixer()->framesPerAudioBuffer() )
|
||||
{
|
||||
engine::getMixer()->clearAudioBuffer( m_firstBuffer,
|
||||
engine::getMixer()->framesPerAudioBuffer() );
|
||||
@@ -48,8 +51,6 @@ audioPort::audioPort( const QString & _name ) :
|
||||
engine::getMixer()->framesPerAudioBuffer() );
|
||||
engine::getMixer()->addAudioPort( this );
|
||||
setExtOutputEnabled( TRUE );
|
||||
m_frames = engine::getMixer()->framesPerAudioBuffer();
|
||||
m_effects = new effectChain;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user