| 232 | |
| 233 | |
| 234 | void 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 |
nothing calls this directly
no test coverage detected