[Audacity-devel] 2hr Recording Bug fix now in CVS
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: James C. <cr...@in...> - 2004-07-28 13:04:07
|
I've tracked down a repeatable bug in recording on windows:
at 44100 Hz Mono takes 1hr 43 mins
at 96000 Hz Mono takes 48 mins
at 96000 Hz Stereo takes 23 mins.
for the record cursor to 'wrap around'.
in pa_win_mme.c
PaHost_UpdateStreamTime( PaWMMEStreamData *wmmeStreamData )
Was:
wmmeStreamData->framesPlayed += ((long)mmtime.u.sample) -
wmmeStreamData->lastPosition;
wmmeStreamData->lastPosition = (long)mmtime.u.sample;
Now:
wmmeStreamData->framesPlayed += (long)((DWORD)mmtime.u.sample -
(DWORD)(wmmeStreamData->lastPosition));
wmmeStreamData->lastPosition = (long)mmtime.u.sample;
I'm hoping this is the underlying cause of the recording bug that has been
reported to the list.
It would be a huge help if someone else with windows would try a 2hr
recording at 96000Hz Stereo before this patch, and then again after.
If they get the anticipated results, then I think we can safely close the
bug.
--James.
I also suspect this line
delta = info.bytes - pahsc->pahsc_LastPosPtr;
in the linux version of
Pa_UpdateStreamTime(PaHostSoundControl *pahsc)
Has the same problem,
pahsc_LastPosPtr is an int
if info.bytes is a DWORD (I can't tell from the code I have)
then we need to (DWORD) cast pahsc_LastPosPtr to get
the correct delta in spite of wrap around.
--James.
|