1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-20 21:21:25 +01:00

Bug 373/378 (P2) - Fix a case where one track of an aligned stereo pair could be moved independently

This commit is contained in:
mchinen
2011-04-26 16:47:06 +00:00
parent cf49d77dda
commit fbe3a80ab1
3 changed files with 8 additions and 21 deletions

View File

@@ -1030,18 +1030,6 @@ void WaveClip::GetDisplayRect(wxRect* r)
*r = mDisplayRect;
}
// only works if the clip is on screen an mDisplayRect is set.
sampleCount WaveClip::GetSampleNumberAtX(int xcoord)
{
if (mDisplayRect.width > 0 &&
xcoord >= mDisplayRect.x && xcoord < mDisplayRect.x + mDisplayRect.width) {
float cursor = (xcoord - mDisplayRect.x) / mDisplayRect.width;
return GetStartSample() + GetNumSamples() * cursor;
}
return -1;
}
bool WaveClip::Append(samplePtr buffer, sampleFormat format,
sampleCount len, unsigned int stride /* = 1 */,
XMLWriter* blockFileLog /*=NULL*/)