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 "WaveTrack.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< WaveTrack >
 

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::Get(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 &&TrackList::NChannels(*next)==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==TrackList::NChannels(track);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}::GainSliderDrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
void anonymous_namespace{WaveTrackControls.cpp}::StatusDrawFunction (const TranslatableString &string, wxDC *dc, const wxRect &rect)
 
void anonymous_namespace{WaveTrackControls.cpp}::Status1DrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
void anonymous_namespace{WaveTrackControls.cpp}::Status2DrawFunction (TrackPanelDrawingContext &context, const wxRect &rect, const Track *pTrack)
 
 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (DoGetWaveTrackControls)
 

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}::gGainCaptured
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gPanCaptured
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gGain
 
std::unique_ptr< LWSlideranonymous_namespace{WaveTrackControls.cpp}::gPan
 

Typedef Documentation

◆ DoGetWaveTrackControls

Definition at line 1226 of file WaveTrackControls.cpp.

◆ GetDefaultWaveTrackHeight

Definition at line 1233 of file WaveTrackControls.cpp.

◆ TCPLine

Definition at line 1065 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 99 of file WaveTrackControls.cpp.

99 {
100 reserveDisplays = 100,
101
102 OnRate8ID = 30000, // <---
103 OnRate11ID, // |
104 OnRate16ID, // |
105 OnRate22ID, // |
106 OnRate44ID, // |
107 OnRate48ID, // | Leave these in order
108 OnRate88ID, // |
109 OnRate96ID, // |
110 OnRate176ID, // |
111 OnRate192ID, // |
112 OnRate352ID, // |
113 OnRate384ID, // |
114 OnRateOtherID, // |
115 // |
116 On16BitID, // |
117 On24BitID, // |
118 OnFloatID, // <---
119
121
123
127
129
133
135
136 // Range of ids for registered items -- keep this last!
138};
@ 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 543 of file WaveTrackControls.cpp.

544{
545 auto result = WaveChannelSubViewType::All();
546 if (result.size() > reserveDisplays) {
547 wxASSERT( false );
548 result.resize(reserveDisplays);
549 }
550 return result;
551}
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::Get(track);menu.Check(id, view.GetMultiView());}) :nullptr;})

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

Referenced by RecordableSequence::Append(), 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 &&TrackList::NChannels(*next)==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);}   
)

References TrackList::Get(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, isMono, isUnsafe, TrackList::NChannels(), 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==TrackList::NChannels(track);menu.Enable(id, isStereo &&!isUnsafe(handler));}   
)

References cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, isUnsafe, and TrackList::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()

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( DoGetWaveTrackControls  )

Definition at line 1227 of file WaveTrackControls.cpp.

1227 {
1228 return [](WaveTrack &track) {
1229 return std::make_shared<WaveTrackControls>( track.SharedPointer() );
1230 };
1231}
A Track that contains audio waveform data.
Definition: WaveTrack.h:227

References Track::SharedPointer().

Here is the call graph for this function:

◆ EndSection()

EndSection ( )

◆ for()

for ( const auto &type   :AllTypes())

Definition at line 592 of file WaveTrackControls.cpp.

