-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joining multiple clips sometimes causes data loss #2226
Comments
In the latest 3.1.3 build, having clips like this: causes Select all followed by Edit > Clip Boundaries > Join to make this Which seems correct to me. @jserquera can you provide more information? What exactly is the problem? What Audacity version are you using? Can you maybe send a sample of the AUP3 file (you'll need to ZIP it first)? |
Steps to reproduce:
|
Attached is a project that gives me the error |
Ah. I'm on commit 9ca1f56 / CMake Build #3257 so it might be fixed in the final 3.1.3 after all. |
Did you try with the project I sent? |
I can reproduce this bug on Linux with b0dade3
8 "Ctrl + J" to join the clips |
There aren't any commits in between those commits which should have fixed the problem. I've had a quick look at the problem using master, where the problem also occurs. Then this fixes the bug for me. I'm not suggesting this as a fix, just an indication of where the problem might be. |
I did try your project, and couldn't reproduce the problem. However, there is a problem, even if it can't be reproduced all the time. |
Just for the record, I can reproduce the problem using commit 9ca1f56 |
Steps to reproduce: 1. Split an audio clip into three clips 2. Move the clips so that there are spaces between the clips. 3. Select all the audio (Ctrl+A) 4. Join the clips (Ctrl+J) 5. Observe that clips are not joined correctly. Problem: In WaveClip::InsertSilence(), the following two lines: else if (t == GetPlayEndTime() && t < GetSequenceEndTime()) ClearSequence(t, GetSequenceEndTime()); After ClearSequence is called to remove the data to the end of the sequence, then there is not call to update mTrimRight, as is done in WaveClip::ClearRight(). Fix: Update mTrimeRight. Notes: 1. I don't know why the bug was not always reproduceable. 2. There appears to be a similar issue with the previous two lines: if (t == GetPlayStartTime() && t > GetSequenceStartTime()) ClearSequence(GetSequenceStartTime(), t); Compare with WaveClip::ClearLeft(). However I have left that unfixed, both because it doesn't affect this bug, and also because I couldn't work out when that call to ClearSequence would get called, and so I couldn't test any fix.
Steps to reproduce: 1. Split an audio clip into three clips 2. Move the clips so that there are spaces between the clips. 3. Select all the audio (Ctrl+A) 4. Join the clips (Ctrl+J) 5. Observe that clips are not joined correctly. Problem: In WaveClip::InsertSilence(), the following two lines: else if (t == GetPlayEndTime() && t < GetSequenceEndTime()) ClearSequence(t, GetSequenceEndTime()); After ClearSequence is called to remove the data to the end of the sequence, then there is not call to update mTrimRight, as is done in WaveClip::ClearRight(). So when more data is pasted, it's pasted in the wrong place. Fix: Update mTrimeRight. Notes: 1. I don't know why the bug was not always reproduceable. 2. There appears to be a similar issue with the previous two lines: if (t == GetPlayStartTime() && t > GetSequenceStartTime()) ClearSequence(GetSequenceStartTime(), t); Compare with WaveClip::ClearLeft(). However I have left that unfixed, both because it doesn't affect this bug, and also because I couldn't work out when that call to ClearSequence would get called, and so I couldn't test any fix.
Using the steps to reproduce, if the length of the third clip is greater than the gap between the second and third clips, then data is lost - it's not just a question of incorrect time-shifting. |
I can confirm David's comment about data loss. This bug should be P1 in my opinion - destroying the user's data is arguably the worst possible bug. |
Steps to reproduce: 1. Split an audio clip into three clips 2. Move the clips so that there are spaces between the clips. 3. Select all the audio (Ctrl+A) 4. Join the clips (Ctrl+J) 5. Observe that clips are not joined correctly. Problem: In WaveClip::InsertSilence(), the following two lines: else if (t == GetPlayEndTime() && t < GetSequenceEndTime()) ClearSequence(t, GetSequenceEndTime()); After ClearSequence is called to remove the data to the end of the sequence, then there is not call to update mTrimRight, as is done in WaveClip::ClearRight(). So when more data is pasted, it's pasted in the wrong place. Fix: Update mTrimeRight. Notes: 1. I don't know why the bug was not always reproduceable. 2. There appears to be a similar issue with the previous two lines: if (t == GetPlayStartTime() && t > GetSequenceStartTime()) ClearSequence(GetSequenceStartTime(), t); Compare with WaveClip::ClearLeft(). However I have left that unfixed, both because it doesn't affect this bug, and also because I couldn't work out when that call to ClearSequence would get called, and so I couldn't test any fix.
Steps to reproduce: 1. Split an audio clip into three clips 2. Move the clips so that there are spaces between the clips. 3. Select all the audio (Ctrl+A) 4. Join the clips (Ctrl+J) 5. Observe that clips are not joined correctly. Problem: In WaveClip::InsertSilence(), the following two lines: else if (t == GetPlayEndTime() && t < GetSequenceEndTime()) ClearSequence(t, GetSequenceEndTime()); After ClearSequence is called to remove the data to the end of the sequence, then there is not call to update mTrimRight, as is done in WaveClip::ClearRight(). So when more data is pasted, it's pasted in the wrong place. Fix: Update mTrimeRight. Notes: 1. I don't know why the bug was not always reproduceable. 2. There appears to be a similar issue with the previous two lines: if (t == GetPlayStartTime() && t > GetSequenceStartTime()) ClearSequence(GetSequenceStartTime(), t); Compare with WaveClip::ClearLeft(). However I have left that unfixed, both because it doesn't affect this bug, and also because I couldn't work out when that call to ClearSequence would get called, and so I couldn't test any fix. (cherry picked from commit 21b975e)
When trying to join many audio blocks at once, the result is not well done. I mean, using the Edit menu (I have the Spanish version: Recortar limites-> Unir).
You have to go one by one.
I think it happens in all Windows and Mac versions....
The text was updated successfully, but these errors were encountered: