Audacity 3.2.0
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
AudioSetupToolBar Class Referencefinal

A toolbar to allow easier changing of input and output devices . More...

#include <AudioSetupToolBar.h>

Inheritance diagram for AudioSetupToolBar:
[legend]
Collaboration diagram for AudioSetupToolBar:
[legend]

Classes

class  Choices
 

Public Member Functions

 AudioSetupToolBar (AudacityProject &project)
 
virtual ~AudioSetupToolBar ()
 
void Create (wxWindow *parent) override
 
void UpdatePrefs () override
 
void UpdateSelectedPrefs (int) override
 
void DeinitChildren ()
 
void Populate () override
 
void Repaint (wxDC *dc) override
 
void EnableDisableButtons () override
 
void ReCreateButtons () override
 
void OnFocus (wxFocusEvent &event)
 
void OnAudioSetup (wxCommandEvent &event)
 
- Public Member Functions inherited from ToolBar
 ToolBar (AudacityProject &project, const TranslatableString &label, const Identifier &section, bool resizable=false)
 
virtual ~ToolBar ()
 
virtual bool ShownByDefault () const
 Whether the toolbar should be shown by default. Default implementation returns true. More...
 
virtual bool HideAfterReset () const
 Default implementation returns false. More...
 
virtual DockID DefaultDockID () const
 Which dock the toolbar defaults into. Default implementation chooses the top dock. More...
 
bool AcceptsFocus () const override
 
bool AcceptsFocusFromKeyboard () const override
 
virtual void SetToDefaultSize ()
 
virtual void Create (wxWindow *parent)
 
virtual void EnableDisableButtons ()=0
 
virtual void ReCreateButtons ()
 
void UpdatePrefs () override
 
virtual void RegenerateTooltips ()=0
 
int GetIndex () const
 Get a value used for computing cascading positions of undocked bars. More...
 
void SetIndex (int index)
 Set a value used for computing cascading positions of undocked bars. More...
 
TranslatableString GetTitle ()
 
TranslatableString GetLabel ()
 
Identifier GetSection ()
 
ToolDockGetDock ()
 
void SetPreferredNeighbors (Identifier left, Identifier top={})
 
void SetLabel (const TranslatableString &label)
 
virtual void SetDocked (ToolDock *dock, bool pushed)
 
std::pair< Identifier, IdentifierPreferredNeighbors () const noexcept
 Defaults to (NoBarID, NoBarId) More...
 
virtual bool Expose (bool show=true)
 
bool IsResizable () const
 
bool IsVisible () const
 
bool IsDocked () const
 
bool IsPositioned ()
 
void SetVisible (bool bVisible)
 
void SetPositioned ()
 
virtual int GetInitialWidth ()
 Resizable toolbars should implement these. More...
 
virtual int GetMinToolbarWidth ()
 
virtual wxSize GetDockedSize ()
 
wxSize GetSmartDockedSize ()
 
virtual void ResizingDone ()
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Static Public Member Functions

static Identifier ID ()
 Methods for AudioSetupToolBar. More...
 
static AudioSetupToolBarGet (AudacityProject &project)
 
static const AudioSetupToolBarGet (const AudacityProject &project)
 
- Static Public Member Functions inherited from ToolBar
static AButtonMakeButton (wxWindow *parent, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxWindowID id, wxPoint placement, bool processdownevents, wxSize size)
 
static AButtonMakeButton (ToolBar *parent, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, bool processdownevents, const TranslatableString &label)
 
static void MakeAlternateImages (AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size)
 
static void SetButtonToolTip (AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands)
 
static void MakeButtonBackgroundsSmall ()
 
static void MakeButtonBackgroundsLarge ()
 

Private Types

enum  { ID_AUDIO_SETUP_BUTTON = 12000 , BUTTON_COUNT }
 
using Callback = void(AudioSetupToolBar::*)(int id)
 

Private Member Functions

void OnRescannedDevices (DeviceChangeMessage)
 
void OnHost (int id)
 
void OnInput (int id)
 
void OnChannels (int id)
 
void OnOutput (int id)
 
void OnSettings (wxCommandEvent &event)
 
void CommonMenuItemSteps (bool audioSettingsChosen)
 
bool ChangeHost (int hostId)
 
void ChangeDeviceLabel (int deviceId, Choices &choices, bool isInput)
 
void RepopulateMenus ()
 
void FillHosts ()
 
void FillHostDevices ()
 
void FillInputChannels ()
 
void SetDevices (const DeviceSourceMap *in, const DeviceSourceMap *out)
 
void RegenerateTooltips () override
 
void MakeAudioSetupButton ()
 
void ArrangeButtons ()
 

Static Private Member Functions

static void AppendSubMenu (AudioSetupToolBar &toolbar, wxMenu &menu, const wxArrayString &labels, int checkedItem, Callback callback, const wxString &title)
 

Private Attributes

AButtonmAudioSetup {}
 
wxBoxSizer * mSizer {}
 
Choices mInput
 
Choices mOutput
 
Choices mInputChannels
 
Choices mHost
 
Observer::Subscription mSubscription
 

Static Private Attributes

static constexpr int kAudioSettings = 15800
 

Additional Inherited Members

- Public Types inherited from ToolBar
enum  DockID { TopDockID = 1 , BotDockID = 2 }
 Identifies one of the docking areas for toolbars. More...
 
using Holder = wxWindowPtr< ToolBar >
 
- Protected Member Functions inherited from ToolBar
void SetButton (bool down, AButton *button)
 
wxBoxSizer * GetSizer ()
 
