11#ifndef __AUDACITY_PROJECT_AUDIO_MANAGER__
12#define __AUDACITY_PROJECT_AUDIO_MANAGER__
56 : wxCommandEvent{ EVT_RECORDING_DROPOUT }
62 wxEvent *
Clone()
const override {
73 ,
public std::enable_shared_from_this< ProjectAudioManager >
84 static bool UseDuplex();
88 bool nonWaveToo =
false
102 bool Playing()
const;
106 bool Recording()
const;
117 bool CanStopAudioStream ()
const;
119 void OnRecord(
bool altAppearance);
123 double t0,
double t1,
130 bool backwards =
false);
134 void PlayCurrentRegion(
135 bool newDefault =
false,
136 bool cutpreview =
false);
142 void Stop(
bool stopStream =
true);
146 bool DoPlayStopSelect(
bool click,
bool shift );
147 void DoPlayStopSelect( );
162 void CancelRecording();
172 void OnCheckpointFailure(wxCommandEvent &evt);
179 bool mTimerRecordCanceled{
false };
183 std::atomic<int> mPaused{ 0 };
185 bool mAppending{
false };
186 bool mLooping{
false };
187 bool mCutting{
false };
188 bool mStopping{
false };
190 int mDisplayedRate{ 0 };
191 static std::pair< TranslatableStrings, unsigned >
199 bool newDefault =
false
std::vector< std::shared_ptr< WaveTrack > > WaveTrackArray
Utility ClientData::Site to register hooks into a host class that attach client data.
AudioIOStartStreamOptions DefaultSpeedPlayOptions(AudacityProject &project)
AUDACITY_DLL_API const ReservedCommandFlag & CanStopAudioStreamFlag()
AUDACITY_DLL_API AudioIOStartStreamOptions DefaultPlayOptions(AudacityProject &project, bool newDefault=false)
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_RECORDING_DROPOUT, RecordingDropoutEvent)
AUDACITY_DLL_API PropertiesOfSelected GetPropertiesOfSelected(const AudacityProject &proj)
constexpr int RATE_NOT_SELECTED
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Monitors record play start/stop and new sample blocks. Has callbacks for these events.
virtual void OnAudioIORate(int rate)=0
virtual void OnSoundActivationThreshold()=0
virtual void OnAudioIOStopRecording()=0
virtual void OnAudioIONewBlocks(const WaveTrackArray *tracks)=0
virtual void OnAudioIOStartRecording()=0
virtual void OnCommitRecording()=0
AudacityProject & mProject
void SetLooping(bool value)
void SetAppending(bool value)
void SetStopping(bool value)
bool IsTimerRecordCancelled()
PlayMode GetLastPlayMode() const
ProjectAudioManager(const ProjectAudioManager &) PROHIBITED
void SetTimerRecordCancelled()
~ProjectAudioManager() override
ProjectAudioManager & operator=(const ProjectAudioManager &) PROHIBITED
void ResetTimerRecordCancelled()
void SetCutting(bool value)
Defines a selected portion of a project.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
A Track that contains audio waveform data.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
struct holding stream options, including a pointer to the time warp info and AudioIOListener and whet...
A convenient default parameter for class template Site.
Notification, posted on the project, after recording has stopped, when dropouts have been detected.
const Intervals & intervals
Disjoint and sorted increasingly.
std::pair< double, double > Interval
Start time and duration.
RecordingDropoutEvent(const Intervals &intervals)
RecordingDropoutEvent(const RecordingDropoutEvent &)=default
wxEvent * Clone() const override
std::vector< Interval > Intervals