Re: MixW wave bug still there.

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

Subject: Re: MixW wave bug still there.
From: reine_AT_mbox314.swipnet.se
Date: ke tammi  06 1999 - 13:20:51 EST


On 6 Jan, Paul Winkler wrote:

Dear Paul,

Thank you for all your work.

Here is the wave header I´m using.
I hope the small comments will be of some help to you.
I don´t know if you are a C programmer but incase not
a long is four bytes long and a short is two bytes long.
The places you show me that has different data is
the variables I call length and data_length.

 
typedef struct {
   unsigned long main_id; /* 'RIFF' : 1179011410 */
   unsigned long length; /* File-lenght */
   unsigned long wave_id; /* 'WAVE' : 1163280727 */
   unsigned long fmt_id; /* 'fmt' : 544501094 */
   unsigned long fmt_length; /* length of fmt_chunk, 16 bits? */
   unsigned short format; /* 1 for PCM code */
   unsigned short channels; /* 1=MONO, 2=STEREO */
   unsigned long sampleRate;
   unsigned long byte_per_second;
   unsigned short samplesize; /* 1 or 2 bytes */
   unsigned short bit; /* ?? 8,12,16 bit */
   unsigned long data_id; /* 'data' : 1635017060 */
   unsigned long data_length; /* sample count */
} WAV_HEADER;

In mixw the following is done:
First the header is created and written to disk.
The function is calles AFopenfd().
As the program doesn't know about the final length of the files
the length (file-length) and data_length (nr of samples) is
set to zero.

When mixw closes the file (the function is called AFclosefile) it
writes the header again now with updated and correct
length and data_length.

It seems to me that this update is not done the same on our both
mashines. Here is what soundinfo says about a test.wav just done here:

~/Ljud#sndinfo test.wav
test.wav: WAVE, 28672 stereo samples
        WAVE soundfile
        srate 44100, stereo, 16 bit shorts, 0.65 seconds
        headersiz 44, datasiz 114688 (28672 sample frames)

>From the little i know about .wav format i guess that there is one
info about the total file-length and one about the sound that mixw uses,
and most of us i guess. If a file with text-info and several sounds
or loops where used i guess there would be a great difference
in the meaning of length and data_length. Now mixw only uses a very
small subest of the RIFF format. I only studied this as far as I was
able to make it work :).

My question is why is this update of the header not correctly done
on some computers but on others?

I have here a Debian 2.0 setup. Kernel version 2.0.35 compiled with
gcc version 2.7.2.3. The same compiler as mixw uses. I compile it
with lesstif (lesstif-0.87.0-linux-glibc2.tar.gz).

What do you use?
Have you used a precompiled version or have you compiled it locally?

Whatelse could be of importance ?

I have got one report that it works and one other (from the older pre
dec 1998 version) that is does not work.

Maybe I should do a kind of debug version an send to you
and you could send me the results back?
What do you say about big (about the size of mixw.tar.gz) emails?

Otherwise I'm writing an piece for the Helsingborg Symphony orchestra,
about 30 minutes of music. There is only one program I use in Windows
and that is Finale, to write my score. I cant make it work under
Linux, if you know anything about please tell me.

Bye for now

Reine


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

This archive was generated by hypermail 2b28 : ma maalis 13 2000 - 11:59:35 EST