Open Source Toolkit Documentation:
Communicator Audio/Telephony Server (CATS)
License / Documentation home / Help and feedback
CATS is a cross-platform Communicator-compliant audio server. CATS implements
basic multi-platform desktop audio capability, and is based on an object-oriented,
extensible software framework that allows alternate implementations to be
developed as plugins.
Once you've compiled CATS, if you've downloaded
CATS as part of the Open Source Toolkit, you can run CATS in a simple full-duplex
echo example.
Status
History and plans
This implementation was inspired by the JDAS Java desktop audio server,
which never worked completely due to shortcomings with JavaSound. It is a
fairly faithful reimplementation of the basic ideas in C, using a better
cross-platform audio solution (PortAudio).
The CATS server currently incorporates preliminary support for the ComputerFone
telephony device, and an initial cut at voice activity detection. We have
not yet incorporated echo cancellation.
Version history
- 0.1.0 on 3/22/02
- 1.0beta1 on 9/13/02
- 1.0beta2 on 10/4/02
Installation
Make sure you've followed the instructions below about setting up PortAudio.
The CATS server requires threads for PortAudio, but is not known to be
thread-safe enough that the individual timed tasks can be run as threads
themselves. The core Communicator Makefile support for this configuration
(thread-aware, but not tasks as threads) should be transparent, but isn't.
Just in case you ever wonder why the Unix Makefile is more complicated than
normal.
Unix
If you have downloaded CATS as part of the Open Source Toolkit, then
CATS should build automatically after you configure the toplevel Makefile.settings
file. If you have downloaded CATS as a standalone package, you should
modify the file cats_settings.make as instructed, then type make.
Windows
We've provided a MSVC workspace file for the CATS server which makes
four assumptions:
- CATS has been downloaded as part of the Open Source Toolkit, and
its executables should go in <OSTK_root>\bin\x86-nt.
- PortAudio can be found in c:\communicator\portaudio.
- MDTM can be found in c:\communicator\mdtm.
- The Galaxy Communicator distribution can be found in c:\communicator\GalaxyCommunicator.
You can change these assumptions, at least in MSVC 6.0, in the following
locations:
- Project -> Settings -> Debug -> General -> Executable
for debug session
- Project -> Settings -> C/C++ -> Preprocessor -> Additional
include directories
- Project -> Settings -> Link -> General -> Output file
name
- Project -> Settings -> Link -> General -> Object/library
modules
You should change the settings for both the debug and release versions.
Windows runtime notes
The MDTM library compiles to a DLL on Windows, and it must be in a location
where it can be found at runtime. Your options are:
- Place the MDTM libraries in one of the following three places that
Windows checks:
- the directory containing the executable
- the current directory
- the Windows system directory
- Modify your PATH environment variable to include the directory
which contains the library
If you choose the second option, the command will look something
like this:
C:\> set PATH=C:\communicator\mdtm\lib\win32\Release;%PATH%
Telephony support
We've attempted to design CATS with telephony in mind. In particular,
the audio GUI server is
set up to mimic telephone control, for maximum simplicity of testing on
the desktop. As for actual hardware, we have been working for a short while
on incorporating a robust port of the ComputerFone, a low-cost
single-line telephony device. MIT used the ComputerFone successfully for
a number of years on the Solaris platform, with somewhat less success on
Linux. It is possible to enable our ComputerFone support in Makefile.settings.<archos>
by uncommenting the ENABLE_CFONE line. However, the current implementation
is quite preliminary; it recognizes phone events fairly reliably, and we've
achieved audio connectivity, and it appears to shut down cleanly, but testing
has been extremely minimal. We'd like to thank MIT for allowing us to use
their code as a guide, but we, of course, are responsible for any shortcomings.
We hope to return to this work in the future; we include it in case anyone's
feeling brave and wants to try it, or use it as a guide for other possible
telephony integration.
Apropos of nothing, for telephony testing, we've greatly valued a bit
of hardware that MIT pointed us to: a telephone line simulator
manufactured by Skutch Electronics.
Usage, message set, messages issued
See the core CATS documentation for a
description of the use and behavior of the CATS server.
Compiling and using PortAudio
The current version of PortAudio is version 18. Version 19 will feature
a much-modified API, which we are certain will not work. Version 18 is known
to enable CATS on Sparc Solaris, Windows and Intel Linux. No other
platforms have been tested.
Sparc Solaris
The Solaris port of PortAudio, which we helped to contribute, is not
available in the original version 18 release. You must grab the CVS snapshot
of the version 18 tree, which you can find at http://www.portaudio.com/usingcvs.html.
The Solaris port works with the default Solaris audio drivers and libraries.
Building PortAudio on Sparc Solaris
Do not type make; first, there's no default Makefile, and second,
the default compilation attempts to install the library in /usr/local/lib,
which you may not have access to. You really only need the PortAudio library.
Do this:
% cd <root of PortAudio distribution>
% make -f Makefile.solaris clean # If you've previously compiled
from the same source on a different platform
% make -f Makefile.solaris sharedlib
Note that the compilation currently only supports shared libraries.
You shouldn't have to set LD_LIBRARY_PATH when you run CATS, because
the Makefile templates should install the run-time dependency in the executable.
If you intend to compile from the same source on multiple platforms, make
sure you move the shared library, which can be found in pa_unix_oss/libportaudio.so,
to a safe place. You can try setting LIBINST in Makefile.solaris
and doing make libinstall, but we haven't had the need to do that.
Wherever you end up putting libportaudio.so should be the value
ofPA_LIB for CATS in cats_settings.make (if this is a
standalone installation) or in the toplevel Makefile.settings.<ARCHOS>
(if CATS is part of the Open Source Toolkit).
Intel Linux
PortAudio on Linux relies on the low-cost commercial Open Sound System(TM)
drivers available at http://www.opensound.com.
On Intel Linux, you must also use the CVS snapshot of the version 18 tree,
but for different reasons: the released code assumes that usleep()
returns an integer, but on Linux it returns void. You can find this
snapshot at http://www.portaudio.com/usingcvs.html.
Building PortAudio on Intel Linux
Follow the instructions for Sparc Solaris, except the relevant Makefile
is called Makefile.linux. All the same comments apply.
We have discovered that with at least one Intel Linux audio card, all
frames-per-buffer values except one yield audio choppiness with recording.
We encountered this problem on one of our laptops.
Windows
On Windows, you can use the stock PortAudio v18 distribution.
Building PortAudio on Windows
Download portaudio_v18.zip, and also download the zip file for
Windows for MSVC. Follow the instructions on the README. Change the name
of the toplevel directory to portaudio, if you intend to follow the
default assumptions outlined here. If you follow
the directions, you should end up with a file WinVC\WinVC.dsw. You
can build the required libraries using this workspace.
Known bugs
The ComputerFone implementation is still pre-alpha and essentially unusable
in its current form.
License / Documentation home / Help and feedback
Last updated October 4, 2002