38 double t1 = playRegion.GetEnd();
40 projectAudioManager.PlayCurrentRegion(newDefault, cutpreview);
42 if (
project.mBatchMode > 0 && t0 != t1 && !newDefault) {
50 while (projectAudioManager.Playing()) {
53 projectAudioManager.Stop();
55 context.
Error(
wxT(
"Playing interrupted"));
60 using namespace std::chrono;
61 std::this_thread::sleep_for(100ms);
65 projectAudioManager.Stop();
79 double t0 = selectedRegion.
t0();
80 double t1 = selectedRegion.
t1();
82 projectAudioManager.PlayPlayRegion(selectedRegion, options, mode);
92 while (projectAudioManager.Playing()) {
95 projectAudioManager.Stop();
97 context.
Error(
wxT(
"Playing interrupted"));
102 using namespace std::chrono;
103 std::this_thread::sleep_for(100ms);
107 projectAudioManager.Stop();
119 double t0 = selectedRegion.
t0();
120 double t1 = selectedRegion.t1();
122 projectAudioManager.OnRecord(altAppearance);
124 if (
project.mBatchMode > 0 && t1 != t0) {
132 while (projectAudioManager.Recording()) {
135 projectAudioManager.Stop();
137 context.
Error(
wxT(
"Recording interrupted"));
142 using namespace std::chrono;
143 std::this_thread::sleep_for(100ms);
147 projectAudioManager.Stop();
163 if (gAudioIO->IsStreamActive(token)) {
165 projectAudioManager.Stop();
172 if (gAudioIO->IsStreamActive()) {
176 iter = std::find_if(start, finish,
178 return gAudioIO->IsStreamActive(
182 if (iter != finish) {
183 auto otherProject = *iter;
185 auto &otherProjectAudioManager =
187 otherToolbar.SetStop();
188 otherProjectAudioManager.Stop();
200 if (!gAudioIO->IsBusy()) {
209 TrackList &trackList,
bool selectedOnly,
bool nonWaveToo)
215 for (
auto pTrack : range)
222 for (
auto pTrack : range)
223 if (!track_cast<const SampleTrack *>(pTrack))
225 std::dynamic_pointer_cast<const OtherPlayableSequence>(
226 pTrack->shared_from_this())
TransportSequences MakeTransportTracks(TrackList &trackList, bool selectedOnly, bool nonWaveToo)
const_iterator end() const
Container::value_type value_type
const_iterator begin() const
static AudioIOBase * Get()
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
virtual void Error(const wxString &message) const
AudacityProject & project
AudioTrack subclass that can also be audibly replayed by the program.
ProgressResult Update(int value, const TranslatableString &message={})
int GetAudioIOToken() const
static ProjectAudioIO & Get(AudacityProject &project)
static ProjectAudioManager & Get(AudacityProject &project)
Defines a selected portion of a project.
static std::shared_ptr< StretchingSequence > Create(const PlayableSequence &, const ClipConstHolders &clips)
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
auto Any() -> TrackIterRange< TrackType >
NotifyingSelectedRegion selectedRegion
static ViewInfo & Get(AudacityProject &project)
A Track that contains audio waveform data.
struct holding stream options, including a pointer to the time warp info and AudioIOListener and whet...
std::vector< std::shared_ptr< const OtherPlayableSequence > > otherPlayableSequences
ConstPlayableSequences playbackSequences
static void PlayPlayRegionAndWait(const CommandContext &context, const SelectedRegion &selectedRegion, const AudioIOStartStreamOptions &options, PlayMode mode)
static bool DoStopPlaying(const CommandContext &context)
static void PlayCurrentRegionAndWait(const CommandContext &context, bool newDefault=false, bool cutpreview=false)
static void RecordAndWait(const CommandContext &context, bool altAppearance)
static void DoStartPlaying(const CommandContext &context, bool newDefault=false)