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

Method setWaveToUser

src/gui/widgets/Graph.cpp:581–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579};
580
581QString graphModel::setWaveToUser()
582{
583 SampleBuffer * sampleBuffer = new SampleBuffer;
584 QString fileName = sampleBuffer->openAndSetWaveformFile();
585 if( fileName.isEmpty() == false )
586 {
587 sampleBuffer->dataReadLock();
588 for( int i = 0; i < length(); i++ )
589 {
590 m_samples[i] = sampleBuffer->userWaveSample(
591 i / static_cast<float>( length() ) );
592 }
593 sampleBuffer->dataUnlock();
594 }
595
596 sharedObject::unref( sampleBuffer );
597
598 emit samplesChanged( 0, length() - 1 );
599 return fileName;
600};
601
602
603

Callers 3

loadClickedMethod · 0.80
usrWaveClickedMethod · 0.80
usrWaveClickedMethod · 0.80

Calls 3

lengthFunction · 0.50
isEmptyMethod · 0.45

Tested by

no test coverage detected