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 507 of file MixerBoard.cpp.

508{
509 size_t copiedSamples = 0;
510 for (const auto& segmentView : view)
511 {
512 const auto sampleCount = segmentView.GetSampleCount();
513 segmentView.Copy(buffer + copiedSamples, sampleCount);
514 copiedSamples += sampleCount;
515 }
516}
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 497 of file MixerBoard.cpp.

498{
499 return std::accumulate(
500 view.begin(), view.end(), 0,
501 [](size_t total, const AudioSegmentSampleView& segmentView) {
502 return total + segmentView.GetSampleCount();
503 });
504}

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 1517 of file MixerBoard.cpp.

1518{
1519 auto &project = context.project;
1520
1521 auto mixerBoardFrame = &GetAttachedWindows(project).Get(sMixerBoardKey);
1522 mixerBoardFrame->Show();
1523 mixerBoardFrame->Raise();
1524 mixerBoardFrame->SetFocus();
1525}
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:318
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 1498 of file MixerBoard.cpp.

1498 { static ReservedCommandFlag flag{
1499 [](const AudacityProject &project){
1500 auto &tracks = TrackList::Get( project );
1501 return
1502 !tracks.Any<const NoteTrack>().empty()
1503 ||
1504 !tracks.Any<const WaveTrack>().empty()
1505 ;
1506 }
1507 }; 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:78
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:314
A Track that contains audio waveform data.
Definition: WaveTrack.h:203

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 1530 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 1510 of file MixerBoard.cpp.

Referenced by OnMixerBoard().