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

Method loadSettings

plugins/audio_file_processor/audio_file_processor.cpp:234–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232
233
234void audioFileProcessor::loadSettings( const QDomElement & _this )
235{
236 if( _this.attribute( "src" ) != "" )
237 {
238 setAudioFile( _this.attribute( "src" ), false );
239
240 QString absolutePath = m_sampleBuffer.tryToMakeAbsolute( m_sampleBuffer.audioFile() );
241 if ( !QFileInfo( absolutePath ).exists() )
242 {
243 QString message = tr( "Sample not found: %1" ).arg( m_sampleBuffer.audioFile() );
244
245 Engine::getSong()->collectError( message );
246 }
247 }
248 else if( _this.attribute( "sampledata" ) != "" )
249 {
250 m_sampleBuffer.loadFromBase64( _this.attribute( "srcdata" ) );
251 }
252
253 m_loopModel.loadSettings( _this, "looped" );
254 m_ampModel.loadSettings( _this, "amp" );
255 m_endPointModel.loadSettings( _this, "eframe" );
256 m_startPointModel.loadSettings( _this, "sframe" );
257
258 // compat code for not having a separate loopback point
259 if (_this.hasAttribute("lframe") || !(_this.firstChildElement("lframe").isNull()))
260 {
261 m_loopPointModel.loadSettings( _this, "lframe" );
262 }
263 else
264 {
265 m_loopPointModel.loadSettings( _this, "sframe" );
266 }
267
268 m_reverseModel.loadSettings( _this, "reversed" );
269
270 m_stutterModel.loadSettings( _this, "stutter" );
271 if( _this.hasAttribute( "interp" ) )
272 {
273 m_interpolationModel.loadSettings( _this, "interp" );
274 }
275 else
276 {
277 m_interpolationModel.setValue( 1 ); //linear by default
278 }
279
280 pointChanged();
281}
282
283
284

Callers

nothing calls this directly

Calls 7

getSongFunction · 0.85
tryToMakeAbsoluteMethod · 0.80
existsMethod · 0.80
collectErrorMethod · 0.80
loadFromBase64Method · 0.80
isNullMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected