Bugfix - SampleTrack -> Load & Save: Fix recorded sample track not being
played correctly after saving and loading a project due to sample rate not getting saved in the project file.
This commit is contained in:
@@ -260,6 +260,8 @@ void SampleTCO::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
QString s;
|
||||
_this.setAttribute( "data", m_sampleBuffer->toBase64( s ) );
|
||||
}
|
||||
|
||||
_this.setAttribute ("sample_rate", m_sampleBuffer->sampleRate());
|
||||
// TODO: start- and end-frame
|
||||
}
|
||||
|
||||
@@ -279,6 +281,10 @@ void SampleTCO::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
changeLength( _this.attribute( "len" ).toInt() );
|
||||
setMuted( _this.attribute( "muted" ).toInt() );
|
||||
|
||||
if (_this.hasAttribute("sample_rate")) {
|
||||
m_sampleBuffer->setSampleRate(_this.attribute("sample_rate").toInt());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user