MCPcopy Create free account
hub / github.com/audacity/audacity / FindSpectralData

Function FindSpectralData

src/SpectralDataManager.cpp:37–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36namespace {
37const std::shared_ptr<SpectralData> FindSpectralData(Channel *pChannel)
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}
54}
55
56bool SpectralDataManager::ProcessTracks(AudacityProject &project){

Callers 1

ProcessTracksMethod · 0.85

Calls 6

GetFunction · 0.85
GetAllSubViewsMethod · 0.80
GetSpectralDataMethod · 0.80
IsSpectralMethod · 0.45
getMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected