Audacity 3.2.0
Functions | Variables
anonymous_namespace{MixerBoard.cpp} Namespace Reference

Functions

size_t GetNumSamplesInView (const ChannelSampleView &view)
 
void FillBufferWithSampleView (float *buffer, const ChannelSampleView &view)
 
const ReservedCommandFlagPlayableTracksExistFlag ()
 
void OnMixerBoard (const CommandContext &context)
 

Variables

AttachedWindows::RegisteredFactory sMixerBoardKey
 
AttachedItem sAttachment
 

Function Documentation

◆ FillBufferWithSampleView()

void anonymous_namespace{MixerBoard.cpp}::FillBufferWithSampleView ( float *  buffer,
const ChannelSampleView view 
)

Definition at line 526 of file MixerBoard.cpp.

527{
528 size_t copiedSamples = 0;
529 for (const auto& segmentView : view)
530 {
531 const auto sampleCount = segmentView.GetSampleCount();
532 segmentView.Copy(buffer + copiedSamples, sampleCount);
533 copiedSamples += sampleCount;
534 }
535}
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19

Referenced by MixerTrackCluster::UpdateMeter().

Here is the caller graph for this function:

◆ GetNumSamplesInView()

size_t anonymous_namespace{MixerBoard.cpp}::GetNumSamplesInView ( const ChannelSampleView view)

Definition at line 516 of file MixerBoard.cpp.

517{
518 return std::accumulate(
519 view.begin(), view.end(), 0,
520 [](size_t total, const AudioSegmentSampleView& segmentView) {
521 return total + segmentView.GetSampleCount();
522 });
523}

Referenced by MixerTrackCluster::UpdateMeter().

Here is the caller graph for this function:

◆ OnMixerBoard()

void anonymous_namespace{MixerBoard.cpp}::OnMixerBoard ( const CommandContext context)

Definition at line 1561 of file MixerBoard.cpp.

1562{
1563 auto &project = context.project;
1564
1565 auto mixerBoardFrame = &GetAttachedWindows(project).Get(sMixerBoardKey);
1566 mixerBoardFrame->Show();
1567 mixerBoardFrame->Raise();
1568 mixerBoardFrame->SetFocus();
1569}
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
const auto project
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
Definition: ClientData.h:317
AudacityProject & project
AttachedWindows::RegisteredFactory sMixerBoardKey

References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), CommandContext::project, project, and sMixerBoardKey.

Here is the call graph for this function:

◆ PlayableTracksExistFlag()

const ReservedCommandFlag & anonymous_namespace{MixerBoard.cpp}::PlayableTracksExistFlag ( )

Definition at line 1540 of file MixerBoard.cpp.

1540 { static ReservedCommandFlag flag{
1541 [](const AudacityProject &project){
1542 auto &tracks = TrackList::Get( project );
1543 return
1544#ifdef EXPERIMENTAL_MIDI_OUT
1545 !tracks.Any<const NoteTrack>().empty()
1546 ||
1547#endif
1548 !tracks.Any<const WaveTrack>().empty()
1549 ;
1550 }
1551 }; return flag; }
const auto tracks
static std::once_flag flag
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
A Track that is used for Midi notes. (Somewhat old code).
Definition: NoteTrack.h:86
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:347
A Track that contains audio waveform data.
Definition: WaveTrack.h:222

References flag, TrackList::Get(), project, and tracks.

Here is the call graph for this function:

Variable Documentation

◆ sAttachment

AttachedItem anonymous_namespace{MixerBoard.cpp}::sAttachment
Initial value:
{
Command( wxT("MixerBoard"), XXO("&Mixer"), OnMixerBoard,
wxT("View/Windows")
}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
constexpr auto Command
Definition: MenuRegistry.h:456
const ReservedCommandFlag & PlayableTracksExistFlag()
void OnMixerBoard(const CommandContext &context)

Definition at line 1574 of file MixerBoard.cpp.

◆ sMixerBoardKey

AttachedWindows::RegisteredFactory anonymous_namespace{MixerBoard.cpp}::sMixerBoardKey
Initial value:
{
[]( AudacityProject &parent ) -> wxWeakRef< wxWindow > {
return safenew MixerBoardFrame( &parent );
}
}
#define safenew
Definition: MemoryX.h:10

Definition at line 1554 of file MixerBoard.cpp.

Referenced by OnMixerBoard().