[ecasound] mono to mono. (also: example of 44.1 resample to 8k)

From: Brad Fuller <brad@email-addr-hidden>
Date: Thu Mar 31 2005 - 18:16:30 EEST

Kai mentioned that you need to include the format of the output file if
you want to deviate from the default. In my example, I have a mono input
file, and I want to produce a mono output file.

The input in the following two examples is mono with a SR of 8k. I want
a mono output file. But, no matter what I put as the '-f' parameters,
ecasound still outputs a 2channel output file. In fact, I get the same
w/o specifying '-f' or even if I set the #channels to '4'.

here are the examples:

==================================
[bfuller@email-addr-hidden test]$ ecasound -f:s16_le,1,8000,n -i:BAT2013_8k.wav
-o:BAT2013_8k_TEST.wav
****************************************************************************
* ecasound v2.3.5 (C) 1997-2004 Kai Vehmanen
****************************************************************************
- [ Session created ] ------------------------------------------------------
- [ Chainsetup created (cmdline) ] -----------------------------------------
- [ Connecting chainsetup ] ------------------------------------------------
(eca-chainsetup) 'nonrt' buffering mode selected.
(eca-chainsetup) Audio object "BAT2013_8k.wav", mode "read".
(audio-io) Format: s16_le, channels 1, srate 8000, interleaved.
(eca-chainsetup) Audio object "BAT2013_8k_TEST.wav", mode "read/write".
(audio-io) Format: s16_le, channels 2, srate 8000, noninterleaved.
- [ Chainsetup connected ] -------------------------------------------------
(eca-controller) Connected chainsetup: "command-line-setup".
- [ Controller/Starting batch processing ] ---------------------------------
- [ Engine init - Driver start ] -------------------------------------------
- [ Controller/Batch processing finished ] ---------------------------------
(eca-controller) Disconnecting chainsetup: "command-line-setup".
- [ Chainsetup disconnected ] ----------------------------------------------
==================================

==================================
[bfuller@email-addr-hidden test]$ ecasound -f:s16_le,2,8000,n -i:BAT2013_8k.wav
-o:BAT2013_8k_TEST.wav
****************************************************************************
* ecasound v2.3.5 (C) 1997-2004 Kai Vehmanen
****************************************************************************
- [ Session created ] ------------------------------------------------------
- [ Chainsetup created (cmdline) ] -----------------------------------------
- [ Connecting chainsetup ] ------------------------------------------------
(eca-chainsetup) 'nonrt' buffering mode selected.
(eca-chainsetup) Audio object "BAT2013_8k.wav", mode "read".
(audio-io) Format: s16_le, channels 1, srate 8000, interleaved.
(eca-chainsetup) Audio object "BAT2013_8k_TEST.wav", mode "read/write".
(audio-io) Format: s16_le, channels 2, srate 8000, noninterleaved.
- [ Chainsetup connected ] -------------------------------------------------
(eca-controller) Connected chainsetup: "command-line-setup".
- [ Controller/Starting batch processing ] ---------------------------------
- [ Engine init - Driver start ] -------------------------------------------
- [ Controller/Batch processing finished ] ---------------------------------
(eca-controller) Disconnecting chainsetup: "command-line-setup".
==================================

Maybe this will be something:
When I try to resample from 44100 to 8000 I receive the following error:

Warning: DBC_CHECK failed - "impl_repp->rt_lock_rep != true",
samplebuffer.cpp, 850.

Here's the whole stdout. BAT2013.wav is 44100, mono. From the outputed
text, it looks like ecasound thinks that the input file is 8k. (Maybe i
have the args wrong.)

==================================
[bfuller@email-addr-hidden test]$ ecasound -f:16,1,8000 -i:resample,44100,BAT2013.wav
-o:BAT2013_8k.wav
****************************************************************************
* ecasound v2.3.5 (C) 1997-2004 Kai Vehmanen
****************************************************************************
- [ Session created ] ------------------------------------------------------
- [ Chainsetup created (cmdline) ] -----------------------------------------
- [ Connecting chainsetup ] ------------------------------------------------
(eca-chainsetup) 'nonrt' buffering mode selected.
(eca-chainsetup) Audio object "BAT2013.wav", mode "read".
(audio-io) Format: s16_le, channels 1, srate 8000, interleaved.
(eca-chainsetup) Audio object "BAT2013_8k.wav", mode "read/write".
(audio-io) Format: s16_le, channels 1, srate 8000, interleaved.
- [ Chainsetup connected ] -------------------------------------------------
(eca-controller) Connected chainsetup: "command-line-setup".
- [ Controller/Starting batch processing ] ---------------------------------
- [ Engine init - Driver start ] -------------------------------------------
Warning: DBC_CHECK failed - "impl_repp->rt_lock_rep != true",
samplebuffer.cpp, 850.
- [ Controller/Batch processing finished ] ---------------------------------
(eca-controller) Disconnecting chainsetup: "command-line-setup".
- [ Chainsetup disconnected ] ----------------------------------------------
==================================

When looking at the source, I see:

==================================
/**
 * Sets the number of audio channels.
 */
void SAMPLE_BUFFER::number_of_channels(channel_size_t len)
{
  // std::cerr << "(samplebuffer_impl) ch-count changes from " <<
channel_count_rep << " to " << len << ".\n";

  if (len > static_cast<channel_size_t>(buffer.size())) {
    DBC_CHECK(impl_repp->rt_lock_rep != true);
.
.
==================================

Maybe the two issues are related, maybe not.

brad

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Thu Mar 31 20:15:25 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 31 2005 - 20:15:25 EEST