Audacity 3.2.0
Functions
anonymous_namespace{Nyquist.cpp} Namespace Reference

Functions

wxString GetClipBoundaries (const Track *t)
 

Function Documentation

◆ GetClipBoundaries()

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

Definition at line 1237 of file Nyquist.cpp.

1238{
1239 wxString clips;
1240 const auto wt = dynamic_cast<const WaveTrack*>(t);
1241 if (!wt)
1242 return clips;
1243 auto ca = wt->SortedIntervalArray();
1244 // Each clip is a list (start-time, end-time)
1245 // Limit number of clips added to avoid argument stack overflow error (bug
1246 // 2300).
1247 for (size_t i = 0, n = ca.size(); i < n; ++i)
1248 {
1249 if (i < 1000)
1250 {
1251 clips += wxString::Format(
1252 wxT("(list (float %s) (float %s))"),
1253 Internat::ToString(ca[i]->GetPlayStartTime()),
1254 Internat::ToString(ca[i]->GetPlayEndTime()));
1255 }
1256 else if (i == 1000)
1257 {
1258 // If final clip is NIL, plug-in developer knows there are more than
1259 // 1000 clips in channel.
1260 clips += "NIL";
1261 }
1262 else if (i > 1000)
1263 {
1264 break;
1265 }
1266 }
1267 return clips;
1268};
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 NyquistEffect::ProcessOne().

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