#4 "Could not open file"-problem with 5-hour, 48KHz file



I have downloaded Wavsplit to split a wave file I have
created from a DVB-broadcast. It ist PCM, Stereo,
48KHz, 16bit and about 5 hours long, which makes it
about 3.5GB.
Wavesplit tells me "Could not open file." when I trie to
split it.


  • Alan Peter Fitch

    Logged In: YES

    Sent email to mhunstig to try and track down problem, with
    extra line to print out the error message. Probably an issue
    with large file support as 3.5G is more than 2**31 bytes

    ifd = open (ifile, O_RDONLY);
    if (ifd == -1) {
    fprintf (stderr, "Could not open file.\n");
    printf ("Error number was %d %s \n", errno,
    strerror(errno)); /* new line */
    return 1;

  • Alan Peter Fitch

    Logged In: YES

    Confirmed this is a large file problem. May (possibly?) be
    fixed on Gnu/LInux by putting -D_LARGEFILE64_SOURCE in
    CFLAGS in the Makefile, and opening the file using

    ifd = open (ifile, O_RDONLY | O_LARGEFILE);

    Awating confirmation if this fixes the problem

  • Alan Peter Fitch

    • assigned_to: nobody --> apfitch
  • Alan Peter Fitch

    Logged In: YES

    It's not a bug, it's a feature :-)
    The wav format is limited in length to 2 Gb, as the length is
    stored in a 32 bit field.

    Hence the bug is closed.

    Possibly a version of wavsplit that ignores that field and has
    Large File support could be written.

  • Alan Peter Fitch

    • status: open --> closed

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

Sign up for the SourceForge newsletter:

No, thanks