Merge pull request #219 from diizy/stable-0.4
Sfxr logo, custom waveforms
This commit is contained in:
@@ -198,6 +198,7 @@ void LfoController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
m_phaseModel.saveSettings( _doc, _this, "phase" );
|
||||
m_waveModel.saveSettings( _doc, _this, "wave" );
|
||||
m_multiplierModel.saveSettings( _doc, _this, "multiplier" );
|
||||
_this.setAttribute( "userwavefile" , m_userDefSampleBuffer->audioFile() );
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +213,7 @@ void LfoController::loadSettings( const QDomElement & _this )
|
||||
m_phaseModel.loadSettings( _this, "phase" );
|
||||
m_waveModel.loadSettings( _this, "wave" );
|
||||
m_multiplierModel.loadSettings( _this, "multiplier" );
|
||||
m_userDefSampleBuffer->setAudioFile( _this.attribute("userwavefile" ) );
|
||||
|
||||
updateSampleFunction();
|
||||
}
|
||||
|
||||
@@ -908,6 +908,27 @@ QString SampleBuffer::openAndSetAudioFile()
|
||||
}
|
||||
|
||||
|
||||
QString SampleBuffer::openAndSetWaveformFile()
|
||||
{
|
||||
if( m_audioFile.isEmpty() )
|
||||
{
|
||||
m_audioFile = configManager::inst()->factorySamplesDir() + "waveforms/10saw.flac";
|
||||
}
|
||||
|
||||
QString fileName = this->openAudioFile();
|
||||
|
||||
if(!fileName.isEmpty())
|
||||
{
|
||||
this->setAudioFile( fileName );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_audioFile = "";
|
||||
}
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#undef LMMS_HAVE_FLAC_STREAM_ENCODER_H /* not yet... */
|
||||
|
||||
@@ -252,7 +252,7 @@ void LfoControllerDialog::askUserDefWave()
|
||||
{
|
||||
SampleBuffer * sampleBuffer = dynamic_cast<LfoController*>(this->model())->
|
||||
m_userDefSampleBuffer;
|
||||
QString fileName = sampleBuffer->openAndSetAudioFile();
|
||||
QString fileName = sampleBuffer->openAndSetWaveformFile();
|
||||
if( fileName.isEmpty() == false )
|
||||
{
|
||||
// TODO:
|
||||
|
||||
@@ -485,7 +485,7 @@ void graphModel::setWaveToNoise()
|
||||
QString graphModel::setWaveToUser()
|
||||
{
|
||||
SampleBuffer * sampleBuffer = new SampleBuffer;
|
||||
QString fileName = sampleBuffer->openAndSetAudioFile();
|
||||
QString fileName = sampleBuffer->openAndSetWaveformFile();
|
||||
if( fileName.isEmpty() == false )
|
||||
{
|
||||
for( int i = 0; i < length(); i++ )
|
||||
|
||||
Reference in New Issue
Block a user