load and save/load sample-data which doesn't come from sample in/from XML-node (base64-encoded)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@39 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2005-12-19 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
* src/tracks/sample_track.cpp:
|
||||
load and save/load sample-data which doesn't come from sample in/from
|
||||
XML-node (base64-encoded)
|
||||
|
||||
2005-12-18 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
|
||||
* src/tracks/pattern.cpp:
|
||||
|
||||
@@ -249,6 +249,10 @@ void FASTCALL sampleTCO::saveSettings( QDomDocument & _doc,
|
||||
}
|
||||
sampletco_de.setAttribute( "len", QString::number( length() ) );
|
||||
sampletco_de.setAttribute( "src", sampleFile() );
|
||||
if( sampleFile() == "" )
|
||||
{
|
||||
sampletco_de.setAttribute( "data", m_sampleBuffer.toBase64() );
|
||||
}
|
||||
// TODO: start- and end-frame
|
||||
_parent.appendChild( sampletco_de );
|
||||
}
|
||||
@@ -262,8 +266,12 @@ void FASTCALL sampleTCO::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
movePosition( _this.attribute( "pos" ).toInt() );
|
||||
}
|
||||
changeLength( _this.attribute( "len" ).toInt() );
|
||||
setSampleFile( _this.attribute( "src" ) );
|
||||
if( sampleFile() == "" )
|
||||
{
|
||||
m_sampleBuffer.loadFromBase64( _this.attribute( "data" ) );
|
||||
}
|
||||
changeLength( _this.attribute( "len" ).toInt() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user