diff --git a/ChangeLog b/ChangeLog index 1f93ca95f..db4b05497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-19 Tobias Doerffel + + * 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 * src/tracks/pattern.cpp: diff --git a/src/tracks/sample_track.cpp b/src/tracks/sample_track.cpp index d000e0bf0..3780fbf17 100644 --- a/src/tracks/sample_track.cpp +++ b/src/tracks/sample_track.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() ); }