The default server config file should work for most people using OSS or ALSA with OSS emulation. Nevertheless, many will want to edit the file to tune device options, select default devices, or enable native ALSA support. The file is fairly self-explanatory, it will most likely have been installed in /usr/local/lib/gdam/server.config. It contains a list of device types (OSS,ALSA), a list of specific devices, and some global server options. An abbreviated example follows:
# GDAM Server Config File # # This is the default server config file that should # be shipped with distributions. # # Please delete this comment when you edit it! # # # define the types of output devices available. # DeviceType "plugin" "oss" #DeviceType "plugin" "alsa" # # If you have OSS or ALSA + OSS compatability, use these. # Some devices need the 'fork' option to keep from hanging. # #Device "oss" "/dev/dsp" "numfragments=3:logfragsize=12:fork" Device "oss" "/dev/dsp" Device "oss" "/dev/dsp1" Device "oss" "/dev/dsp2" # # ALSA Devices [if you have sys/asoundlib.h installed.] # # appending '#n' to a device name causes gdam to use subdevice n, # if possible. otherwise, the first available subchannel is used. # You probably don't want entries for both specific subdevices and # the general device, it may conflict. # #Device "alsa" "/dev/snd/pcmC0D0" "numfragments=3:logfragsize=12" #Device "alsa" "/dev/snd/pcmC0D0#0" "numfragments=3:logfragsize=12" #Device "alsa" "/dev/snd/pcmC0D0#1" "numfragments=3:logfragsize=12" #Device "alsa" "/dev/snd/pcmC0D1" "numfragments=3:logfragsize=12" # Don't allow mpg123 to swallow all the cpu from us... ExternalPriorityDrop "7" # # If server is run as root, change to this user and group for safety. # IfRoot User "nobody" IfRoot Group "audio" # # Files to store log info and pid # LogFile "/var/log/gdam.log" PidFile "/var/run/gdam.pid" # # Whether to run in daemon mode # (runs in background with different permissions) # Daemon "no" # # If you specify `no' then anyone can connect. Else, only # localhost connections are accepted. # BindLocalhost "yes" Debug "no" #DispatchLog "dispatch.log" #Microphone "/dev/dsp1" #TcpSocket "6005" "punk" |
This causes the GdasExternal class to renice the child process the specified number of steps.
There are a few device options you may wish to try out:
How many bits per sample for the sound device.
Monophonic aka one-channel sound.
Stereo aka two-channel sound.
Sampling rate of the device in samples per second.
Fork the device into its own process. This is necessary if your sound device doesn't support "polling". If clents hang, timers stuck at 0:00, this might be the answer.
Swap byte order of sound for this device. If you hear static, try this option.
Log base 2 of the size of a single audio buffer fragment. Larger sizes increase latency but protect against dropout.
Number of audio buffer fragments to circle through. Larger numbers increase latency but protect against dropout.
Don't attempt to send the device the normal ioctls, which may fail on some devices spuriously, but is mostly useful if the "device" is really just a fifo.