void Add (wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
 
void Add (wxSizer *sizer, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL)
 
void Add (int width, int height, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL)
 
void AddSpacer (int size=14)
 
void AddStretchSpacer (int prop=1)
 
void Detach (wxWindow *window)
 
void Detach (wxSizer *sizer)
 
void Updated ()
 
int GetResizeGrabberWidth ()
 Returns the width in pixels of the resizer element. More...
 
virtual void Populate ()=0
 
virtual void Repaint (wxDC *dc)=0
 
void OnErase (wxEraseEvent &event)
 
void OnPaint (wxPaintEvent &event)
 
void OnMouseEvents (wxMouseEvent &event)
 
virtual void UpdateSelectedPrefs (int id)
 
 PrefsListener ()
 
virtual ~PrefsListener ()
 
virtual void UpdatePrefs ()=0
 
- Static Protected Member Functions inherited from ToolBar
static void MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
static void MakeMacRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size)
 
static void MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
static void MakeRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size)
 
- Static Protected Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 
- Protected Attributes inherited from ToolBar
AudacityProjectmProject
 
TranslatableString mLabel
 
Identifier mSection
 
int mIndex {0}
 

Detailed Description

A toolbar to allow easier changing of input and output devices .

Definition at line 27 of file AudioSetupToolBar.h.

Member Typedef Documentation

◆ Callback

using AudioSetupToolBar::Callback = void (AudioSetupToolBar::*)(int id)
private

Definition at line 74 of file AudioSetupToolBar.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_AUDIO_SETUP_BUTTON 
BUTTON_COUNT 

Definition at line 83 of file AudioSetupToolBar.h.

Constructor & Destructor Documentation

◆ AudioSetupToolBar()

AudioSetupToolBar::AudioSetupToolBar ( AudacityProject project)
explicit

Definition at line 81 of file AudioSetupToolBar.cpp.

82: ToolBar( project, XO("Audio Setup"), ID() )
83{
86}
XO("Cut/Copy/Paste")
void OnRescannedDevices(DeviceChangeMessage)
Observer::Subscription mSubscription
static Identifier ID()
Methods for AudioSetupToolBar.
static DeviceManager * Instance()
Gets the singleton instance.
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Definition: Observer.h:199
ToolBar(AudacityProject &project, const TranslatableString &label, const Identifier &section, bool resizable=false)
Definition: ToolBar.cpp:328

References DeviceManager::Instance(), mSubscription, OnRescannedDevices(), and Observer::Publisher< Message, NotifyAll >::Subscribe().

Here is the call graph for this function:

◆ ~AudioSetupToolBar()

AudioSetupToolBar::~AudioSetupToolBar ( )
virtual

Definition at line 88 of file AudioSetupToolBar.cpp.

89{
90}

Member Function Documentation

◆ AppendSubMenu()

void AudioSetupToolBar::AppendSubMenu ( AudioSetupToolBar toolbar,
wxMenu &  menu,
const wxArrayString &  labels,
int  checkedItem,
Callback  callback,
const wxString &  title 
)
staticprivate

Definition at line 577 of file AudioSetupToolBar.cpp.

580{
581 auto subMenu = std::make_unique<wxMenu>();
582 int ii = 0;
583 for (const auto &label : labels) {
584 // Assign fresh ID with wxID_ANY
585 auto subMenuItem = subMenu->AppendRadioItem(wxID_ANY, label);
586 if (ii == checkedItem)
587 subMenuItem->Check();
588 subMenu->Bind(wxEVT_MENU,
589 [&toolbar, callback, ii](wxCommandEvent &){ (toolbar.*callback)(ii); },
590 subMenuItem->GetId());
591 ++ii;
592 }
593 auto menuItem = menu.AppendSubMenu(subMenu.release(), title);
594 if (checkedItem < 0)
595 menuItem->Enable(false);
596}
static const auto title
TranslatableString label
Definition: TagsEditor.cpp:164

References label, and title.

Referenced by AudioSetupToolBar::Choices::AppendSubMenu().

Here is the caller graph for this function:

◆ ArrangeButtons()

void AudioSetupToolBar::ArrangeButtons ( )
private

Definition at line 168 of file AudioSetupToolBar.cpp.

169{
170 int flags = wxALIGN_CENTER | wxRIGHT;
171
172 // (Re)allocate the button sizer
173 if (mSizer)
174 {
175 Detach(mSizer);
176 std::unique_ptr < wxSizer > {mSizer}; // DELETE it
177 }
178
179 Add((mSizer = safenew wxBoxSizer(wxHORIZONTAL)), 1, wxEXPAND);
180 mSizer->Add(mAudioSetup, 1, wxEXPAND);
181
182 // Layout the sizer
183 mSizer->Layout();
184
185 // Layout the toolbar
186 Layout();
187
188 SetMinSize(GetSizer()->GetMinSize());
189}
#define safenew
Definition: MemoryX.h:10
void Add(wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
Definition: ToolBar.cpp:709
wxBoxSizer * GetSizer()
Definition: ToolBar.cpp:701
void Detach(wxWindow *window)
Definition: ToolBar.cpp:775

References ToolBar::Add(), ToolBar::Detach(), ToolBar::GetSizer(), mAudioSetup, mSizer, and safenew.

Referenced by Populate().

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

◆ ChangeDeviceLabel()

void AudioSetupToolBar::ChangeDeviceLabel ( int  deviceId,
Choices choices,
bool  isInput 
)
private

Definition at line 663 of file AudioSetupToolBar.cpp.

665{
666 int newIndex = -1;
667
668 auto host = AudioIOHost.Read();
669 const std::vector<DeviceSourceMap>& maps = isInput ? DeviceManager::Instance()->GetInputDeviceMaps()
671
672 if (choices.Set(deviceId)) {
673 // Update cache with the chosen device
674 wxString newDevice = *choices.Get();
675 for (size_t i = 0; i < maps.size(); ++i) {
676 const auto name = MakeDeviceSourceString(&maps[i]);
677 if (name == newDevice && maps[i].hostString == host)
678 newIndex = i;
679 }
680 }
681
682 if (newIndex < 0) {
683 wxLogDebug(wxT("AudioSetupToolBar::ChangeDeviceLabel(): couldn't find device indices"));
684 return;
685 }
686
687 SetDevices(isInput ? &maps[newIndex] : nullptr,
688 isInput ? nullptr : &maps[newIndex]);
689}
wxT("CloseDown"))
StringSetting AudioIOHost
wxString MakeDeviceSourceString(const DeviceSourceMap *map)
const TranslatableString name
Definition: Distortion.cpp:76
void SetDevices(const DeviceSourceMap *in, const DeviceSourceMap *out)
const std::vector< DeviceSourceMap > & GetInputDeviceMaps()
const std::vector< DeviceSourceMap > & GetOutputDeviceMaps()
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:200

