Audacity 3.2.0
Functions
anonymous_namespace{NyquistBase.cpp} Namespace Reference

Functions

wxString GetClipBoundaries (const Track *t)
 

Function Documentation

◆ GetClipBoundaries()

wxString anonymous_namespace{NyquistBase.cpp}::GetClipBoundaries ( const Track t)

Definition at line 1103 of file NyquistBase.cpp.

1104{
1105 wxString clips;
1106 const auto wt = dynamic_cast<const WaveTrack*>(t);
1107 if (!wt)
1108 return clips;
1109 auto ca = wt->SortedIntervalArray();
1110 // Each clip is a list (start-time, end-time)
1111 // Limit number of clips added to avoid argument stack overflow error (bug
1112 // 2300).
1113 for (size_t i = 0, n = ca.size(); i < n; ++i)
1114 {
1115 if (i < 1000)
1116 {
1117 clips += wxString::Format(
1118 wxT("(list (float %s) (float %s))"),
1119 Internat::ToString(ca[i]->GetPlayStartTime()),
1120 Internat::ToString(ca[i]->GetPlayEndTime()));
1121 }
1122 else if (i == 1000)
1123 {
1124 // If final clip is NIL, plug-in developer knows there are more than
1125 // 1000 clips in channel.
1126 clips += "NIL";
1127 }
1128 else if (i > 1000)
1129 {
1130 break;
1131 }
1132 }
1133 return clips;
1134};
wxT("CloseDown"))
static wxString ToString(double numberToConvert, int digitsAfterDecimalPoint=-1)
Convert a number to a string, always uses the dot as decimal separator.
Definition: Internat.cpp:126
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
IntervalHolders SortedIntervalArray()
Return all WaveClips sorted by clip play start time.
Definition: WaveTrack.cpp:3297

References WaveTrack::SortedIntervalArray(), Internat::ToString(), and wxT().

Referenced by NyquistBase::ProcessOne().

Here is the call graph for this function:
Here is the caller graph for this function: