MCPcopy Create free account
hub / github.com/LMMS/lmms / loadSettings

Method loadSettings

src/tracks/SampleTrack.cpp:271–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270
271void SampleTCO::loadSettings( const QDomElement & _this )
272{
273 if( _this.attribute( "pos" ).toInt() >= 0 )
274 {
275 movePosition( _this.attribute( "pos" ).toInt() );
276 }
277 setSampleFile( _this.attribute( "src" ) );
278 if( sampleFile().isEmpty() && _this.hasAttribute( "data" ) )
279 {
280 m_sampleBuffer->loadFromBase64( _this.attribute( "data" ) );
281 }
282 changeLength( _this.attribute( "len" ).toInt() );
283 setMuted( _this.attribute( "muted" ).toInt() );
284
285 if (_this.hasAttribute("sample_rate")) {
286 m_sampleBuffer->setSampleRate(_this.attribute("sample_rate").toInt());
287 }
288}
289
290
291

Callers 1

Calls 3

loadFromBase64Method · 0.80
isEmptyMethod · 0.45
setSampleRateMethod · 0.45

Tested by

no test coverage detected