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 "WaveTrackView.h"
#include "WaveTrackViewConstants.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 "Theme.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanel.h"
#include "../../../../TrackPanelAx.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../WaveTrack.h"
#include "../../../../effects/RealtimeEffectManager.h"
#include "../../../../prefs/PrefsDialog.h"
#include "../../../../prefs/ThemePrefs.h"
#include "../../../../widgets/AudacityMessageBox.h"
#include "widgets/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 "../../../../widgets/ASlider.h"
#include "../../../../TrackInfo.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< WaveTrackSubViewTypeAllTypes ()
 
 BeginSection ("SubViews")
 
 Append ([](My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return 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::Channels(next).size()==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::Channels(&track).size();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 1238 of file WaveTrackControls.cpp.

◆ GetDefaultWaveTrackHeight

Definition at line 1245 of file WaveTrackControls.cpp.

◆ TCPLine

Definition at line 1073 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< WaveTrackSubViewType > AllTypes ( )
static

Definition at line 534 of file WaveTrackControls.cpp.

535{
536 auto result = WaveTrackSubViewType::All();
537 if ( result.size() > reserveDisplays ) {
538 wxASSERT( false );
539 result.resize( reserveDisplays );
540 }
541 return result;
542}
static const std::vector< WaveTrackSubViewType > & All()
Discover all registered types.

References WaveTrackSubViewType::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 ( [] (My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return nullptr;}  )

References WaveTrackView::Get(), OnMultiViewID, POPUP_MENU_FN, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::slots(), and XXO.

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

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::Channels(next).size()==1 &&track_cast< WaveTrack * >(next));} menu.Enable(id, canMakeStereo);}   
)

References TrackList::Channels(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), TrackList::Get(), isMono, and isUnsafe.

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::Channels(&track).size();menu.Enable(id, isStereo &&!isUnsafe(handler));}   
)

References TrackList::Channels(), and isUnsafe.

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 1239 of file WaveTrackControls.cpp.

1239 {
1240 return [](WaveTrack &track) {
1241 return std::make_shared<WaveTrackControls>( track.SharedPointer() );
1242 };
1243}
A Track that contains audio waveform data.
Definition: WaveTrack.h:57

References Track::SharedPointer().

Here is the call graph for this function:

◆ EndSection()

EndSection ( )

◆ for()

for ( const auto &type   :AllTypes())

Definition at line 584 of file WaveTrackControls.cpp.

584 : AllTypes() ) {
585 static const auto initFn = []( bool radio ){ return
586 [radio]( PopupMenuHandler &handler, wxMenu &menu, int id ){
587 // Find all known sub-view types
588 const auto allTypes = AllTypes();
589
590 // How to convert a type to a menu item id
591 const auto IdForType =
592 [&allTypes]( const WaveTrackSubViewType &type ) -> int {
593 const auto begin = allTypes.begin();
594 return OnSetDisplayId +
595 (std::find( begin, allTypes.end(), type ) - begin);
596 };
597
598 auto &table = static_cast< WaveTrackMenuTable& >( handler );
599 auto &track = table.FindWaveTrack();
600
601 const auto &view = WaveTrackView::Get( track );
602
603 const auto displays = view.GetDisplays();
604 const auto end = displays.end();
605 bool check = (end !=
606 std::find_if( displays.begin(), end,
607 [&]( const WaveTrackSubViewType &type ){
608 return id == IdForType( type ); } ) );
609 menu.Check( id, check );
610
611 // Bug2275 residual
612 // Disable the checking-off of the only sub-view
613 if ( !radio && displays.size() == 1 && check )
614 menu.Enable( id, false );
615 };
616 };
617 Append( [type, id]( My &table ) -> Registry::BaseItemPtr {
618 const auto pTrack = &table.FindWaveTrack();
619 const auto &view = WaveTrackView::Get( *pTrack );
620 const auto itemType =
621 view.GetMultiView() ? Entry::CheckItem : Entry::RadioItem;
622 return std::make_unique<Entry>( type.name.Internal(), itemType,
623 id, type.name.Msgid(),
624 POPUP_MENU_FN( OnSetDisplay ), table,
625 initFn( !view.GetMultiView() ) );
626 } );
627 ++id;
628 }
#define POPUP_MENU_FN(memFn)
static std::vector< WaveTrackSubViewType > AllTypes()
int id
Append([](My &table) -> Registry::BaseItemPtr { if(WaveTrackSubViews::slots() > 1) return 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=WaveTrackView::Get(track);menu.Check(id, view.GetMultiView());});else return nullptr;})
static WaveTrackView & Get(WaveTrack &track)
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
std::unique_ptr< BaseItem > BaseItemPtr
Definition: Registry.h:71
PopupMenuTableEntry::InitFunction initFn(const ValueFinder &findValue)
WaveTrack & FindWaveTrack() const

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

963{
965}
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 688 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.h:161

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 364 of file WaveTrackControls.cpp.

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

◆ id

int id = OnSetDisplayId

◆ isMono

const auto isMono
static
Initial value:
=
[]( PopupMenuHandler &handler ) -> bool {
auto &track =
static_cast< WaveTrackMenuTable& >( handler ).FindWaveTrack();
return 1 == TrackList::Channels( &track ).size();
}
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1539

Definition at line 546 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;
return RealtimeEffectManager::Get(project).IsActive() &&
}
bool IsAudioActive() const
static ProjectAudioIO & Get(AudacityProject &project)
static RealtimeEffectManager & Get(AudacityProject &project)
bool IsActive() const noexcept

Definition at line 553 of file WaveTrackControls.cpp.

Referenced by AppendItem().

◆ MenuPathStart

const auto MenuPathStart = wxT("WaveTrackMenu")
static

◆ nRates

const int nRates = 12

Definition at line 360 of file WaveTrackControls.cpp.

Referenced by RateMenuTable::IdOfRate().

◆ waveTrackTCPLines

WaveTrackTCPLines waveTrackTCPLines
static