Audacity 3.2.0
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
WaveTrackControls.cpp File Reference
#include "WaveTrackControls.h"
#include "../../ui/PlayableTrackButtonHandles.h"
#include "WaveTrackSliderHandles.h"
#include "WaveChannelView.h"
#include "WaveChannelViewConstants.h"
#include "AudioIOBase.h"
#include "../../../../CellularPanel.h"
#include "Project.h"
#include "ProjectAudioIO.h"
#include "ProjectHistory.h"
#include "../../../../ProjectWindows.h"
#include "../../../../RefreshCode.h"
#include "ShuttleGui.h"
#include "SyncLock.h"
#include "Theme.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanel.h"
#include "TrackFocus.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "WaveClip.h"
#include "WaveTrack.h"
#include "WaveTrackUtilities.h"
#include "RealtimeEffectManager.h"
#include "../../../../prefs/PrefsDialog.h"
#include "../../../../prefs/ThemePrefs.h"
#include "AudacityMessageBox.h"
#include "ProgressDialog.h"
#include "UserException.h"
#include "Identifier.h"
#include <wx/app.h>
#include <wx/combobox.h>
#include <wx/frame.h>
#include <wx/sizer.h>
#include "MixAndRender.h"
#include "../../../../widgets/ASlider.h"
#include "../../../ui/CommonTrackInfo.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "ViewInfo.h"
Include dependency graph for WaveTrackControls.cpp:

Go to the source code of this file.

Classes

struct  FormatMenuTable
 
struct  RateMenuTable
 
struct  WaveTrackMenuTable
 
struct  WaveTrackTCPLines
 

Namespaces

namespace  anonymous_namespace{WaveTrackControls.cpp}
 

Typedefs

using anonymous_namespace{WaveTrackControls.cpp}::ValueFinder = std::function< int(WaveTrack &) >
 
using TCPLine = TrackInfo::TCPLine
 
using DoGetWaveTrackControls = DoGetControls::Override< WaveTrack >
 
using GetDefaultWaveTrackHeight = GetDefaultTrackHeight::Override< WaveChannel >
 

Enumerations

enum  {
  reserveDisplays = 100 , OnRate8ID = 30000 , OnRate11ID , OnRate16ID ,
  OnRate22ID , OnRate44ID , OnRate48ID , OnRate88ID ,
  OnRate96ID , OnRate176ID , OnRate192ID , OnRate352ID ,
  OnRate384ID , OnRateOtherID , On16BitID , On24BitID ,
  OnFloatID , OnMultiViewID , OnSetDisplayId , lastDisplayId = (OnSetDisplayId + reserveDisplays - 1) ,
  OnChannelLeftID , OnChannelRightID , OnChannelMonoID , OnMergeStereoID ,
  OnSwapChannelsID , OnSplitStereoID , OnSplitStereoMonoID , ChannelMenuID ,
  FirstAttachedItemId
}
 

Functions