References AudioIOHost, AudioSetupToolBar::Choices::Get(), DeviceManager::GetInputDeviceMaps(), DeviceManager::GetOutputDeviceMaps(), DeviceManager::Instance(), MakeDeviceSourceString(), name, Setting< T >::Read(), AudioSetupToolBar::Choices::Set(), SetDevices(), and wxT().

Referenced by OnInput(), and OnOutput().

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

◆ ChangeHost()

bool AudioSetupToolBar::ChangeHost ( int  hostId)
private

Definition at line 613 of file AudioSetupToolBar.cpp.

614{
615 // Update cache with selected host
616 if (!mHost.Set(hostId))
617 return false;
618 auto name = mHost.Get();
619 assert(name); // should not be nullopt if Set succeeded
620
621 auto oldHost = AudioIOHost.Read();
622 const auto newHost = *name;
623
624 if (oldHost == newHost)
625 return false;
626
627 //change the host and switch to correct devices.
628 AudioIOHost.Write(newHost);
629 gPrefs->Flush();
630
631 // populate the devices and reassign mHost
633
634 return true;
635}
FileConfig * gPrefs
Definition: Prefs.cpp:70
bool Set(const wxString &name)
std::optional< wxString > Get() const
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
bool Write(const T &value)
Write value to config and return true if successful.
Definition: Prefs.h:252

References AudioIOHost, FillHostDevices(), FileConfig::Flush(), AudioSetupToolBar::Choices::Get(), gPrefs, mHost, name, Setting< T >::Read(), AudioSetupToolBar::Choices::Set(), and Setting< T >::Write().

Referenced by OnHost().

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

◆ CommonMenuItemSteps()

void AudioSetupToolBar::CommonMenuItemSteps ( bool  audioSettingsChosen)
private

Definition at line 722 of file AudioSetupToolBar.cpp.

723{
724 auto gAudioIO = AudioIOBase::Get();
725 if (gAudioIO) {
726 // We cannot have gotten here if gAudioIO->IsAudioTokenActive(),
727 // per the setting of AudioIONotBusyFlag and AudioIOBusyFlag in
728 // AudacityProject::GetUpdateFlags().
729 // However, we can have an invalid audio token (so IsAudioTokenActive()
730 // is false), but be monitoring.
731 // If monitoring, have to stop the stream, so HandleDeviceChange() can work.
732 // We could disable the Preferences command while monitoring, i.e.,
733 // set AudioIONotBusyFlag/AudioIOBusyFlag according to monitoring, as well.
734 // Instead allow it because unlike recording, for example, monitoring
735 // is not clearly something that should prohibit changing device.
736 // TODO: We *could* be smarter in this method and call HandleDeviceChange()
737 // only when the device choices actually changed. True of lots of prefs!
738 // As is, we always stop monitoring before handling the device change.
739 if (gAudioIO->IsMonitoring())
740 {
741 gAudioIO->StopStream();
742 while (gAudioIO->IsBusy()) {
743 using namespace std::chrono;
744 std::this_thread::sleep_for(100ms);
745 }
746 }
747
748 if (audioSettingsChosen) {
749 PrefsPanel::Factories factories;
750 factories.push_back(PrefsPanel::PrefsNode(DevicePrefsFactory));
751
752 ViewDeviceSettingsDialog dialog(&GetProjectFrame(mProject), mProject, XO("Audio Settings:"), factories, 0);
753 dialog.SetSize(600, 420);
754 dialog.Center();
755
756 if (0 != dialog.ShowModal()) {
758 }
759 }
760 else {
761 gAudioIO->HandleDeviceChange();
763 }
764 }
765}
PrefsPanel * DevicePrefsFactory(wxWindow *parent, wxWindowID winid, AudacityProject *)
int DeviceToolbarPrefsID()
Methods for DeviceToolBar.
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
static AudioIOBase * Get()
Definition: AudioIOBase.cpp:91
static void Broadcast(int id=0)
Call this static function to notify all PrefsListener objects.
Definition: Prefs.cpp:97
std::vector< PrefsPanel::PrefsNode > Factories
Definition: PrefsPanel.h:72
AudacityProject & mProject
Definition: ToolBar.h:248

References PrefsListener::Broadcast(), DevicePrefsFactory(), DeviceToolbarPrefsID(), AudioIOBase::Get(), GetProjectFrame(), ToolBar::mProject, and XO().

Referenced by OnChannels(), OnHost(), OnInput(), OnOutput(), and OnSettings().

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

◆ Create()

void AudioSetupToolBar::Create ( wxWindow *  parent)
overridevirtual

Reimplemented from ToolBar.

Definition at line 103 of file AudioSetupToolBar.cpp.

104{
105 ToolBar::Create(parent);
106
107 // Simulate a size event to set initial meter placement/size
108 wxSizeEvent event(GetSize(), GetId());
109 event.SetEventObject(this);
110 GetEventHandler()->ProcessEvent(event);
111}
virtual void Create(wxWindow *parent)
Definition: ToolBar.cpp:492

References ToolBar::Create().

Here is the call graph for this function:

◆ DeinitChildren()

void AudioSetupToolBar::DeinitChildren ( )

Definition at line 113 of file AudioSetupToolBar.cpp.

