Audacity 3.2.0
Functions
anonymous_namespace{SpectralDataManager.cpp} Namespace Reference

Functions

const std::shared_ptr< SpectralDataFindSpectralData (Channel *pChannel)
 

Function Documentation

◆ FindSpectralData()

const std::shared_ptr< SpectralData > anonymous_namespace{SpectralDataManager.cpp}::FindSpectralData ( Channel pChannel)

Definition at line 37 of file SpectralDataManager.cpp.

38{
39 auto &view = ChannelView::Get(*pChannel);
40 if (auto waveChannelViewPtr = dynamic_cast<WaveChannelView*>(&view)){
41 for (const auto &subViewPtr : waveChannelViewPtr->GetAllSubViews()){
42 if (subViewPtr->IsSpectral()) {
43 auto sView =
44 std::static_pointer_cast<SpectrumView>(subViewPtr).get();
45 const auto pData = sView->GetSpectralData();
46 if (!pData->dataHistory.empty()) {
47 return pData;
48 }
49 }
50 }
51 }
52 return {};
53}
static ChannelView & Get(Channel &channel)

References ChannelView::Get().

Referenced by SpectralDataManager::ProcessTracks().

Here is the call graph for this function:
Here is the caller graph for this function: