[CM] Disk full with SND files in /tmp

e deleflie edeleflie@gmail.com
Fri, 25 May 2007 09:08:16 +1000


Wont that load the full contents of the original sound file into RAM?
(or does that already happen?)

Some of my files are over 500 MB large ... and the conversion will be
running on a web server so I'm a bit conservative with RAM useage ...
(BTW ... the website I am working on is www.ambisonia.com)

 ... an other thought, couldn't I explicitely call the Guile GC
myself? or perhaps explicitely set a 'null' object to the file reader?
(I'm thinking from other languages)

Etienne

On 5/25/07, Bill Schottstaedt <bil@ccrma.stanford.edu> wrote:
> > I did a search for recnelty modified files and found that /tmp is
> > filling up with very large files named snd_xxx_0.snd
>
> An interesting problem!  I never noticed it because I don't "exit" from
> my various tests.  The temp file is the output of src-sound.  Since
> you set up sample-readers into that data, I can't automatically delete
> it when the sound is closed -- the readers have not yet been garbage
> collected by Guile, so they might conceivably be accessed.  In "normal"
> operation, the file would be deleted when the GC finally got called,
> but in this case, you call "exit" which bypasses the GC (even calling
> it explicitly at the end doesn't help in this case, though the Guile
> folks claim this is not a bug).  So, I think the following will fix it:
> set up a list of readers, call apply-ladspa, then explicitly free those
> readers:
>
>           (let ((readers
>                    (list (make-sample-reader 0 0 0)  ; W
>                          (make-sample-reader 0 0 1)  ; X
>                          (make-sample-reader 0 0 2)  ; Y
>                          (make-sample-reader 0 0 3)))) ; Z
>             (apply-ladspa readers
>                           (list "ambis1"
>                                 "Ambisonics-square-decoder" 0 1 1.4138 2 380 2.7)
>                           (mus-sound-frames name)
>                           "ambisonic file")
>             (for-each free-sample-reader readers))
>
> Also, you'll need the new (today's) tarball to compile the no-gui version;
> whenever Sourceforge comes back, I'll also update the CVS version.
>
>