Ecasound documentation - Frequently-asked-questions (FAQ)


Table of Contents

1: Compiling

1.1: Errors when compiling audioio-af.cpp

1.2: If ecasound crashes - how to compile for debugging?

1.3: How to rebuild the source-RPMs with ALSA support?

2: Using

2.1: Can't open shared shared libraries

2.2: How do I use the parameter xxx?

2.3: Ecasound isn't doing anything but it still seems to hog all CPU-time

2.4: What file format should I use for mixing and recording?

2.5: Ecasound won't accept my chainsetup file/options! What's wrong with it?

2.6: I get occasional audio dropouts during operation? How to get rid of them?

2.7: Can I use multiple soundcards?

2.8: Ecasound is not able to find any LADSPA plugins I have installed!



1: Compiling

1.1: Errors when compiling audioio-af.cpp

Upgrade your audiofile headers. At least 0.1.6 version of the library has duplicate extern "C" -wrappers in the file aupvlist.h. The result looks like this:
--cut--
In file included from audioio-af.cpp:28:
/usr/local/include/audiofile.h:603: parse error before `}'
make[3]: *** [audioio-af.o] Error 1 
--cut--

1.2: If ecasound crashes - how to compile for debugging?

The easiest way is to increase debug level (-d:level option). This gives you a lot of info. Sometimes however, this is not enough. For debugging purposes, you should compile a separate debug version of ecasound. You can do this with "make distclean ; ./configure --enable-debug ; make install". This produces a new set of executables and libraries (libecasound_debug.so, ecasound_debug, etc). Notice that these are considerably slower than normal optimized versions. To summarize, if ecasound acts weirdly, try to reproduce the behaviour with _debug versions. This way all assertions are checked and extra debugging information helps to trace problems with gdb.

1.3: How to rebuild the source-RPMs with ALSA support?

If you have ALSA installed properly, normal rebuild is enough: "rpm --rebuild ecasound-x.y.zrt.src.rpm" (replace x, y, z and t with proper version numbers).

2: Using

2.1: Can't open shared shared libraries

If you get the following error message...

--cut--
error in loading shared libraries: libecasound.so.x: cannot open shared object file: No such
file or directory
--cut--

Add /usr/local/lib to your /etc/ld.so.conf and run "/sbin/ldconfig". If you haven't installed ecasound to the default location, replace /usr/local/lib with the correct library path. If the it still doesn't work, use "ldd /usr/local/bin/ecasound/" to see what library ecasound tries to use.

Same applies to other libraries used by ecasound (libkvutils, libaudiofile, etc).

2.2: How do I use the parameter xxx?

The best place to start is the file examples.html. It can be found from www.wakkanet.fi/ecasound (ecasound home page). Next you should check the ecasound(1) manual page. Finally, help given by the -h command line option is always up-to-date. If you still don't know what to do, mail me at kaiv@wakkanet.fi.

2.3: Ecasound isn't doing anything but it still seems to hog all CPU-time

You're probably running ecasound in raised-priority mode. It is turned on with the -r command line option or by specifying "default-to-raisepriority true" in your ~/.ecasoundrc.

2.4: What file format should I use for mixing and recording?

You should always use .raw or .wav. By doing this, you will probably get better performance as these formats are internally supported by ecasound.

2.5: Ecasound won't accept my chainsetup file/options! What's wrong with it?

Be sure to check the following rules:

  • Every chain has exactly _one_ input and _one_ output.
  • All inputs and outputs must be connected to some chain.
  • For every input/output, there must be exactly _one_ input/output specification (example specification: '-i:file.ext').
  • All routing from/to chains is based on selecting a set of chains and then specifying an input or output (example: '-a:1,2 -i:file.ext').
  • All audio copying and mixing is done channel-wise. If you attach a 4-channel input and a two-channel output to a chain, chain will have 4 channels of audio, but only the first two channels will be written to the output file.
  • 2.6: I get occasional audio dropouts during operation? How to get rid of them?

    Here's a link to a very good article written by Dave Phillips on Linux low-latency issues. And if in a hurry, here's a quick list of the things to try:
  • Tune your disks (see the article)
  • Enable ecasound's double-buffering system by using the -z:db option
  • If still having problems, run ecasound as root (or with SUID-bit set) and use ecasound's -r option. This will raise ecasound's scheduling priority to realtime (SCHED_FIFO).
  • Try to increase ecasound's buffersize with -b:sample_frames options. Something like -b:4096 should do the trick.
  • If all else fails, try the various low-latency kernel patches.
  • 2.7: Can I use multiple soundcards?

    This is possible, but there are some issues you should be aware of. If you try using multiple cheap soundcards to get more simultanious inputs for recording, it's likely that the resulting streams will not be in sync. This problem is explained in detail in the Linux Audio-Quality HOWTO - www.linuxdj.com/audio/quality/, section "Notes on Full Duplex Recording, and Other Realtime Issues".

    2.8: Ecasound is not able to find any LADSPA plugins I have installed!

    Just installing the LADSPA SDK www.ladspa.org should be enough. The plugins themselves are stored in shared library files (.so). They are usually stored in /usr/local/lib/ladspa. To test whether ecasound finds the plugins, issue:

    echo "ladspa-register" | ecasound -c

    You should get a list of all installed LADSPA plugins. If this doesn't work, you need to make sure ecasound is compiled with LADSPA enabled (ie. ladspa.h header was present when ecasound was compiled). The precompiled rpm-binaries have this, but if you've compiled ecasound yourself you should recompile after installing the LADSPA SDK.

    Also, check Dave Phillips' great article on Oreillynet.