[Speex-dev] Allignment of vorbis, flac and speex headers

Neville Webb d8 at intekom.co.za
Sat Jun 4 03:55:39 PDT 2005


Please acknowledge this message as I am not sure if your organizations still exist.

On trying to integrate your 3 formats into an app I find that the position of the start of each format ID differs.

Both "vorbis" and "fLaC" start at char 29 (the 30th char in the file) and "speex   " starts at char 28 (the 29th char in the file).

Speex appears to correlate with the documents supplied and the other two not.

In the file at  \vorbis-tools-1.0.1\ogg123\speex_format.c I find the following

int speex_can_decode (data_source_t *source)
  char buf[36];
  int len;

  len = source->transport->peek(source, buf, sizeof(char), 36);

  if (len >= 32 && memcmp(buf, "OggS", 4) == 0
      && memcmp(buf+28, "Speex   ", 8) == 0) /* 3 trailing spaces */
    return 1;
    return 0;


In the file at  \vorbis-tools-1.0.1\oggenc\flac.c  I find the following

int oggflac_id(unsigned char *buf, int len)
 if (len < 32) return 0;

 return memcmp(buf, "OggS", 4) == 0 && flac_id(buf+28, len - 28);

It looks as if the format of the ogg header has changed and the documentation has not, and this info has not been passed onto the speex folks.

On trying to decode an empty .spx file using speexdec.exe  I get an op-system generated error "This program has performed an illegal operation and has been closed down"". This  I think is caused by trying to read beyond the EOF.  

Speex also does not appear to set up the exit code.

Is there a "totally-silent" option for speexenc.exe and speexdec.exe?

I would appreciate it if I could get an early reply to e-mail that I sent a few days ago.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20050604/d9cabd41/attachment.html

More information about the Speex-dev mailing list