Re: [linux-audio-dev] multiple files/single files for HDR: my verdict

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] multiple files/single files for HDR: my verdict
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: pe loka   15 1999 - 16:06:20 EDT


Juhana writes:

>>may know, lseek (fd, some-value-beyond-size-of-file, SEEK_SET) will
>>result in a zero-filled block if the file is subsequently written to
>>after the seek.
>
>You are going to record silence as well? 50 tracks will then take
>quite a much space even practically most of the tracks will be mostly
>silent. The editlist would be better.

three points: they won't be mostly silent. the whole point is that no
track gets recorded unless some stuff is written to it. ah, you say,
but that means that if i write 10 secs of sound to track 4 in the
middle of a 1 hour session, i get a 1 hour track instead of a 10 sec
one. You might think that this was obviously true, but read on ...

second and rather more importantly, this is where a subtlety of the
ext2fs comes into play. I didn't mention this because its not part of
the POSIX lseek spec, but when you do a seek like this on ext2fs, it
doesn't allocate any disk blocks. its called a hole. You can therefore
create a file with oodles of empty space and have it take (roughly)
only the disk blocks needed for the recorded data. this works even if
you punch in and out *a lot*. Note: you can't see this with ls(1).

finally, by using an editlist, you require a particular program or
library to play back the data. the files i am creating can be
converted by sox into regular .wav or .aiff files, or read by any
program than can open a file and read binary IEEE 32 bit floats from
it. since my program is an HDR, not a soundfile editor, i don't want
to force an editlist API on anything that I might want to use to
manipulate the recorded data. besides, as described above, ext2fs has
its own built-in equivalent of a rudimentary editlist, and its
intimately coupled with the whole disk subsystem - i'd rather use
that.

remember: this is meant to be the equivalent of an ADAT and a mixing
console. its not meant to be anything like any of the myriad of
soundfile editors out there. the functions are sufficiently different
that i prefer using a different program for each task.

>And is floating point 0 the same as 0x00000000?

yes. -0 is not the same, but its a distinction that doesn't bother me :)

See: http://pscinfo.psc.edu/general/software/packages/ieee/ieee.html

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:59 EST