mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Bug 1774 - Recording does not honor waveform color
New clip now takes colour from WaveTrack, and new WaveTrack takes colour of the WaveTrack its clips will be appended onto.
This commit is contained in:
parent
c28be778e2
commit
0bae8c3a90
@ -1437,7 +1437,7 @@ void WaveTrack::InsertSilence(double t, double len)
|
||||
if (mClips.empty())
|
||||
{
|
||||
// Special case if there is no clip yet
|
||||
auto clip = make_movable<WaveClip>(mDirManager, mFormat, mRate, 0 /*colourindex*/);
|
||||
auto clip = make_movable<WaveClip>(mDirManager, mFormat, mRate, this->GetWaveColorIndex());
|
||||
clip->InsertSilence(0, len);
|
||||
// use NOFAIL-GUARANTEE
|
||||
mClips.push_back( std::move( clip ) );
|
||||
|
@ -1303,6 +1303,7 @@ bool NyquistEffect::ProcessOne()
|
||||
}
|
||||
|
||||
outputTrack[i] = mFactory->NewWaveTrack(format, rate);
|
||||
outputTrack[i]->SetWaveColorIndex( mCurTrack[i]->GetWaveColorIndex() );
|
||||
|
||||
// Clean the initial buffer states again for the get callbacks
|
||||
// -- is this really needed?
|
||||
|
@ -1074,6 +1074,7 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
|
||||
// Pad the recording track with silence, up to the
|
||||
// maximum time.
|
||||
auto newTrack = p->GetTrackFactory()->NewWaveTrack();
|
||||
newTrack->SetWaveColorIndex( wt->GetWaveColorIndex() );
|
||||
newTrack->InsertSilence(0.0, t0 - t1);
|
||||
newTrack->Flush();
|
||||
wt->Clear(t1, t0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user