592 : AllTypes() ) {
593 static const auto initFn = []( bool radio ){ return
594 [radio]( PopupMenuHandler &handler, wxMenu &menu, int id ){
595 // Find all known sub-view types
596 const auto allTypes = AllTypes();
597
598 // How to convert a type to a menu item id
599 const auto IdForType =
600 [&allTypes](const WaveChannelSubViewType &type) -> int {
601 const auto begin = allTypes.begin();
602 return OnSetDisplayId +
603 (std::find(begin, allTypes.end(), type) - begin);
604 };
605
606 auto &table = static_cast< WaveTrackMenuTable& >( handler );
607 auto &track = table.FindWaveTrack();
608
609 const auto &view = WaveChannelView::Get(track);
610
611 const auto displays = view.GetDisplays();
612 const auto end = displays.end();
613 bool check = (end !=
614 std::find_if(displays.begin(), end,
615 [&](const WaveChannelSubViewType &type){
616 return id == IdForType(type); }));
617 menu.Check( id, check );
618
619 // Bug2275 residual
620 // Disable the checking-off of the only sub-view
621 if ( !radio && displays.size() == 1 && check )
622 menu.Enable( id, false );
623 };
624 };
625 Append(Adapt<My>([type, id](My &table) {
626 const auto pTrack = &table.FindWaveTrack();
627 const auto &view = WaveChannelView::Get(*pTrack);
628 const auto itemType =
629 view.GetMultiView() ? Entry::CheckItem : Entry::RadioItem;
630 return std::make_unique<Entry>( type.name.Internal(), itemType,
631 id, type.name.Msgid(),
632 POPUP_MENU_FN( OnSetDisplay ), table,
633 initFn( !view.GetMultiView() ) );
634 }));
635 ++id;
636 }
#define POPUP_MENU_FN(memFn)
static std::vector< WaveChannelSubViewType > AllTypes()
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::Get(track);menu.Check(id, view.GetMultiView());}) :nullptr;}))
int id
static WaveChannelView & Get(WaveChannel &channel)
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:150
PopupMenuTableEntry::InitFunction initFn(const ValueFinder &findValue)
WaveTrack & FindWaveTrack() const

References AllTypes(), Append(), PackedArray::begin(), PackedArray::end(), WaveChannelView::Get(), 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 960 of file WaveTrackControls.cpp.

961{
963}
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 673 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:1263

Definition at line 195 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 369 of file WaveTrackControls.cpp.

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

◆ id

int id = OnSetDisplayId

Definition at line 591 of file WaveTrackControls.cpp.

Referenced by TranscriptionToolBar::AddButton(), SelectionBar::AddTime(), MacrosWindow::ChangeOK(), PluginManager::ConvertID(), PluginManager::CreatePlugin(), CreateStdButtonSizer(), CurrentSettingsGroup(), ProjectSerializer::Decode(), anonymous_namespace{PluginHost.cpp}::Discover(), SqliteSampleBlockFactory::DoCreateSilent(), EffectDistortion::DoLoadFactoryPreset(), PluginManager::DropFile(), FactoryDefaultsGroup(), anonymous_namespace{PendingTracks.cpp}::finder(), for(), EffectDefinitionInterface::GetSquashedName(), CommandManager::HandleMenuID(), ShuttleGui::Id(), anonymous_namespace{WaveTrackControls.cpp}::initFn(), ModuleManager::InitializeBuiltins(), AudacityApp::InitPart2(), EffectReverb::LoadFactoryPreset(), AudioUnitInstance::MakeMessage(), NyquistOutputDialog::NyquistOutputDialog(), ToolBarButtons::OnButton(), WaveTrackMenuTable::OnSetDisplay(), AudioUnitUtils::ParameterNameInfo::ParameterNameInfo(), anonymous_namespace{VST3Wrapper.cpp}::ParametersFromString(), anonymous_namespace{VST3Wrapper.cpp}::ComponentHandler::performEdit(), ToolBarButtons::PopUp(), ToolBarButtons::PushDown(), AudioSetupToolBar::Choices::Set(), SingleInputParameterValue::Set(), ToolBarButtons::SetEnabled(), RealtimeEffectState::SetID(), Track::SetId(), LWSlider::SetId(), Track::SubstituteOriginalTrack(), DirectoriesPrefs::Validate(), VST3Editor::VST3Editor(), VSTMessage::VSTMessage(), WavPackExportProcessor::WriteBlock(), and ProjectSerializer::WriteName().

◆ isMono

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

Definition at line 555 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 562 of file WaveTrackControls.cpp.

Referenced by AppendItem().

◆ MenuPathStart

const auto MenuPathStart = wxT("WaveTrackMenu")
static

◆ nRates

const int nRates = 12

Definition at line 365 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate().

◆ waveTrackTCPLines

WaveTrackTCPLines waveTrackTCPLines
static