Re: [ecasound] Playing float wav files

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

Subject: Re: [ecasound] Playing float wav files
From: Kai Vehmanen (k_AT_eca.cx)
Date: Wed Oct 03 2001 - 22:43:38 EEST


On Thu, 19 Jul 2001, toby wrote:

> I have been using ecasound to play floating point
> wav files that I generate with csound. It is very
[...]
> I was noticing that ecasound seems to expect the
> file to range in amplitude within a signed, 16 bit
> integer. Lower values sound low, and higher values
> clip, just as would be the case with a 16bit file.

Actually ecasound expects the float data to be normalized to [-1.0,1.0]
range. This is also how ecasound internally represents all audio data.

> The thing is, that csound writes a PEAK chunk into
> the header of .wav files, which could be used to
> predetermine the loudest sample. A program could use

Hmm, this should probably be added to the wav-specific code. It would
scale the wav-file data to [-1,1] range (according to the peak-info)
before sending it to the engine. I'll add this to my todo-list, although I
probably won't have time to implement this at least in the near future.

If anyone else is interested in hacking this, go to
'ecasound/libecasound/audioio-wave.cpp', and there the read_samples() and
write_samples() functions.

-- 
 http://www.eca.cx
 Audio software for Linux!

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


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

This archive was generated by hypermail 2b28 : Wed Oct 03 2001 - 22:41:02 EEST