On Thu, 2004-09-09 at 14:07, Eric Dantan Rzewnicki wrote:
Here is one way to be sure ecasound uses
libsamplerate:
ecasound -f:16,2,44100 -i:resample-hq,auto,hi-quality.wav -o:lower-quality.wav
The resample-hq input object type, with the auto flag, is a special type
that causes ecasound to automatically read the format of the input .wav
and resample it using libsamplerate to match the format set for the rest
of the chain. I imagine the above command will fail if ecasound is not
compiled with src support. There is a similar resample object that uses
the internal linear interpolation. For both object types auto can be
replaced with the actual sample format if your input file format lacks
that info. One example would be raw input files.
It ran, but it did not apparently downsample. Granted I took a mono file
as input and wrote a stereo file out, but the output sample rate is
still reported as 96K. I will try your 2-mono to stereo example in a
minute.
ecasound -f:16,2,44100 -i:resample-hq,auto,
data/GTSB-96K-24bit-Audio/T01-Startdust.L.wav -o:TEST1.wav
****************************************************************************
* ecasound v2.3.3 (C) 1997-2004 Kai
Vehmanen
****************************************************************************
- [ Session created ]
------------------------------------------------------
- [ Chainsetup created (cmdline) ]
-----------------------------------------
(eca-chainsetup-parser) Note! Interpreting option
data/GTSB-96K-24bit-Audio/T01-Startdust.L.wav as
-i:data/GTSB-96K-24bit-Audio/T01-Startdust.L.wav.
- [ Connecting chainsetup ]
------------------------------------------------
(eca-chainsetup) 'nonrt' buffering mode selected.
Warning: DBC_CHECK failed - "samples_per_second() > 0", audioio.cpp,
195.
Warning: DBC_CHECK failed - "samples_per_second() > 0", audioio.cpp,
195.
(eca-chainsetup) Audio object "", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
(eca-chainsetup) Audio object
"data/GTSB-96K-24bit-Audio/T01-Startdust.L.wav", mode "read".
(audio-io) Format: s24_le, channels 1, srate 96000, interleaved.
(eca-chainsetup) Audio object "TEST1.wav", mode "read/write".
(audio-io) Format: s16_le, channels 2, srate 96000, interleaved.
- [ Chainsetup connected ]
-------------------------------------------------
(eca-controller) Connected chainsetup: "command-line-setup".
- [ Controller/Starting batch processing ]
---------------------------------
- [ Engine init - Driver start ]
-------------------------------------------
- [ Controller/Batch processing finished ]
---------------------------------
- [ Engine exiting ]
-------------------------------------------------------
(eca-controller) Disconnecting chainsetup: "command-line-setup".
- [ Chainsetup disconnected ]
----------------------------------------------
flash mark $
flash mark $ sndfile-info TEST1.wav
Version : libsndfile-1.0.10
========================================
File : TEST1.wav
Length : 81780116
RIFF : 81780104
WAVE
fmt : 16
Format : 0x1 => WAVE_FORMAT_PCM
Channels : 2
Sample Rate : 96000
Block Align : 4
Bit Width : 16
Bytes/sec : 384000
data : 81780072
End
----------------------------------------
Sample Rate : 96000
Frames : 20445018
Channels : 2
Format : 0x00010002
Sections : 1
Seekable : TRUE
Duration : 00:03:32.968
Signal Max : 30318 (-0.67 dB)
flash mark $
flash mark $ sndfile-info
data/GTSB-96K-24bit-Audio/T01-Startdust.L.wav
Version : libsndfile-1.0.10
========================================
File : data/GTSB-96K-24bit-Audio/T01-Startdust.L.wav
Length : 61336078
RIFF : 61336070
WAVE
bext : 602
fmt : 16
Format : 0x1 => WAVE_FORMAT_PCM
Channels : 1
Sample Rate : 96000
Block Align : 3
Bit Width : 24
Bytes/sec : 288000
*** minf : 16 (unknown marker)
*** elmo : 338 (unknown marker)
data : 61175574
*** regn : 92 (unknown marker)
*** ovwf : 159340 (unknown marker)
*** umid : 24 (unknown marker)
End
----------------------------------------
Sample Rate : 96000
Frames : 20391858
Channels : 1
Format : 0x00010003
Sections : 1
Seekable : TRUE
Duration : 00:03:32.415
Signal Max : 4.20391e+06 (-6.00 dB)
flash mark $