References AudioSetupToolBar::Choices::Clear(), mHost, mInput, mInputChannels, and mOutput.

Referenced by Populate().

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

◆ EnableDisableButtons()

void AudioSetupToolBar::EnableDisableButtons ( )
overridevirtual

Implements ToolBar.

Definition at line 369 of file AudioSetupToolBar.cpp.

370{
371 auto gAudioIO = AudioIOBase::Get();
372 if (gAudioIO) {
373 // we allow changes when monitoring, but not when recording
374 bool audioStreamActive = gAudioIO->IsStreamActive() && !gAudioIO->IsMonitoring();
375
376 if (audioStreamActive) {
378 }
379 else {
381 }
382 }
383}
void Disable()
Definition: AButton.cpp:560
void Enable()
Definition: AButton.cpp:551

References AButton::Disable(), AButton::Enable(), AudioIOBase::Get(), and mAudioSetup.

Referenced by ReCreateButtons().

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

◆ FillHostDevices()

void AudioSetupToolBar::FillHostDevices ( )
private

Definition at line 446 of file AudioSetupToolBar.cpp.

447{
448 const std::vector<DeviceSourceMap> &inMaps = DeviceManager::Instance()->GetInputDeviceMaps();
449 const std::vector<DeviceSourceMap> &outMaps = DeviceManager::Instance()->GetOutputDeviceMaps();
450
451 //read what is in the prefs
452 auto host = AudioIOHost.Read();
453 int foundHostIndex = -1;
454
455 // if the host is not in the hosts combo then we rescanned.
456 // set it to blank so we search for another host.
457 if (mHost.Find(host) < 0)
458 host = wxT("");
459
460 // Try to find a hostIndex, among either inputs or outputs, assumed to be
461 // unique among the union of the set of input and output devices
462 for (auto & device : outMaps) {
463 if (device.hostString == host) {
464 foundHostIndex = device.hostIndex;
465 break;
466 }
467 }
468
469 if (foundHostIndex == -1) {
470 for (auto & device : inMaps) {
471 if (device.hostString == host) {
472 foundHostIndex = device.hostIndex;
473 break;
474 }
475 }
476 }
477
478 // If no host was found based on the prefs device host, load the first available one
479 if (foundHostIndex == -1) {
480 if (outMaps.size()) {
481 foundHostIndex = outMaps[0].hostIndex;
482 }
483 else if (inMaps.size()) {
484 foundHostIndex = inMaps[0].hostIndex;
485 }
486 }
487
488 // Make sure in/out are clear in case no host was found
489 mInput.Clear();
490 mOutput.Clear();
491
492 // If we still have no host it means no devices, in which case do nothing.
493 if (foundHostIndex == -1) {
494 return;
495 }
496
497 // Repopulate the Input/Output device list available to the user
498 wxArrayStringEx mInputDeviceNames;
499 for (size_t i = 0; i < inMaps.size(); ++i) {
500 auto& device = inMaps[i];
501 if (foundHostIndex == device.hostIndex) {
502 mInputDeviceNames.push_back(MakeDeviceSourceString(&device));
503 if (host.empty()) {
504 host = device.hostString;
505 AudioIOHost.Write(host);
506 mHost.Set(host);
507 }
508 }
509 }
510 mInput.Set(std::move(mInputDeviceNames));
511
512 wxArrayStringEx mOutputDeviceNames;
513 for (size_t i = 0; i < outMaps.size(); ++i) {
514 auto& device = outMaps[i];
515 if (foundHostIndex == device.hostIndex) {
516 mOutputDeviceNames.push_back(MakeDeviceSourceString(&device));
517 if (host.empty()) {
518 host = device.hostString;
519 AudioIOHost.Write(host);
520 mHost.Set(host);
521 }
522 }
523 }
524 mOutput.Set(std::move(mOutputDeviceNames));
525
526 gPrefs->Flush();
527
528 // The setting of the Device is left up to menu handlers
529}
int Find(const wxString &name) const
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.

References AudioIOHost, AudioSetupToolBar::Choices::Clear(), AudioSetupToolBar::Choices::Find(), FileConfig::Flush(), DeviceManager::GetInputDeviceMaps(), DeviceManager::GetOutputDeviceMaps(), gPrefs, DeviceManager::Instance(), MakeDeviceSourceString(), mHost, mInput, mOutput, Setting< T >::Read(), AudioSetupToolBar::Choices::Set(), Setting< T >::Write(), and wxT().

Referenced by ChangeHost(), RepopulateMenus(), and UpdatePrefs().

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

◆ FillHosts()

void AudioSetupToolBar::FillHosts ( )
private

Definition at line 422 of file AudioSetupToolBar.cpp.

423{
424 const std::vector<DeviceSourceMap> &inMaps = DeviceManager::Instance()->GetInputDeviceMaps();
425 const std::vector<DeviceSourceMap> &outMaps = DeviceManager::Instance()->GetOutputDeviceMaps();
426
427 wxArrayString hosts;
428
429 // go over our lists add the host to the list if it isn't there yet
430
431 for (auto & device : inMaps) {
432 if (!make_iterator_range(hosts).contains(device.hostString)) {
433 hosts.push_back(device.hostString);
434 }
435 }
436
437 for (auto & device : outMaps) {
438 if (!make_iterator_range(hosts).contains(device.hostString)) {
439 hosts.push_back(device.hostString);
440 }
441 }
442
443 mHost.Set(std::move(hosts));
444}
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:448

References DeviceManager::GetInputDeviceMaps(), DeviceManager::GetOutputDeviceMaps(), DeviceManager::Instance(), make_iterator_range(), mHost, and AudioSetupToolBar::Choices::Set().

Referenced by RepopulateMenus().

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

◆ FillInputChannels()

void AudioSetupToolBar::FillInputChannels ( )
private

Definition at line 531 of file AudioSetupToolBar.cpp.

