MCPcopy Create free account
hub / github.com/audacity/audacity / DoCreateClip

Method DoCreateClip

libraries/lib-wave-track/WaveTrack.cpp:3176–3189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3174}
3175
3176auto WaveTrack::DoCreateClip(double offset, const wxString& name) const
3177 -> WaveClipHolder
3178{
3179 auto clip = std::make_shared<WaveClip>(NChannels(),
3180 mpFactory, GetSampleFormat(), GetRate());
3181 clip->SetName(name);
3182 clip->SetSequenceStartTime(offset);
3183
3184 const auto& tempo = GetProjectTempo(*this);
3185 if (tempo.has_value())
3186 clip->OnProjectTempoChange(std::nullopt, *tempo);
3187 assert(clip->NChannels() == NChannels());
3188 return clip;
3189}
3190
3191auto WaveTrack::NewestOrNewClip() -> IntervalHolder
3192{

Callers

nothing calls this directly

Calls 6

SetSequenceStartTimeMethod · 0.80
has_valueMethod · 0.80
GetRateFunction · 0.70
SetNameMethod · 0.45
OnProjectTempoChangeMethod · 0.45
NChannelsMethod · 0.45

Tested by

no test coverage detected