Collect error for non existing samples

This commit is contained in:
Amadeus Folego
2015-01-08 16:13:15 -02:00
parent 86d7e24eb1
commit d5c9b78178
18 changed files with 76 additions and 0 deletions

View File

@@ -234,6 +234,14 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
if( _this.attribute( "src" ) != "" )
{
setAudioFile( _this.attribute( "src" ), false );
QString absolutePath = m_sampleBuffer.tryToMakeAbsolute( m_sampleBuffer.audioFile() );
if ( !QFileInfo( absolutePath ).exists() )
{
QString message = tr( "Sample not found: %1" ).arg( m_sampleBuffer.audioFile() );
Engine::getSong()->collectError( message );
}
}
else if( _this.attribute( "sampledata" ) != "" )
{