532{
533 const std::vector<DeviceSourceMap> &inMaps = DeviceManager::Instance()->GetInputDeviceMaps();
534 auto host = AudioIOHost.Read();
535 auto device = AudioIORecordingDevice.Read();
536 auto source = AudioIORecordingSource.Read();
537 long newChannels = 0;
538
539 auto oldChannels = AudioIORecordChannels.Read();
541
543 for (auto & dev: inMaps) {
544 if (source == dev.sourceString &&
545 device == dev.deviceString &&
546 host == dev.hostString) {
547
548 // add one selection for each channel of this source
549 for (size_t j = 0; j < (unsigned int)dev.numChannels; j++) {
550 wxString name;
551
552 if (j == 0) {
553 name = _("1 (Mono) Recording Channel");
554 }
555 else if (j == 1) {
556 name = _("2 (Stereo) Recording Channels");
557 }
558 else {
559 name = wxString::Format(wxT("%d"), (int)j + 1);
560 }
561 names.push_back(name);
562 }
563 newChannels = dev.numChannels;
564 if (oldChannels <= newChannels && oldChannels >= 1) {
565 newChannels = oldChannels;
566 }
567 AudioIORecordChannels.Write(newChannels);
568 break;
569 }
570 }
571 mInputChannels.Set(std::move(names));
572 if (newChannels >= 1)
573 // Correct to 0-based index in choice
574 mInputChannels.Set(newChannels - 1);
575}
StringSetting AudioIORecordingSource
StringSetting AudioIORecordingDevice
IntSetting AudioIORecordChannels
#define _(s)
Definition: Internat.h:73
static TranslatableStrings names
Definition: TagsEditor.cpp:152

References _, AudioIOHost, AudioIORecordChannels, AudioIORecordingDevice, AudioIORecordingSource, AudioSetupToolBar::Choices::Clear(), DeviceManager::GetInputDeviceMaps(), DeviceManager::Instance(), mInputChannels, name, names, Setting< T >::Read(), AudioSetupToolBar::Choices::Set(), Setting< T >::Write(), and wxT().

Referenced by RepopulateMenus(), SetDevices(), and UpdatePrefs().

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

◆ Get() [1/2]

AudioSetupToolBar & AudioSetupToolBar::Get ( AudacityProject project)
static

Definition at line 92 of file AudioSetupToolBar.cpp.

93{
94 auto &toolManager = ToolManager::Get( project );
95 return *static_cast<AudioSetupToolBar*>(toolManager.GetToolBar(ID()));
96}
A toolbar to allow easier changing of input and output devices .
static ToolManager & Get(AudacityProject &project)

References ToolManager::Get(), and ID().

Referenced by Get().

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

◆ Get() [2/2]

const AudioSetupToolBar & AudioSetupToolBar::Get ( const AudacityProject project)
static

Definition at line 98 of file AudioSetupToolBar.cpp.

99{
100 return Get( const_cast<AudacityProject&>( project )) ;
101}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static AudioSetupToolBar & Get(AudacityProject &project)

References Get().

Here is the call graph for this function:

◆ ID()

Identifier AudioSetupToolBar::ID ( )
static

Methods for AudioSetupToolBar.

Definition at line 75 of file AudioSetupToolBar.cpp.

76{
77 return wxT("Audio Setup");
78}

References wxT().

Referenced by Get().

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

◆ MakeAudioSetupButton()

void AudioSetupToolBar::MakeAudioSetupButton ( )
private

Definition at line 152 of file AudioSetupToolBar.cpp.

153{
155 //i18n-hint: Audio setup button text, keep as short as possible
156 mAudioSetup->SetLabel(XO("Audio Setup"));
159 theTheme.Image(bmpRecoloredUpSmall),
160 theTheme.Image(bmpRecoloredUpHiliteSmall),
161 theTheme.Image(bmpRecoloredDownSmall),
162 theTheme.Image(bmpRecoloredHiliteSmall),
163 theTheme.Image(bmpRecoloredUpSmall));
164 mAudioSetup->SetIcon(theTheme.Image(bmpSetup));
165 mAudioSetup->SetForegroundColour(theTheme.Colour(clrTrackPanelText));
166}
THEME_API Theme theTheme
Definition: Theme.cpp:82
A wxButton with mouse-over behaviour.
Definition: AButton.h:104
void SetButtonType(Type type)
Definition: AButton.cpp:147
void SetImages(const wxImage &up, const wxImage &over, const wxImage &down, const wxImage &overDown, const wxImage &dis)
Definition: AButton.cpp:205
@ FrameButton
Definition: AButton.h:114
void SetIcon(const wxImage &icon)
Definition: AButton.cpp:226
void SetLabel(const TranslatableString &label)
Definition: AButton.cpp:189
wxColour & Colour(int iIndex)
wxImage & Image(int iIndex)

References ThemeBase::Colour(), AButton::FrameButton, ID_AUDIO_SETUP_BUTTON, ThemeBase::Image(), mAudioSetup, safenew, AButton::SetButtonType(), AButton::SetIcon(), AButton::SetImages(), AButton::SetLabel(), theTheme, and XO().

Referenced by Populate().

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

◆ OnAudioSetup()

void AudioSetupToolBar::OnAudioSetup ( wxCommandEvent &  event)

Definition at line 224 of file AudioSetupToolBar.cpp.

