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 1234 of file Nyquist.cpp.

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

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: