#46 2GB limit for reading!

puredata (65)

my patch [1312885] fixed the problem with writing files with [writesf~] which are larger than 2GB.

however, this does not work for reading soundfiles, since open_via_path() uses the non-largefile functions read() and fstat().

this patch (against current CVS 18.01.2006) for s_path.c allows to open huge files via open_via_path(), and therefore large files can be played back via [readsf~].

again, this only works on *nix's.


  • IOhannes m zmölnig

    patch for s_path.c against pd-0.41cvs

  • IOhannes m zmölnig

    Logged In: YES
    Originator: YES

    there is also a problem with the "skipframes" option, since pd uses "int" as return value from lseek() (and lseek64()), which is not recommended.
    it should be (off_t) and (__off64_t) resp.

    however there might be even more problems involved.
    i'll have to investigate...

  • Miller Puckette

    Miller Puckette - 2007-05-20

    Logged In: YES
    Originator: NO

    I applied this and changed one "lseek" (I think the only important one) to
    use "__off64_t" where appropriate. I don't see how this could do any harm,
    and who knows, perhaps it will actually work.

  • IOhannes m zmölnig

    Logged In: YES
    Originator: YES

    reassigned this to me: this patch is not yet fully working: it requires a rewrite of the soundfile-readers/writers to be able to read/write more than 1 data-chunk.

  • IOhannes m zmölnig

    • labels: 680704 --> puredata
    • milestone: 214416 -->
    • assigned_to: millerpuckette --> zmoelnig
  • IOhannes m zmölnig

    • status: open --> pending
  • IOhannes m zmölnig

    hmm, i realized that fileformats like WAV don't allow to have multiple data chunks, and the size of the data chunk is a signed 32bit integer, so - by definition - WAVs cannot handle more that 2GB data chunks.

    i guess we can therefore close this feature request as being implemented.



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks