| 351 | } |
| 352 | |
| 353 | void ArcSpectrogram::loadWaveformBuffer(juce::AudioBuffer<float>* audioBuffer) { |
| 354 | if (audioBuffer == nullptr) return; |
| 355 | waitForThreadToExit(BUFFER_PROCESS_TIMEOUT); |
| 356 | if (mImagesComplete[ParamUI::SpecType::WAVEFORM]) return; |
| 357 | |
| 358 | mParameters.ui.specType = ParamUI::SpecType::WAVEFORM; |
| 359 | mBuffers[mParameters.ui.specType] = audioBuffer; |
| 360 | |
| 361 | // Only make image if component size has been set |
| 362 | if (getWidth() > 0 && getHeight() > 0) { |
| 363 | mIsProcessing = true; |
| 364 | startThread(); |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | // loadSpecBuffer is never called when a preset is loaded |
| 369 | void ArcSpectrogram::loadPreset() { |
no outgoing calls
no test coverage detected