Interesting.
The pattern of "percents" is identical to my home computer with a different length of audio file in a different format. It always goes 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
14, 16, 20, 25, 33, 50, 100.
My work computer is completely different and faster (Windows XP x64, 52x Burner, 2.5GB, Pentium D) so the times shown here are about 3 times faster than at home.
Note: I am always burning a single audio file that is > 30 minutes in length. I haven't tested this when burning multiple audio files.
Here's what I did to the AudioBurner sample (Visual Studio 2008):
Code:
public void OnProgress(int Percent, int TimeRemaining)
{
if(m_isBurningProgress)
{
if(m_burningProgressForm != null)
{
m_burningProgressForm.SetBurningProgress(Percent);
}
this.Invoke((MethodInvoker)delegate
{
textBox1.Text += System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss.ffff") + " - " + Percent.ToString() + " - " + new TimeSpan(0, 0, TimeRemaining).ToString() + System.Environment.NewLine;
});
}
else
{
if(m_fsAddingProgressForm != null)
{
m_fsAddingProgressForm.SetProgress(Percent);
}
}
}
I added a text box to the frmAudioBurner.cs form and I'm just writing a single line to the text box each time OnProgress fires. (And I'm syncing to the main thread in case that is an issue... wasn't sure).
Here is my result:
2008-06-19 06:20:47.7643 - 0 - 00:00:00
2008-06-19 06:20:59.4048 - 0 - 00:00:00
2008-06-19 06:21:14.3890 - 1 - 00:00:49
2008-06-19 06:21:15.4046 - 2 - 00:00:49
2008-06-19 06:21:16.4202 - 3 - 00:00:48
2008-06-19 06:21:17.4358 - 4 - 00:00:48
2008-06-19 06:21:18.4514 - 5 - 00:00:48
2008-06-19 06:21:19.4670 - 6 - 00:00:47
2008-06-19 06:21:20.4826 - 7 - 00:00:47
2008-06-19 06:21:22.5139 - 8 - 00:00:46
2008-06-19 06:21:23.5295 - 9 - 00:00:45
2008-06-19 06:21:24.5451 - 10 - 00:00:45
2008-06-19 06:21:25.5607 - 11 - 00:00:44
2008-06-19 06:21:26.5919 - 12 - 00:00:44
2008-06-19 06:21:27.6076 - 14 - 00:00:43
2008-06-19 06:21:29.6388 - 16 - 00:00:42
2008-06-19 06:21:31.6700 - 20 - 00:00:41
2008-06-19 06:21:35.7324 - 25 - 00:00:39
2008-06-19 06:21:40.8105 - 33 - 00:00:37
2008-06-19 06:21:47.9198 - 50 - 00:00:33
2008-06-19 06:22:02.1384 - 100 - 00:00:24
2008-06-19 06:22:42.7003 - 100 - 00:00:00
2008-06-19 06:22:42.9972 - 100 - 00:00:00
So as you can see, it starts off working as expected but then around the 12% mark it starts missing percentages. Around 20% it starts missing time. And it hits 100% with 24 seconds remaining, hitting it later once it is actually just about finished.
I won't presume to know anything about why this is happening, but it looks like a division and/or a rounding error in the status.
Consider (with the assumption that all decimal portions are removed rather than rounded):
100% = 1/1
50% = 1/2
33% = 1/3
25% = 1/4
20% = 1/5
16% = 1/6
14% = 1/7
12% = 1/8
11% = 1/9
10% = 1/10
9% = 1/11
8% = 1/12
And so on.
And at 7% and beyond, more than one increment of the divisor provides the same percent value (eg: 1/17, 1/18, 1/19 all provide 5%) but if the percent hadn't changed maybe OnProgress wouldn't fire.
I don't know if my math pattern matching will be any help or not but I hope it is.
- Shaun