diff --git a/src/core/SampleClip.cpp b/src/core/SampleClip.cpp index 1d173d78e..6396d49f3 100644 --- a/src/core/SampleClip.cpp +++ b/src/core/SampleClip.cpp @@ -292,15 +292,15 @@ void SampleClip::loadSettings( const QDomElement & _this ) if( sampleFile().isEmpty() && _this.hasAttribute( "data" ) ) { m_sampleBuffer->loadFromBase64( _this.attribute( "data" ) ); + if (_this.hasAttribute("sample_rate")) + { + m_sampleBuffer->setSampleRate(_this.attribute("sample_rate").toInt()); + } } changeLength( _this.attribute( "len" ).toInt() ); setMuted( _this.attribute( "muted" ).toInt() ); setStartTimeOffset( _this.attribute( "off" ).toInt() ); - if ( _this.hasAttribute( "sample_rate" ) ) { - m_sampleBuffer->setSampleRate( _this.attribute( "sample_rate" ).toInt() ); - } - if( _this.hasAttribute( "color" ) ) { useCustomClipColor( true );