diff --git a/ChangeLog b/ChangeLog index ba2d7c716..b93628d86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-07-17 Tobias Doerffel + * 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: diff --git a/src/audio/audio_port.cpp b/src/audio/audio_port.cpp index 4906921ba..22c128e8d 100644 --- a/src/audio/audio_port.cpp +++ b/src/audio/audio_port.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; }