Index: include/visualization_widget.h =================================================================== --- include/visualization_widget.h (Revision 565) +++ include/visualization_widget.h (Revision 566) @@ -66,7 +66,7 @@ protected slots: - void setAudioBuffer( const surroundSampleFrame * _ab, int _frames ); + void updateAudioBuffer( void ); private: Index: include/mixer.h =================================================================== --- include/mixer.h (Revision 565) +++ include/mixer.h (Revision 566) @@ -201,9 +201,9 @@ return( m_framesPerPeriod ); } - inline const surroundSampleFrame * currentAudioBuffer( void ) const + inline const surroundSampleFrame * currentReadBuffer( void ) const { - return( m_writeBuf ); + return( m_readBuf ); } @@ -311,7 +311,7 @@ signals: void sampleRateChanged( void ); - void nextAudioBuffer( const surroundSampleFrame *, int _frames ); + void nextAudioBuffer( void ); private: Index: ChangeLog =================================================================== --- ChangeLog (Revision 565) +++ ChangeLog (Revision 566) @@ -1,3 +1,17 @@ +2007-09-25 Tobias Doerffel + + * include/mixer.h: + * include/visualization_widget.h: + * src/core/mixer.cpp: + * src/widget/visualization_widget.cpp: + reworked code for retrieving current mixer-buffer for visualizing it - + do not use signal/slot-mechanism for passing pointer and use + currentReadBuffer() + mixer-mutex instead which probably fixes some + mixer-related crashes + + * src/widget/effect_label.cpp: + set window-title for effect-chain-windows of a sample-track etc. + 2007-08-20 Tobias Doerffel * configure.in: Index: src/widgets/visualization_widget.cpp =================================================================== --- src/widgets/visualization_widget.cpp (Revision 565) +++ src/widgets/visualization_widget.cpp (Revision 566) @@ -79,10 +79,8 @@ m_updateTimer->start( UPDATE_TIME ); } - connect( engine::getMixer(), SIGNAL( nextAudioBuffer( - const surroundSampleFrame *, int ) ), - this, SLOT( setAudioBuffer( - const surroundSampleFrame *, int ) ) ); + connect( engine::getMixer(), SIGNAL( nextAudioBuffer() ), + this, SLOT( updateAudioBuffer() ) ); toolTip::add( this, tr( "click to enable/disable visualization of " "master-output" ) ); @@ -99,12 +97,15 @@ -void visualizationWidget::setAudioBuffer( const surroundSampleFrame * _ab, - int _frames ) +void visualizationWidget::updateAudioBuffer( void ) { if( m_enabled == TRUE ) { - memcpy( m_buffer, *_ab, _frames * BYTES_PER_SURROUND_FRAME); + engine::getMixer()->lock(); + memcpy( m_buffer, engine::getMixer()->currentReadBuffer(), + engine::getMixer()->framesPerPeriod() * + BYTES_PER_SURROUND_FRAME ); + engine::getMixer()->unlock(); } } Index: src/widgets/effect_label.cpp =================================================================== --- src/widgets/effect_label.cpp (Revision 565) +++ src/widgets/effect_label.cpp (Revision 566) @@ -75,6 +75,7 @@ #ifndef QT3 engine::getMainWindow()->workspace()->addWindow( m_effWidget ); #endif + m_effWidget->setWindowTitle( _initial_name ); m_effWidget->setFixedSize( 240, 242 ); m_effWidget->hide(); connect( m_effWidget, SIGNAL( closed() ), @@ -103,6 +104,7 @@ void FASTCALL effectLabel::setText( const QString & _text ) { m_label->setText( _text ); + m_effWidget->setWindowTitle( _text ); } Index: src/core/mixer.cpp =================================================================== --- src/core/mixer.cpp (Revision 565) +++ src/core/mixer.cpp (Revision 566) @@ -380,11 +380,10 @@ } } - - emit nextAudioBuffer( m_readBuf, m_framesPerPeriod ); - unlock(); + emit nextAudioBuffer(); + // and trigger LFOs envelopeAndLFOWidget::triggerLFO();