template<typename Table >
PopupMenuTableEntry::InitFunction anonymous_namespace{WaveTrackControls.cpp}::initFn (const ValueFinder &findValue)
 
 AppendRadioItem ("16Bit", On16BitID, GetSampleFormatStr(int16Sample), POPUP_MENU_FN(OnFormatChange), fn)
 
 AppendRadioItem ("24Bit", On24BitID, GetSampleFormatStr(int24Sample), POPUP_MENU_FN(OnFormatChange), fn)
 
 AppendRadioItem ("Float", OnFloatID, GetSampleFormatStr(floatSample), POPUP_MENU_FN(OnFormatChange), fn)
 
 AppendCheckItem ("8000", OnRate8ID, XXO("8000 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("11025", OnRate11ID, XXO("11025 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("16000", OnRate16ID, XXO("16000 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("22050", OnRate22ID, XXO("22050 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("44100", OnRate44ID, XXO("44100 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("48000", OnRate48ID, XXO("48000 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("88200", OnRate88ID, XXO("88200 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("96000", OnRate96ID, XXO("96000 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("176400", OnRate176ID, XXO("176400 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("192000", OnRate192ID, XXO("192000 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("352800", OnRate352ID, XXO("352800 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("384000", OnRate384ID, XXO("384000 Hz"), POPUP_MENU_FN(OnRateChange), fn)
 
 AppendCheckItem ("Other", OnRateOtherID, XXO("&Other..."), POPUP_MENU_FN(OnRateOther), fn)
 
static std::vector< WaveChannelSubViewTypeAllTypes ()
 
 BeginSection ("SubViews")
 
 Append (Adapt< My >([](My &table) { return(WaveChannelSubViews::numFactories() > 1) ? std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table, [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveChannelView::GetFirst(track);menu.Check(id, view.GetMultiView());}) :nullptr;}))
 
 for (const auto &type :AllTypes())
 
 BeginSection ("Extra")
 
 EndSection ()
 
 BeginSection ("Channels")
 
 AppendItem ("MakeStereo", OnMergeStereoID, XXO("Ma&ke Stereo Track"), POPUP_MENU_FN(OnMergeStereo), [](PopupMenuHandler &handler, wxMenu &menu, int id){ bool canMakeStereo=!isUnsafe(handler) &&isMono(handler);if(canMakeStereo) { AudacityProject &project=static_cast< WaveTrackMenuTable & >(handler).mpData->project;auto &tracks=TrackList::Get(project);auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();auto next= *++tracks.Find(&track);canMakeStereo=(next &&next->NChannels()==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);})
 
 AppendItem ("Swap", OnSwapChannelsID, XXO("Swap Stereo &Channels"), POPUP_MENU_FN(OnSwapChannels), [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &track=static_cast< WaveTrackMenuTable & >(handler).FindWaveTrack();bool isStereo=2==track.NChannels();menu.Enable(id, isStereo &&!isUnsafe(handler));})
 
 AppendItem ("Split", OnSplitStereoID, XXO("Spl&it Stereo Track"), POPUP_MENU_FN(OnSplitStereo), enableSplitStereo)
 
 AppendItem ("SplitToMono", OnSplitStereoMonoID, XXO("Split Stereo to Mo&no"), POPUP_MENU_FN(OnSplitStereoMono), enableSplitStereo)
 
 BeginSection ("Format")
 
 BeginSection ("Rate")
 
WaveTrackPopupMenuTableGetWaveTrackMenuTable ()
 
void anonymous_namespace{WaveTrackControls.cpp}::SliderDrawFunction (LWSlider *(*Selector)(const wxRect &sliderRect, const WaveTrack *t, bool captured, wxWindow *), wxDC *dc, const wxRect &rect, const Track *pTrack, wxWindow *pParent, bool captured, bool highlight)
 
void anonymous_namespace{WaveTrackControls.cpp}::PanSliderDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
void anonymous_namespace{WaveTrackControls.cpp}::VolumeSliderDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (DoGetWaveTrackControls)
 
 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (GetDefaultWaveTrackHeight)
 

Variables

static const auto fn
 
const int nRates = 12
 
static int gRates [nRates]
 
static const auto MenuPathStart = wxT("WaveTrackMenu")
 
static const auto isMono
 
static const auto isUnsafe
 
int id = OnSetDisplayId
 
static const auto enableSplitStereo
 
WaveTrackTCPLines waveTrackTCPLines
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gVolumeCaptured
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gPanCaptured
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gVolume
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gPan
 

Typedef Documentation

◆ DoGetWaveTrackControls

Definition at line 1160 of file WaveTrackControls.cpp.

◆ GetDefaultWaveTrackHeight

Definition at line 1167 of file WaveTrackControls.cpp.

◆ TCPLine

Definition at line 1003 of file WaveTrackControls.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
reserveDisplays 
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnMultiViewID 
OnSetDisplayId 
lastDisplayId 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 
FirstAttachedItemId 

Definition at line 101 of file WaveTrackControls.cpp.

101 {
102 reserveDisplays = 100,
103
104 OnRate8ID = 30000, // <---
105 OnRate11ID, // |
106 OnRate16ID, // |
107 OnRate22ID, // |
108 OnRate44ID, // |
109 OnRate48ID, // | Leave these in order
110 OnRate88ID, // |
111 OnRate96ID, // |
112 OnRate176ID, // |
113 OnRate192ID, // |
114 OnRate352ID, // |
115 OnRate384ID, // |
116 OnRateOtherID, // |
117 // |
118 On16BitID, // |
119 On24BitID, // |
120 OnFloatID, // <---
121
123
125
129
131
135
137
138 // Range of ids for registered items -- keep this last!
140};
@ OnRate16ID
@ OnRate352ID
@ On16BitID
@ OnMultiViewID
@ OnChannelRightID
@ OnRate176ID
@ OnRate88ID
@ OnFloatID
@ ChannelMenuID
@ OnRate192ID
@ OnSplitStereoMonoID
@ OnRate48ID
@ OnMergeStereoID
@ reserveDisplays
@ OnRate384ID
@ OnRate44ID
@ OnRateOtherID
@ OnSplitStereoID
@ lastDisplayId
@ On24BitID
@ OnRate22ID
@ OnSetDisplayId
@ OnChannelLeftID
@ OnChannelMonoID
@ OnRate8ID
@ OnRate96ID
@ OnSwapChannelsID
@ FirstAttachedItemId
@ OnRate11ID

Function Documentation

◆ AllTypes()

static std::vector< WaveChannelSubViewType > AllTypes ( )
static

Definition at line 540 of file WaveTrackControls.cpp.

541{
542 auto result = WaveChannelSubViewType::All();
543 if (result.size() > reserveDisplays) {
544 wxASSERT( false );
545 result.resize(reserveDisplays);
546 }
547 return result;
548}
static const std::vector< WaveChannelSubViewType > & All()
Discover all registered types.

References WaveChannelSubViewType::All(), and reserveDisplays.

Referenced by for(), and WaveTrackMenuTable::OnSetDisplay().

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

◆ Append()

Append ( Adapt< My >  [](My &table) { return(WaveChannelSubViews::numFactories() > 1) ? std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table,[](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveChannelView::GetFirst(track);menu.Check(id, view.GetMultiView());}) :nullptr;})

References WaveChannelView::GetFirst(), audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::numFactories(), OnMultiViewID, POPUP_MENU_FN, and XXO().

Referenced by for(), and XMLStringWriter::Write().

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

◆ AppendCheckItem() [1/13]

AppendCheckItem ( "11025"  ,
OnRate11ID  ,
XXO("11025 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [2/13]

AppendCheckItem ( "16000"  ,
OnRate16ID  ,
XXO("16000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [3/13]

AppendCheckItem ( "176400"  ,
OnRate176ID  ,
XXO("176400 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [4/13]

AppendCheckItem ( "192000"  ,
OnRate192ID  ,
XXO("192000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [5/13]

AppendCheckItem ( "22050"  ,
OnRate22ID  ,
XXO("22050 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [6/13]

AppendCheckItem ( "352800"  ,
OnRate352ID  ,
XXO("352800 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [7/13]

AppendCheckItem ( "384000"  ,
OnRate384ID  ,
XXO("384000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [8/13]

AppendCheckItem ( "44100"  ,
OnRate44ID  ,
XXO("44100 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [9/13]

AppendCheckItem ( "48000"  ,
OnRate48ID  ,
XXO("48000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [10/13]

AppendCheckItem ( "8000"  ,
OnRate8ID  ,
XXO("8000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [11/13]

AppendCheckItem ( "88200"  ,
OnRate88ID  ,
XXO("88200 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [12/13]

AppendCheckItem ( "96000"  ,
OnRate96ID  ,
XXO("96000 Hz")  ,
POPUP_MENU_FN(OnRateChange)  ,
fn   
)

◆ AppendCheckItem() [13/13]

AppendCheckItem ( "Other"  ,
OnRateOtherID  ,
XXO("&Other...")  ,
POPUP_MENU_FN(OnRateOther)  ,
fn   
)

◆ AppendItem() [1/4]

AppendItem ( "MakeStereo"  ,
OnMergeStereoID  ,
XXO("Ma&ke Stereo Track")  ,
POPUP_MENU_FN(OnMergeStereo)  ,
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ bool canMakeStereo=!isUnsafe(handler) &&isMono(handler);if(canMakeStereo) { AudacityProject &project=static_cast< WaveTrackMenuTable & >(handler).mpData->project;auto &tracks=TrackList::Get(project);auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();auto next= *++tracks.Find(&track);canMakeStereo=(next &&next->NChannels()==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);}   
)

References TrackList::Get(), audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, isMono, isUnsafe, project, and tracks.

Here is the call graph for this function:

◆ AppendItem() [2/4]

AppendItem ( "Split"  ,
OnSplitStereoID  ,
XXO("Spl&it Stereo Track")  ,
POPUP_MENU_FN(OnSplitStereo)  ,
enableSplitStereo   
)

◆ AppendItem() [3/4]

AppendItem ( "SplitToMono"  ,
OnSplitStereoMonoID  ,
XXO("Split Stereo to Mo&no")  ,
POPUP_MENU_FN(OnSplitStereoMono)  ,
enableSplitStereo   
)

◆ AppendItem() [4/4]

AppendItem ( "Swap"  ,
OnSwapChannelsID  ,
XXO("Swap Stereo &Channels")  ,
POPUP_MENU_FN(OnSwapChannels)  ,
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ auto &track=static_cast< WaveTrackMenuTable & >(handler).FindWaveTrack();bool isStereo=2==track.NChannels();menu.Enable(id, isStereo &&!isUnsafe(handler));}   
)

References audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, isUnsafe, and WaveTrack::NChannels().

Here is the call graph for this function:

◆ AppendRadioItem() [1/3]

AppendRadioItem ( "16Bit"  ,
On16BitID  ,
GetSampleFormatStr(int16Sample)  ,
POPUP_MENU_FN(OnFormatChange)  ,
fn   
)

◆ AppendRadioItem() [2/3]

AppendRadioItem ( "24Bit"  ,
On24BitID  ,
GetSampleFormatStr(int24Sample)  ,
POPUP_MENU_FN(OnFormatChange)  ,
fn   
)

◆ AppendRadioItem() [3/3]

AppendRadioItem ( "Float"  ,
OnFloatID  ,
GetSampleFormatStr(floatSample)  ,
POPUP_MENU_FN(OnFormatChange)  ,
fn   
)

◆ BeginSection() [1/5]

BeginSection ( "Channels"  )

◆ BeginSection() [2/5]

BeginSection ( "Extra"  )

◆ BeginSection() [3/5]

BeginSection ( "Format"  )

◆ BeginSection() [4/5]

BeginSection ( "Rate"  )

◆ BeginSection() [5/5]

BeginSection ( "SubViews"  )

◆ DEFINE_ATTACHED_VIRTUAL_OVERRIDE() [1/2]

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( DoGetWaveTrackControls  )

Definition at line 1161 of file WaveTrackControls.cpp.

1161 {
1162 return [](WaveTrack &track) {
1163 return std::make_shared<WaveTrackControls>( track.SharedPointer() );
1164 };
1165}
A Track that contains audio waveform data.
Definition: WaveTrack.h:203

References Track::SharedPointer().

Here is the call graph for this function:

◆ DEFINE_ATTACHED_VIRTUAL_OVERRIDE() [2/2]

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( GetDefaultWaveTrackHeight  )

Definition at line 1168 of file WaveTrackControls.cpp.

1168 {
1169 return [](WaveChannel &) {
1171 };
1172}
static unsigned DefaultWaveTrackHeight()

References WaveTrackControls::DefaultWaveTrackHeight().

Here is the call graph for this function:

◆ EndSection()

EndSection ( )

◆ for()

for ( const auto &type   :AllTypes())

Definition at line 589 of file WaveTrackControls.cpp.

589 : AllTypes() ) {
590 static const auto initFn = []( bool radio ){ return
591 [radio]( PopupMenuHandler &handler, wxMenu &menu, int id ){
592 // Find all known sub-view types
593 const auto allTypes = AllTypes();
594
595 // How to convert a type to a menu item id
596 const auto IdForType =
597 [&allTypes](const WaveChannelSubViewType &type) -> int {
598 const auto begin = allTypes.begin();
599 return OnSetDisplayId +
600 (std::find(begin, allTypes.end(), type) - begin);
601 };
602
603 auto &table = static_cast< WaveTrackMenuTable& >( handler );
604 auto &track = table.FindWaveTrack();
605
606 const auto &view = WaveChannelView::GetFirst(track);
607
608 const auto displays = view.GetDisplays();
609 const auto end = displays.end();
610 bool check = (end !=
611 std::find_if(displays.begin(), end,
612 [&](const WaveChannelSubViewType &type){
613 return id == IdForType(type); }));
614 menu.Check( id, check );
615
616 // Bug2275 residual
617 // Disable the checking-off of the only sub-view
618 if ( !radio && displays.size() == 1 && check )
619 menu.Enable( id, false );
620 };
621 };
622 Append(Adapt<My>([type, id](My &table) {
623 const auto pTrack = &table.FindWaveTrack();
624 const auto &view = WaveChannelView::GetFirst(*pTrack);
625 const auto itemType =
626 view.GetMultiView() ? Entry::CheckItem : Entry::RadioItem;
627 return std::make_unique<Entry>( type.name.Internal(), itemType,
628 id, type.name.Msgid(),
629 POPUP_MENU_FN( OnSetDisplay ), table,
630 initFn( !view.GetMultiView() ) );
631 }));
632 ++id;
633 }
#define POPUP_MENU_FN(memFn)
Append(Adapt< My >([](My &table) { return(WaveChannelSubViews::numFactories() > 1) ? std::make_unique< Entry >("MultiView", Entry::CheckItem, OnMultiViewID, XXO("&Multi-view"), POPUP_MENU_FN(OnMultiView), table, [](PopupMenuHandler &handler, wxMenu &menu, int id){ auto &table=static_cast< WaveTrackMenuTable & >(handler);auto &track=table.FindWaveTrack();const auto &view=WaveChannelView::GetFirst(track);menu.Check(id, view.GetMultiView());}) :nullptr;}))
static std::vector< WaveChannelSubViewType > AllTypes()
int id
static WaveChannelView & GetFirst(WaveTrack &wt)
Get the view of the first channel.
PopupMenuTableEntry::InitFunction initFn(const ValueFinder &findValue)
const char * end(const char *str) noexcept
Definition: StringUtils.h:106
const char * begin(const char *str) noexcept
Definition: StringUtils.h:101
WaveTrack & FindWaveTrack() const

References AllTypes(), Append(), details::begin(), details::end(), WaveChannelView::GetFirst(), audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, id, anonymous_namespace{WaveTrackControls.cpp}::initFn(), OnSetDisplayId, and POPUP_MENU_FN.

Here is the call graph for this function:

◆ GetWaveTrackMenuTable()

WaveTrackPopupMenuTable & GetWaveTrackMenuTable ( )

Definition at line 938 of file WaveTrackControls.cpp.

939{
941}
static WaveTrackMenuTable & Instance()

References WaveTrackMenuTable::Instance().

Here is the call graph for this function:

Variable Documentation

◆ enableSplitStereo

const auto enableSplitStereo
static
Initial value:
=
[]( PopupMenuHandler &handler, wxMenu &menu, int id ){
menu.Enable( id, !isMono( handler ) && !isUnsafe( handler ) );
}
static const auto isMono
static const auto isUnsafe

Definition at line 670 of file WaveTrackControls.cpp.

◆ fn

static const auto fn
static
Initial value:
= initFn< FormatMenuTable >(
[]( WaveTrack &track ){
return IdOfFormat( track.GetSampleFormat() );
}
)
sampleFormat GetSampleFormat() const override
Definition: WaveTrack.cpp:918

Definition at line 197 of file WaveTrackControls.cpp.

◆ gRates

int gRates[nRates]
static
Initial value:
= { 8000, 11025, 16000, 22050, 44100, 48000, 88200, 96000,
176400, 192000, 352800, 384000 }

gRates MUST CORRESPOND DIRECTLY TO THE RATES AS LISTED IN THE MENU!! IN THE SAME ORDER!!

Definition at line 366 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate(), and RateMenuTable::OnRateChange().

◆ id

int id = OnSetDisplayId

Definition at line 588 of file WaveTrackControls.cpp.

Referenced by TranscriptionToolBar::AddButton(), SelectionBar::AddTime(), MacrosWindow::ChangeOK(), audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::CollectHashes(), PluginManager::ConvertID(), PluginManager::CreatePlugin(), CreateStdButtonSizer(), CurrentSettingsGroup(), ProjectSerializer::Decode(), anonymous_namespace{PluginHost.cpp}::Discover(), SqliteSampleBlockFactory::DoCreateFromId(), SqliteSampleBlockFactory::DoCreateSilent(), DistortionBase::DoLoadFactoryPreset(), PendingTracks::DoSubstituteOriginalChannel(), PendingTracks::DoSubstitutePendingChangedChannel(), PluginManager::DropFile(), FactoryDefaultsGroup(), for(), EffectDefinitionInterface::GetSquashedName(), CommandManager::HandleMenuID(), ShuttleGui::Id(), anonymous_namespace{WaveTrackControls.cpp}::initFn(), ModuleManager::InitializeBuiltins(), AudacityApp::InitPart2(), ReverbBase::LoadFactoryPreset(), EffectCompressor::LoadFactoryPreset(), EffectLimiter::LoadFactoryPreset(), AudioUnitInstance::MakeMessage(), ToolBarButtons::OnButton(), WaveTrackMenuTable::OnSetDisplay(), AudioUnitUtils::ParameterNameInfo::ParameterNameInfo(), anonymous_namespace{VST3Wrapper.cpp}::ParametersFromString(), anonymous_namespace{VST3Wrapper.cpp}::ComponentHandler::performEdit(), Scrubber::PopulatePopupMenu(), ToolBarButtons::PopUp(), ToolBarButtons::PushDown(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_get_length(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_get_pos(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_push_back_byte(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_read_bytes(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Importer::raw_set_pos_rel(), AudioSetupToolBar::Choices::Set(), SingleInputParameterValue::Set(), ToolBarButtons::SetEnabled(), RealtimeEffectState::SetID(), Track::SetId(), LWSlider::SetId(), TEST_CASE(), DirectoriesPrefs::Validate(), audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::VisitBlocks(), VST3Editor::VST3Editor(), VSTMessage::VSTMessage(), audacity::cloud::audiocom::sync::anonymous_namespace{WavPackCompressor.cpp}::Exporter::WriteBlock(), WavPackExportProcessor::WriteBlock(), and ProjectSerializer::WriteName().

◆ isMono

const auto isMono
static
Initial value:
=
[]( PopupMenuHandler &handler ) -> bool {
auto &track =
static_cast< WaveTrackMenuTable& >( handler ).FindWaveTrack();
return 1 == track.NChannels();
}

Definition at line 552 of file WaveTrackControls.cpp.

Referenced by AppendItem().

◆ isUnsafe

const auto isUnsafe
static
Initial value:
=
[]( PopupMenuHandler &handler ) -> bool {
auto &project =
static_cast< WaveTrackMenuTable& >( handler ).mpData->project;
}
const auto project
bool IsAudioActive() const
static ProjectAudioIO & Get(AudacityProject &project)
static RealtimeEffectManager & Get(AudacityProject &project)
bool IsActive() const noexcept
To be called only from main thread.

Definition at line 559 of file WaveTrackControls.cpp.

Referenced by AppendItem().

◆ MenuPathStart

const auto MenuPathStart = wxT("WaveTrackMenu")
static

◆ nRates

const int nRates = 12

Definition at line 362 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate().

◆ waveTrackTCPLines

WaveTrackTCPLines waveTrackTCPLines
static