Sound support in kaffe
======================

Dalibor Topic <robilad@yahoo.com>

Introduction
============

There are two ways to play sounds in kaffe: using the java.applet
API or using javax.sound API. Using javax.sound gives you much more
flexibility and features than using the Applet API.

Kaffe uses the LGPL-d javax.sound implementation from the Tritonus
project. It is available under http://www.tritonus.org . Kaffe's CVS
follows the development in tritonus' CVS tree. Kaffe uses code from
tritonus to provide basic sound capabilities. The code from the
tritonus project includes features not present in kaffe's version, and
you should take a look at their code for sound & midi service
providers not included in kaffe.

For example, this includes providers for mp3, ogg vorbis, gsm, and
other sound file formats, as well as a midi service provider for
MidiShare.

Configuration
=============

The default setting is to compile sound support for all sound backends
that are found. Supported sound backends are ALSA and Enlightment
Sound Demon (Esd) . The Alsa backend provides sampled and midi
functionality. Esd provides support for sampled functionality only. In
practice, this means that you won't be able to use MIDI on platforms
other than Linux.

You can specifically turn sound backends on or off. The configure
script provides the options
--without-alsa:  for turning ALSA support off, and
--without-esd:   for turning Esd support off.

You can also turn off sound support completely, by using
--disable-sound.

Usage
=====

You can test the sound support in kaffe with programs from the Java
Sound Examples:

http://www.jsresources.org/examples/

In order to test your installation, try AudioPlayer and MidiPlayer.

