RE: [ecasound] A bug in writing wave headers?

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: RE: [ecasound] A bug in writing wave headers?
From: Rob Coker (rcs@birch.net)
Date: Mon Dec 11 2000 - 16:01:02 EET


Kai,

I'm pretty sure you know this, but there are two file sizes in a *.wav file.
One is the data buffer size, the other is the whole file size. Maybe you're
filling one and not the other?

Rob

> -----Original Message-----
> From: ecasound-list-owner@wakkanet.fi
> [mailto:ecasound-list-owner@wakkanet.fi]On Behalf Of S. Massy
> Sent: Sunday, December 10, 2000 5:12 PM
> To: ecasound-list@wakkanet.fi
> Subject: Re: [ecasound] A bug in writing wave headers?
>
>
> On Mon, 11 Dec 2000, Kai Vehmanen wrote:
>
> > On Sat, 9 Dec 2000, S. Massy wrote:
> >
> > > Has something been changed in the code responsible for writing wave
> > > files headers?
> > > It seems that ecasound leaves a zero in the length field, or so
> > > complained foreign applications. To play a wave produced by ecasound
> > > with sox I had to put it into "raw mode". I didn't have this problem
> >
> > Nothing has been changed in a long while. Ecasound initialized the
> > length to zero when wav-file is create, and only updates the field
> > when closing the file (only then we know the length of the created
> > file). Now in some cases (ecasound crashes, etc), the wave-header might
> > not get updated. If this happens "ecasound -i broken.wav -o fixed.wav"
> > should do the trick. I tried latest ecasound&sox combination and worked
> > fine for me.
> Well, something is wrong definitely, I had never ru across this
> before: here's a documented example...
>
> Script started on Sun Dec 10 17:56:52 2000
>
> tak:/mnt/tmp# ecasound -d:255 -i:/dev/dsp -o:test.wav -c
> ******************************************************************
> **********
> * ecasound v1.8.6d15 (C) 1997-2000 Kai Vehmanen
> *
> ******************************************************************
> **********
> (eca-session) Set debug level to: 255
> (eca-session) Interactive mode enabled.
> (samplebuffer<>) Buffer created, channels: 0, length-samples: 0,
> sample rate: 0.
> (eca-static-object-maps) Opening internal plugin file
> "/usr/local/lib/ecasound-plugins/libaudioio_alsa.so" failed,
> because: "undefined symbol: audio_io_interface_version"
> (audioio-alsa2) construct
> (audioio-alsa2) construct
> (eca-static-object-maps) Opening internal plugin file
> "/usr/local/lib/ecasound-plugins/libaudioio_alsa3.so" failed,
> because: "undefined symbol: audio_io_interface_version"
> (eca-static-object-maps) Opening internal plugin file
> "/usr/local/lib/ecasound-plugins/libaudioio_arts.so" failed,
> because: "undefined symbol: audio_io_interface_version"
> (eca-chainsetup) Interpreting global option "-i:/dev/dsp".
> (eca-chainsetup) Interpreting global option "-o:test.wav".
> (chain) constuctor: CHAIN
> add_default_chain()
> (eca-chainsetup) Interpreting object option "-i:/dev/dsp".
> (eca-audio-objects) adding file "/dev/dsp".
> Eca-audio-objects/Parsing input
> (eca-object-map) match: /dev/dsp[0-9]*-/dev/dsp
> (eca-object-factory) Object "-i:/dev/dsp" created, type "OSS
> soundcard device". Has 1 parameter(s).
> (eca-audio-objects) Assigning file to chains: default
> (eca-chainsetup) Interpreting object option "-o:test.wav".
> (eca-audio-objects) adding file "test.wav".
> Eca-audio-objects/Parsing output
> (eca-object-map) match: \.wav$-.wav
> (eca-object-factory) Object "-o:test.wav" created, type "RIFF
> wave file". Has 2 parameter(s).
> (eca-chainsetup) Assigning file to chains: default
> - [ Chainsetup/Enabling audio inputs ]
> -------------------------------------
> (audioio-types/buffered) /dev/dsp: Setting buffer size [1024,44100].
> (audioio-types/buffered) /dev/dsp: Set buffer size [1024].
> Setting OSS fragment size according to buffersize() 1024.
> Setting OSS fragment size to 4096.
> set OSS fragment size to (2^x) 12.
> OSS set to use fragment size of 4096.
> (eca-audio-objects) Audio object "/dev/dsp", mode "read".
> (audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
> - [ Chainsetup/Enabling audio outputs ]
> ------------------------------------
> (audioio-types/buffered) test.wav: Setting buffer size [1024,44100].
> (audioio-types/buffered) test.wav: Set buffer size [1024].
> (program flow: write_riff_header())
> Riff ID: RIFF
> Wave data size 4294967284
> Riff type Riff type: WAVE
> Wrote RIFF format header.
> (program flow: write_riff_datablock())
> (eca-audio-objects) Audio object "test.wav", mode "read/write".
> (audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
> Connecting connected chainsetup to engine.
> ecasound ('h' for help)> t
> - [ Controller/Processing started ]
> ----------------------------------------
> ecasound ('h' for help)> (eca-controller) Engine-thread pid: 24926
> (samplebuffer<>) Buffer created, channels: 2, length-samples:
> 1024, sample rate: 0.
> Engine/Initializing
> (audioio-types/buffered) /dev/dsp: Setting buffer size [1024,44100].
> (audioio-types/buffered) /dev/dsp: Set buffer size [1024].
> Input "/dev/dsp": start position 0, number of connected chain 1 .
>
> (audioio-types/buffered) test.wav: Setting buffer size [1024,44100].
> (audioio-types/buffered) test.wav: Set buffer size [1024].
> Output "test.wav": start position 0, number of connected chain 1 .
>
> (samplebuffer<>) Buffer created, channels: 2, length-samples:
> 1024, sample rate: 44100.
> (samplebuffer<>) Buffer copy-constructed, channels: 2,
> length-samples: 1024, sample rate: 44100.
> - [ Engine/Init - mixmode "simple" ]
> ---------------------------------------
> (eca-main) Start
> (audioio-oss) Audio device "/dev/dsp" started.
> s
> - [ Controller/Processing stopped ]
> ----------------------------------------
> ecasound ('h' for help)> (eca-main) Stop
> (audioio-oss) Audio device "/dev/dsp" disabled.
> (eca-main) Signaling stop-cond
> quit
> (eca-main) ecasound_queue: exit!
> ECA_PROCESSOR destructor!
> - [ Engine/Exiting ]
> -------------------------------------------------------
> ---
> Exiting...
> tak:/mnt/tmp# wavp test.wav
> WavTools 1.3 Written by Colin Ligertwood.
> This software is provided as is. No waranty is offered, implied
> or included.
> Playing [FILE: test.wav] [LENGTH: 0]
> [RATE: 44100] [BPS: 176400] [DEPTH: 16] [CHANNELS: 2]
>
>
> tak:/mnt/tmp# exit
> exit
>
> Script done on Sun Dec 10 17:59:15 2000
>
> >
> > --
> > . http://www.eca.cx ... [ audio software for linux ] /\ .
> > . http://www.eca.cx/sculpscape [ my armchair-tunes mp3/ra/wav ]
> >
> > --
> > To unsubscribe send message 'unsubscribe' in the body of the
> > message to <ecasound-list-request@wakkanet.fi>.
> >
> --
> To unsubscribe send message 'unsubscribe' in the body of the
> message to <ecasound-list-request@wakkanet.fi>.
>

--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Dec 11 2000 - 16:07:51 EET