225{
226 wxMenu menu;
227
228 //i18n-hint: Audio setup menu
229 mHost.AppendSubMenu(*this, menu, &AudioSetupToolBar::OnHost, _("&Host"));
230 menu.AppendSeparator();
231
232 //i18n-hint: Audio setup menu
233 mOutput.AppendSubMenu(*this, menu,
234 &AudioSetupToolBar::OnOutput, _("&Playback Device"));
235 menu.AppendSeparator();
236
237 //i18n-hint: Audio setup menu
238 mInput.AppendSubMenu(*this, menu,
239 &AudioSetupToolBar::OnInput, _("&Recording Device"));
240 menu.AppendSeparator();
241
242 //i18n-hint: Audio setup menu
244 menu, &AudioSetupToolBar::OnChannels, _("Recording &Channels"));
245 menu.AppendSeparator();
246 menu.Append(kAudioSettings, _("&Audio Settings..."));
247
248 menu.Bind(wxEVT_MENU_CLOSE, [this](auto&) { mAudioSetup->PopUp(); });
249 menu.Bind(wxEVT_MENU, &AudioSetupToolBar::OnSettings, this, kAudioSettings);
250
251 wxWindow* btn = FindWindow(ID_AUDIO_SETUP_BUTTON);
252 wxRect r = btn->GetRect();
253 BasicMenu::Handle{ &menu }.Popup(
255 { r.GetLeft(), r.GetBottom() }
256 );
257}
void PopUp()
Definition: AButton.cpp:585
void AppendSubMenu(AudioSetupToolBar &toolBar, wxMenu &menu, Callback callback, const wxString &title)
static constexpr int kAudioSettings
void OnSettings(wxCommandEvent &event)
void Popup(const BasicUI::WindowPlacement &window, const Point &pos={})
Display the menu at pos, invoke at most one action, then hide it.
Definition: BasicMenu.cpp:209
Window placement information for wxWidgetsBasicUI can be constructed from a wxWindow pointer.

References _, AudioSetupToolBar::Choices::AppendSubMenu(), ID_AUDIO_SETUP_BUTTON, kAudioSettings, mAudioSetup, mHost, mInput, mInputChannels, mOutput, OnChannels(), OnHost(), OnInput(), OnOutput(), OnSettings(), AButton::PopUp(), and BasicMenu::Handle::Popup().

Here is the call graph for this function:

◆ OnChannels()

void AudioSetupToolBar::OnChannels ( int  id)
private

Definition at line 697 of file AudioSetupToolBar.cpp.

698{
700 // Remember 1-based value in preferences
702 CommonMenuItemSteps(false);
703}
void CommonMenuItemSteps(bool audioSettingsChosen)

References AudioIORecordChannels, CommonMenuItemSteps(), mInputChannels, AudioSetupToolBar::Choices::Set(), and Setting< T >::Write().

Referenced by OnAudioSetup().

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

◆ OnFocus()

void AudioSetupToolBar::OnFocus ( wxFocusEvent &  event)

Definition at line 219 of file AudioSetupToolBar.cpp.

220{
221 KeyboardCapture::OnFocus( *this, event );
222}
void OnFocus(wxWindow &window, wxFocusEvent &event)
a function useful to implement a focus event handler The window releases the keyboard if the event is...

References KeyboardCapture::OnFocus().

Here is the call graph for this function:

◆ OnHost()

void AudioSetupToolBar::OnHost ( int  id)
private

Definition at line 691 of file AudioSetupToolBar.cpp.

692{
693 ChangeHost(id);
694 CommonMenuItemSteps(false);
695}
bool ChangeHost(int hostId)

References ChangeHost(), and CommonMenuItemSteps().

Referenced by OnAudioSetup().

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

◆ OnInput()

void AudioSetupToolBar::OnInput ( int  id)
private

Definition at line 705 of file AudioSetupToolBar.cpp.

706{
707 ChangeDeviceLabel(id, mInput, true);
708 CommonMenuItemSteps(false);
709}
void ChangeDeviceLabel(int deviceId, Choices &choices, bool isInput)

References ChangeDeviceLabel(), CommonMenuItemSteps(), and mInput.

Referenced by OnAudioSetup().

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

◆ OnOutput()

void AudioSetupToolBar::OnOutput ( int  id)
private

Definition at line 711 of file AudioSetupToolBar.cpp.

712{
713 ChangeDeviceLabel(id, mOutput, false);
714 CommonMenuItemSteps(false);
715}

References ChangeDeviceLabel(), CommonMenuItemSteps(), and mOutput.

Referenced by OnAudioSetup().

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

◆ OnRescannedDevices()

void AudioSetupToolBar::OnRescannedDevices ( DeviceChangeMessage  m)
private

Definition at line 605 of file AudioSetupToolBar.cpp.

606{
607 // Hosts may have disappeared or appeared so a complete repopulate is needed.
610}

References RepopulateMenus(), and Rescan.

Referenced by AudioSetupToolBar().

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

◆ OnSettings()

void AudioSetupToolBar::OnSettings ( wxCommandEvent &  event)
private

Definition at line 717 of file AudioSetupToolBar.cpp.

718{
720}

References CommonMenuItemSteps().

Referenced by OnAudioSetup().

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

◆ Populate()

void AudioSetupToolBar::Populate ( )
overridevirtual

Implements ToolBar.

Definition at line 121 of file AudioSetupToolBar.cpp.

122{
124 SetBackgroundColour( theTheme.Colour( clrMedium ) );
126
128
129#if wxUSE_TOOLTIPS
131 wxToolTip::Enable(true);
132 wxToolTip::SetDelay(1000);
133#endif
134
135 // Set default order and mode
137
139}
void RegenerateTooltips() override
static void MakeButtonBackgroundsSmall()
Definition: ToolBar.cpp:837

References ArrangeButtons(), ThemeBase::Colour(), DeinitChildren(), MakeAudioSetupButton(), ToolBar::MakeButtonBackgroundsSmall(), RegenerateTooltips(), RepopulateMenus(), and theTheme.

Here is the call graph for this function:

◆ ReCreateButtons()

void AudioSetupToolBar::ReCreateButtons ( )
overridevirtual

Reimplemented from ToolBar.

Definition at line 191 of file AudioSetupToolBar.cpp.

