![]() |
Audacity 3.2.0
|
#include <ProjectAudioIO.h>
Public Member Functions | |
ProjectAudioIO (AudacityProject &project) | |
ProjectAudioIO (const ProjectAudioIO &) PROHIBITED | |
ProjectAudioIO & | operator= (const ProjectAudioIO &) PROHIBITED |
~ProjectAudioIO () | |
int | GetAudioIOToken () const |
bool | IsAudioActive () const |
void | SetAudioIOToken (int token) |
const std::shared_ptr< Meter > & | GetPlaybackMeter () const |
void | SetPlaybackMeter (const std::shared_ptr< Meter > &playback) |
const std::shared_ptr< Meter > & | GetCaptureMeter () const |
void | SetCaptureMeter (const std::shared_ptr< Meter > &capture) |
double | GetPlaySpeed () const |
void | SetPlaySpeed (double value) |
![]() | |
virtual | ~Base () |
Static Public Member Functions | |
static ProjectAudioIO & | Get (AudacityProject &project) |
static const ProjectAudioIO & | Get (const AudacityProject &project) |
Private Attributes | |
AudacityProject & | mProject |
std::shared_ptr< Meter > | mPlaybackMeter |
std::shared_ptr< Meter > | mCaptureMeter |
std::atomic< double > | mPlaySpeed {} |
int | mAudioIOToken { -1 } |
\ brief Holds per-project state needed for interaction with AudioIO, including the audio stream token and pointers to meters
Definition at line 29 of file ProjectAudioIO.h.
|
explicit |
Definition at line 34 of file ProjectAudioIO.cpp.
ProjectAudioIO::ProjectAudioIO | ( | const ProjectAudioIO & | ) |
ProjectAudioIO::~ProjectAudioIO | ( | ) |
Definition at line 39 of file ProjectAudioIO.cpp.
|
static |
Definition at line 24 of file ProjectAudioIO.cpp.
References sAudioIOKey.
Referenced by AudioIOBusyPred(), StretchHandle::Click(), CutlineHandle::Click(), SampleHandle::Click(), WaveClipTrimHandle::Click(), EnvelopeHandle::Click(), SelectHandle::Click(), TimeShiftHandle::Click(), TrackSelectHandle::Click(), SelectButtonHandle::CommitChanges(), CloseButtonHandle::CommitChanges(), DefaultPlayOptions(), anonymous_namespace{SelectMenus.cpp}::DoBoundaryMove(), anonymous_namespace{SelectMenus.cpp}::DoCursorMove(), anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel(), ProjectAudioManager::DoPlayStopSelect(), ProjectAudioManager::DoRecord(), TransportUtilities::DoStopPlaying(), StretchHandle::Drag(), SampleHandle::Drag(), EnvelopeHandle::Drag(), TimeShiftHandle::Drag(), TrackSelectHandle::Drag(), MeterToolBar::Expose(), Get(), NewDefaultPlaybackPolicy::GetPlaySpeed(), LabelGlyphHandle::HandleGlyphDragRelease(), anonymous_namespace{AdornedRulerPanel.cpp}::PlayheadHandle::HitTest(), anonymous_namespace{WaveTrackControls.cpp}::initFn(), TrackPanel::IsAudioActive(), anonymous_namespace{TransportMenus.cpp}::MakeReadyToPlay(), Scrubber::MarkScrubStart(), ProjectWindow::MayScrollBeyondZero(), LabelEditActions::Handler::OnAddLabelPlaying(), ProjectAudioManager::OnAudioIOStopRecording(), ProjectManager::OnCloseWindow(), SelectActions::Handler::OnCursorPositionStore(), SelectionBar::OnIdle(), TimeToolBar::OnIdle(), AudacityApp::OnKeyDown(), anonymous_namespace{SelectMenus.cpp}::OnlyHandleKeyUp(), SelectActions::Handler::OnSelectCursorStoredCursor(), SelectUtilities::OnSetRegion(), ProjectWindow::PlaybackScroller::OnTimer(), LyricsWindow::OnTimer(), MixerBoard::OnTimer(), PlayIndicatorOverlay::OnTimer(), ProjectManager::OnTimer(), TrackPanel::OnTimer(), TrackActions::Handler::OnTrackClose(), ProjectAudioManager::PlayPlayRegion(), WaveClipTrimHandle::Preview(), AffordanceHandle::Preview(), StretchHandle::Preview(), CutlineHandle::Preview(), SampleHandle::Preview(), EnvelopeHandle::Preview(), TimeShiftHandle::Preview(), TrackSelectHandle::Preview(), MeterToolBar::ReCreateButtons(), StretchHandle::Release(), SampleHandle::Release(), EnvelopeHandle::Release(), TimeShiftHandle::Release(), anonymous_namespace{SelectMenus.cpp}::SeekLeftOrRight(), TranscriptionToolBar::SetPlaySpeed(), ProjectAudioManager::Stop(), AdornedRulerPanel::ScrubbingRulerOverlay::Update(), and ProjectWindow::ZoomInByFactor().
|
static |
Definition at line 29 of file ProjectAudioIO.cpp.
References Get().
int ProjectAudioIO::GetAudioIOToken | ( | ) | const |
Definition at line 43 of file ProjectAudioIO.cpp.
References mAudioIOToken.
Referenced by ProjectAudioManager::DoPlayStopSelect(), TransportUtilities::DoStopPlaying(), IsAudioActive(), anonymous_namespace{TransportMenus.cpp}::MakeReadyToPlay(), LabelEditActions::Handler::OnAddLabelPlaying(), AudacityApp::OnKeyDown(), SelectUtilities::OnSetRegion(), and ProjectWindow::ZoomInByFactor().
const std::shared_ptr< Meter > & ProjectAudioIO::GetCaptureMeter | ( | ) | const |
const std::shared_ptr< Meter > & ProjectAudioIO::GetPlaybackMeter | ( | ) | const |
Definition at line 60 of file ProjectAudioIO.cpp.
References mPlaybackMeter.
|
inline |
Definition at line 53 of file ProjectAudioIO.h.
Referenced by NewDefaultPlaybackPolicy::GetPlaySpeed(), and SetPlaySpeed().
bool ProjectAudioIO::IsAudioActive | ( | ) | const |
Definition at line 53 of file ProjectAudioIO.cpp.
References AudioIOBase::Get(), and GetAudioIOToken().
Referenced by StretchHandle::Click(), CutlineHandle::Click(), SampleHandle::Click(), WaveClipTrimHandle::Click(), EnvelopeHandle::Click(), SelectHandle::Click(), TimeShiftHandle::Click(), TrackSelectHandle::Click(), SelectButtonHandle::CommitChanges(), CloseButtonHandle::CommitChanges(), anonymous_namespace{SelectMenus.cpp}::DoBoundaryMove(), StretchHandle::Drag(), SampleHandle::Drag(), EnvelopeHandle::Drag(), TimeShiftHandle::Drag(), TrackSelectHandle::Drag(), LabelGlyphHandle::HandleGlyphDragRelease(), anonymous_namespace{AdornedRulerPanel.cpp}::PlayheadHandle::HitTest(), anonymous_namespace{WaveTrackControls.cpp}::initFn(), TrackPanel::IsAudioActive(), ProjectWindow::MayScrollBeyondZero(), SelectActions::Handler::OnCursorPositionStore(), anonymous_namespace{SelectMenus.cpp}::OnlyHandleKeyUp(), SelectActions::Handler::OnSelectCursorStoredCursor(), ProjectWindow::PlaybackScroller::OnTimer(), LyricsWindow::OnTimer(), MixerBoard::OnTimer(), PlayIndicatorOverlay::OnTimer(), TrackActions::Handler::OnTrackClose(), WaveClipTrimHandle::Preview(), AffordanceHandle::Preview(), StretchHandle::Preview(), CutlineHandle::Preview(), SampleHandle::Preview(), EnvelopeHandle::Preview(), TimeShiftHandle::Preview(), TrackSelectHandle::Preview(), StretchHandle::Release(), SampleHandle::Release(), EnvelopeHandle::Release(), TimeShiftHandle::Release(), and AdornedRulerPanel::ScrubbingRulerOverlay::Update().
ProjectAudioIO & ProjectAudioIO::operator= | ( | const ProjectAudioIO & | ) |
void ProjectAudioIO::SetAudioIOToken | ( | int | token | ) |
Definition at line 48 of file ProjectAudioIO.cpp.
References mAudioIOToken.
Referenced by ProjectAudioManager::DoRecord(), Scrubber::MarkScrubStart(), and ProjectAudioManager::PlayPlayRegion().
void ProjectAudioIO::SetCaptureMeter | ( | const std::shared_ptr< Meter > & | capture | ) |
Definition at line 82 of file ProjectAudioIO.cpp.
References AudioIOBase::Get(), mCaptureMeter, and mProject.
void ProjectAudioIO::SetPlaybackMeter | ( | const std::shared_ptr< Meter > & | playback | ) |
Definition at line 65 of file ProjectAudioIO.cpp.
References AudioIOBase::Get(), mPlaybackMeter, and mProject.
void ProjectAudioIO::SetPlaySpeed | ( | double | value | ) |
Definition at line 95 of file ProjectAudioIO.cpp.
References GetPlaySpeed(), mPlaySpeed, and mProject.
Referenced by TranscriptionToolBar::SetPlaySpeed().
|
private |
Definition at line 68 of file ProjectAudioIO.h.
Referenced by GetAudioIOToken(), and SetAudioIOToken().
|
private |
Definition at line 62 of file ProjectAudioIO.h.
Referenced by GetCaptureMeter(), and SetCaptureMeter().
|
private |
Definition at line 61 of file ProjectAudioIO.h.
Referenced by GetPlaybackMeter(), and SetPlaybackMeter().
|
private |
Definition at line 66 of file ProjectAudioIO.h.
Referenced by SetPlaySpeed().
|
private |
Definition at line 58 of file ProjectAudioIO.h.
Referenced by SetCaptureMeter(), SetPlaybackMeter(), and SetPlaySpeed().