#    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      "builtin"       "core_audio"
#DeviceType      "plugin"        "alsa"
#DeviceType      "plugin"        "dummy"


#
#  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"
Device        "oss"       "/dev/dsp"    "fork"
Device        "oss"       "/dev/dsp1"
Device        "oss"       "/dev/dsp2"


#
# ALSA 0.9.x Devices [if you have alsa/asoundlib.h installed.]
#
# Device specifies the ALSA pcm device name, such as "default" or "hw:0,0"
#
#Device         "alsa"    "hw:0,0"     "numfragments=3:logfragsize=12"
#Device         "alsa"    "plughw:1,0"   "numfragments=3:logfragsize=12"

#
# ALSA 0.5.x 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"

#
#  Dummy device, for testing.
#
#Device       "dummy"       "dummy"	         "numfragments=3:logfragsize=12"

#
#  CoreAudio device, for Mac OS X
#
#Device       "core_audio"  "default"	         "numfragments=3:logfragsize=10"

# Don't allow mpg123 to swallow all the cpu from us...
ExternalPriorityDrop   "7"

# Keep several buffers of audio ready and waiting, which may
# help avoid dropouts (while increasing latency)
PreBufferMultiple   "1"

# External sources (which fork a process to produce audio data) may get
# behind if the forked process stalls for any reason.  This value tells
# us how fast to catch up.  If we try to catch up too fast, we'll negelct
# the audio device and cause a dropout.
ExternalCatchupReads "3"

# Command-line decoders for different formats.  First arg is handle for
# this decoder.  second is comma-seperated list of extensions.  Third is
# block size for decoders which don't support sample-accurate start times.
# Final arg is the exec string used to decode a file.
Decoder "ogg123-ogg" "ogg" "44100" "ogg123 -q --device=raw --file=- -k %s %f"
Decoder "ecasound-aiff" "aiff,aif" "0" "ecasound -C -q -i:%f -y:%S -f:16,2,44100,i -o:-"
Decoder "flac-flac" "flac" "0" "flac -d -c -fc 2 -fp 16 -fs 44100 -s --skip %s %f"


#
#  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"