192{
193 bool isAudioSetupDown = false;
194
195 // ToolBar::ReCreateButtons() will get rid of its sizer and
196 // since we've attached our sizer to it, ours will get deleted too
197 // so clean ours up first.
198 if (mSizer)
199 {
200 isAudioSetupDown = mAudioSetup->IsDown();
201 Detach(mSizer);
202
203 std::unique_ptr < wxSizer > {mSizer}; // DELETE it
204 mSizer = nullptr;
205 }
206
208
209 if (isAudioSetupDown)
210 {
212 }
213
215
217}
void PushDown()
Definition: AButton.cpp:577
bool IsDown()
Definition: AButton.h:208
void EnableDisableButtons() override
virtual void ReCreateButtons()
Definition: ToolBar.cpp:533

References ToolBar::Detach(), EnableDisableButtons(), AButton::IsDown(), mAudioSetup, mSizer, AButton::PushDown(), ToolBar::ReCreateButtons(), and RegenerateTooltips().

Here is the call graph for this function:

◆ RegenerateTooltips()

void AudioSetupToolBar::RegenerateTooltips ( )
overrideprivatevirtual

Implements ToolBar.

Definition at line 385 of file AudioSetupToolBar.cpp.

386{
387#if wxUSE_TOOLTIPS
388 for (long iWinID = ID_AUDIO_SETUP_BUTTON; iWinID < BUTTON_COUNT; iWinID++)
389 {
390 auto pCtrl = static_cast<AButton*>(this->FindWindow(iWinID));
392 switch (iWinID)
393 {
395 name = wxT("Open Audio Setup");
396 break;
397 }
398 std::vector<ComponentInterfaceSymbol> commands(
399 1u, { name, Verbatim(pCtrl->GetLabel()) });
400
401 // Some have a second
402 switch (iWinID)
403 {
405 break;
406 }
408 mProject, *pCtrl, commands.data(), commands.size());
409 }
410#endif
411}
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
size_t size() const
How many attachment pointers are in the Site.
Definition: ClientData.h:251
static void SetButtonToolTip(AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands)
Definition: ToolBar.cpp:970

