Re: Audacity Recording Freeze at 38m 47.5s: Win7
Posted: Mon Jul 09, 2012 9:01 am
The formula is the (first) one I fished from the web - not from Audacity documentation. You're right - it's a shortcut that is "roughly" correct (but the result a little too large) because it uses an implied divisor of /1000 (to take kHz input) rather than a second divisor of /1024.otwo_pipes wrote:PGA wrote:and all I can say is I whole heartedly agree.Sample rate x number of seconds x sample format x number of channels = total number of bits
Total number of bits / 8 = total number of bytes
Total number of bytes /1024 = total number of KBytes
Total number of KBytes / 1024 = total number of MBytes
So, if recording CD quality (Sample rate=44100, sample format = 16bit), the actual numbers for one minute become:
44100 x 60 x 16 x 2 / 8 / 1024 /1024 = 10.094MB (to 3 decimal places)
But I think we can agree that PGA's formula or the one at http://tinyurl.com/cb7tc3k will produce the result of 0.549 MB per second for 24x96 stereo capture, *when Audacity writes to disk*, correct? You can verify this by turning off audio cache and looking in the temporary folder.
otwo_pipes wrote:this is NOT what I see. As I said in my last posting, I have started to use Microsoft's' Process Monitor to look at memory usage and I have no reason to doubt the results obtained from the use of this program. My results are (with audio cache disabled);-Gale Andrews wrote:However you play with formulas, you can concur I think that 24x96 recording requires some 33 MB per minute of RAM or disk space just by looking at one minute of
recording (with audio cache disabled) in the Audacity _data folder.
For 1 minute of recording, averaged from 6 measurements, recording at 16/96 the memory used was 23.2 MB/minute
For 1 minute of recording, averaged from 6 measurements, recording at 32/96 the memory used was 45.8 MB/minute
and the real interesting one is of course 24/96 capture whereby we have
For 1 minute of recording, averaged from 6 measurements, recording at 24/96 the memory used was 45.8 MB/minute
My testing to obtain these results was identical and my interpretation of these measurements is Audacity is using 4 bytes per sample for both 24 and 32 bit recording.
Yes, I believe this is what Audacity is doing when recording to RAM in 24-bit, for obscure reasons. See http://bugzilla.audacityteam.org/show_bug.cgi?id=50 .
However I don't think that is anything to do with the Audio Cache problems. What I am finding on Windows 7 (consistently over numerous tests and irrespective of 24-bit RAM recording taking RAM amounts corresponding to 32-bit disk capture ) is that about 6 MB more RAM is being used than would be expected for disk capture. For one minute of stereo audio:
* 44100 Hz x 16-bit is about 16 MB taken in RAM instead of 10 MB on disk
* 44100 Hz x 32-bit is about 26 MB instead of 20 MB on disk
* 96000 Hz x 16-bit is about 29 MB instead of 23 MB on disk
* 96000 Hz x 32-bit is about 52 MB instead of 46 MB on disk
So that third and fourth items (96000 Hz) contrasts with what you are seeing by taking more RAM than expected. There is no swapping to page file during recording. This is on a machine that does not crash with audio cache enabled, just using Windows Task Manager. This "could" be a red herring but is more than a "formula" difference.
If you do audio cache "on versus off" comparisons for those four settings, do you see anything like that?
Seemingly not directly, because you see the same block size when writing to disk.otwo_pipes wrote:I wonder if:-has anything to do with the file size for 24 and 32 bit recording being identical to all intents and purposes.Each .au file is 1 MB in size by default.
This is not what I seeing, my files are 780MB and not, as you say, 1MB. I don't know the relevance of this but I thought it was worth mentioning.
I agree the block file size for 24-bit (irrespective of Audio Cache being on or not) is 780 kb. I am not sure why that is at the moment. The block file size for 32-bit and 16-bit is 1 MB.
That was assuming you had used 1.3 GB of RAM but it is now apparent you would be using more RAM, because 24-bit recording to RAM uses space equivalent to 32-bit on disk (about 46 MB per minute for you, 52 MB for me for 24x96 stereo). But when recording stops and the cached audio is saved to disk, the size goes back to the expected 33 MB.otwo_pipes wrote:I can see 1GB of RAM has been used because I start with 1.3GB and have 300MB free when the system crashed but I do not see how you can say 300MB has been swapped to page file.
I don't understand why the sequence does not go d00, d01, d02, d03... as I think is intended. It should not get to d0c before having got past d99.otwo_pipes wrote:Correct:Also I note in your last image above of the folder structure, there was no d0c folder?No. Look again at the main Windows Explorer image and the sub directories of the e00 directory. The directories are d0a -d0e with d0c missing and d06 - d09 only. There are no directories d00 - d99.And had it already populated d00 - d99?
If Audacity wrote to disk and populated the temp folders, then it should never clean them when restarting, because crash recovery depends on them.otwo_pipes wrote:I do not know if this is relevant or not but when Audacity crashes it leaves, quite obviously, many directories and sub directories in the project directory. After a crash I always restart my system so I have a reference point to continue from. Audacity does not always clean the project directories correctly when re-starting i.e I have seen 4 project directories, one in use and 3 from previous crashes, when I took the directory screen shots. When Audacity crashes and I re-start Audacity asks if I wish to recover the data.
This could be relevant. Please start with empty temp directory and if no crashes, force quit to leave the temp data full, recover, then record.otwo_pipes wrote:The last testing I performed on Friday evening did NOT produce a crash on my Win7 system no matter what sample rate, bit depth or time tests were performed... The only change to procedure I started to adopt was I have deleted the Audacity temp directory due to Audacity not cleaning directories correctly when re-starting after a crash.
That is if this isn't already driving you spare, of course.
There is some chance we will remove this feature for 2.0.2 or increase the default minimum available memory. We will take a look at possible choices.
Gale