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

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

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

Referenced by NyquistEffect::ProcessOne().

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