References BUTTON_COUNT, ID_AUDIO_SETUP_BUTTON, ToolBar::mProject, name, ToolBar::SetButtonToolTip(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::size(), Verbatim(), and wxT().

Referenced by Populate(), ReCreateButtons(), and UpdatePrefs().

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

◆ Repaint()

void AudioSetupToolBar::Repaint ( wxDC *  dc)
overridevirtual

Implements ToolBar.

Definition at line 141 of file AudioSetupToolBar.cpp.

142{
143#ifndef USE_AQUA_THEME
144 wxSize s = mSizer->GetSize();
145 wxPoint p = mSizer->GetPosition();
146
147 wxRect bevelRect(p.x, p.y, s.GetWidth() - 1, s.GetHeight() - 1);
148 AColor::Bevel(*dc, true, bevelRect);
149#endif
150}
static void Bevel(wxDC &dc, bool up, const wxRect &r)
Definition: AColor.cpp:266

References AColor::Bevel(), and mSizer.

Here is the call graph for this function:

◆ RepopulateMenus()

void AudioSetupToolBar::RepopulateMenus ( )
private

Definition at line 413 of file AudioSetupToolBar.cpp.

414{
415 FillHosts();
418 // make the device display selection reflect the prefs if they exist
419 UpdatePrefs();
420}
void UpdatePrefs() override

References FillHostDevices(), FillHosts(), FillInputChannels(), and UpdatePrefs().

Referenced by OnRescannedDevices(), and Populate().

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

◆ SetDevices()

void AudioSetupToolBar::SetDevices ( const DeviceSourceMap in,
const DeviceSourceMap out 
)
private

Definition at line 637 of file AudioSetupToolBar.cpp.

638{
639 if (in) {
642 if (in->totalSources >= 1)
644 else
646 gPrefs->Flush();
647
648 // updates mInputChannels
650 }
651
652 if (out) {
654 if (out->totalSources >= 1) {
656 } else {
658 }
659 gPrefs->Flush();
660 }
661}
StringSetting AudioIOPlaybackSource
StringSetting AudioIOPlaybackDevice
IntSetting AudioIORecordingSourceIndex
bool Reset()
Reset to the default value.
Definition: Prefs.h:277
wxString sourceString
Definition: DeviceManager.h:34
wxString deviceString
Definition: DeviceManager.h:35

References AudioIOPlaybackDevice, AudioIOPlaybackSource, AudioIORecordingDevice, AudioIORecordingSource, AudioIORecordingSourceIndex, DeviceSourceMap::deviceString, FillInputChannels(), FileConfig::Flush(), gPrefs, Setting< T >::Reset(), DeviceSourceMap::sourceIndex, DeviceSourceMap::sourceString, DeviceSourceMap::totalSources, and Setting< T >::Write().

Referenced by ChangeDeviceLabel(), and UpdatePrefs().

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

◆ UpdatePrefs()

void AudioSetupToolBar::UpdatePrefs ( )
overridevirtual

Implements PrefsListener.

Definition at line 259 of file AudioSetupToolBar.cpp.

260{
261 wxString desc;
262 const std::vector<DeviceSourceMap> &inMaps = DeviceManager::Instance()->GetInputDeviceMaps();
263 const std::vector<DeviceSourceMap> &outMaps = DeviceManager::Instance()->GetOutputDeviceMaps();
264
265 auto selectedHost = mHost.Get();
266 wxString oldHost = selectedHost ? *selectedHost : wxString{};
267
268 auto hostName = AudioIOHost.Read();
269
270 // if the prefs host name doesn't match the one displayed, it changed
271 // in another project's AudioSetupToolBar, so we need to repopulate everything.
272 if (oldHost != hostName)
273 // updates mHost and mOutput
275
276 auto devName = AudioIORecordingDevice.Read();
277 auto sourceName = AudioIORecordingSource.Read();
278 if (sourceName.empty())
279 desc = devName;
280 else
281 desc = devName + wxT(": ") + sourceName;
282
283 if (mInput.Get() && *mInput.Get() != desc) {
284 if (mInput.Set(desc))
285 // updates mInputChannels
287 else if (!mInput.Empty()) {
288 for (size_t i = 0; i < inMaps.size(); i++) {
289 if (inMaps[i].hostString == hostName &&
290 MakeDeviceSourceString(&inMaps[i]) == mInput.GetFirst()) {
291 // use the default. It should exist but check just in case, falling back on the 0 index.
292 DeviceSourceMap* defaultMap = DeviceManager::Instance()->GetDefaultInputDevice(inMaps[i].hostIndex);
293 if (defaultMap) {
294 mInput.Set(MakeDeviceSourceString(defaultMap));
295 SetDevices(defaultMap, nullptr);
296 }
297 else {
298 //use the first item (0th index) if we have no familiar devices
299 mInput.Set(0);
300 SetDevices(&inMaps[i], nullptr);
301 }
302 break;
303 }
304 }
305 }
306 }
307
308 devName = AudioIOPlaybackDevice.Read();
309 sourceName = AudioIOPlaybackSource.Read();
310 if (sourceName.empty())
311 desc = devName;
312 else
313 desc = devName + wxT(": ") + sourceName;
314
315 if (mOutput.Get() && *mOutput.Get() != desc) {
316 if (!mOutput.Set(desc) && !mOutput.Empty()) {
317 for (size_t i = 0; i < outMaps.size(); i++) {
318 if (outMaps[i].hostString == hostName &&
319 MakeDeviceSourceString(&outMaps[i]) == mOutput.GetFirst()) {
320 // use the default. It should exist but check just in case, falling back on the 0 index.
321 DeviceSourceMap* defaultMap = DeviceManager::Instance()->GetDefaultInputDevice(outMaps[i].hostIndex);
322 if (defaultMap) {
324 SetDevices(nullptr, defaultMap);
325 }
326 else {
327 //use the first item (0th index) if we have no familiar devices
328 mOutput.Set(0);
329 SetDevices(nullptr, &outMaps[i]);
330 }
331 break;
332 }
333 }
334 }
335 }
336
337 // 0 based choice id is one less than the number of channels
338 long oldChannels = 1 + mInputChannels.GetSmallIntegerId();
339
340 // Preferences store the actual number of channels
341 auto newChannels = AudioIORecordChannels.ReadWithDefault(0);
342 if (newChannels > 0 && oldChannels != newChannels)
343 mInputChannels.Set(newChannels - 1);
344
345 selectedHost = mHost.Get();
346 if (!hostName.empty() && selectedHost && *selectedHost != hostName)
347 mHost.Set(hostName);
348
350
351 // Set label to pull in language change
352 SetLabel(XO("Audio Setup"));
353
354 // Give base class a chance
356
357 Layout();
358 Refresh();
359}
const TranslatableString desc
Definition: ExportPCM.cpp:55
DeviceSourceMap * GetDefaultInputDevice(int hostIndex)
bool ReadWithDefault(T *pVar, const T &defaultValue) const
overload of ReadWithDefault returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:206
void SetLabel(const wxString &label) override
Definition: ToolBar.cpp:408
void UpdatePrefs() override
Definition: ToolBar.cpp:622

References AudioIOHost, AudioIOPlaybackDevice, AudioIOPlaybackSource, AudioIORecordChannels, AudioIORecordingDevice, AudioIORecordingSource, desc, AudioSetupToolBar::Choices::Empty(), FillHostDevices(), FillInputChannels(), AudioSetupToolBar::Choices::Get(), DeviceManager::GetDefaultInputDevice(), AudioSetupToolBar::Choices::GetFirst(), DeviceManager::GetInputDeviceMaps(), DeviceManager::GetOutputDeviceMaps(), AudioSetupToolBar::Choices::GetSmallIntegerId(), DeviceManager::Instance(), MakeDeviceSourceString(), mHost, mInput, mInputChannels, mOutput, Setting< T >::Read(), Setting< T >::ReadWithDefault(), RegenerateTooltips(), AudioSetupToolBar::Choices::Set(), SetDevices(), ToolBar::SetLabel(), ToolBar::UpdatePrefs(), wxT(), and XO().

Referenced by RepopulateMenus(), and UpdateSelectedPrefs().

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

◆ UpdateSelectedPrefs()

void AudioSetupToolBar::UpdateSelectedPrefs ( int  id)
overridevirtual

Reimplemented from PrefsListener.

Definition at line 361 of file AudioSetupToolBar.cpp.

362{
363 if (id == DeviceToolbarPrefsID())
364 UpdatePrefs();
366}
virtual void UpdateSelectedPrefs(int id)
Definition: Prefs.cpp:127

References DeviceToolbarPrefsID(), UpdatePrefs(), and PrefsListener::UpdateSelectedPrefs().

Here is the call graph for this function:

Member Data Documentation

◆ kAudioSettings

constexpr int AudioSetupToolBar::kAudioSettings = 15800
staticconstexprprivate

Definition at line 28 of file AudioSetupToolBar.h.

Referenced by OnAudioSetup().

◆ mAudioSetup

AButton* AudioSetupToolBar::mAudioSetup {}
private

◆ mHost

Choices AudioSetupToolBar::mHost
private

◆ mInput

Choices AudioSetupToolBar::mInput
private

◆ mInputChannels

Choices AudioSetupToolBar::mInputChannels
private

◆ mOutput

Choices AudioSetupToolBar::mOutput
private

◆ mSizer

wxBoxSizer* AudioSetupToolBar::mSizer {}
private

Definition at line 89 of file AudioSetupToolBar.h.

Referenced by ArrangeButtons(), ReCreateButtons(), and Repaint().

◆ mSubscription

Observer::Subscription AudioSetupToolBar::mSubscription
private

Definition at line 144 of file AudioSetupToolBar.h.

Referenced by AudioSetupToolBar().


The documentation for this class was generated from the following files: