Sound output

On GNU/Linux PyTraffic allows for the selection of some common sound output devices (via the "Settings" menu). Don't bother with this if things work for you. Note that you have to restart PyTraffic for any changes to take effect. Instead of dealing directly with the underlying sound system a safe and convenient solution is to select a sound server as output device. Unfortunately sound servers tend to create lag...

Case study

Currently what works best for me is the dmix plugin for alsa. This is my .asoundrc file:
pcm.!default {

        type plug
        slave.pcm "dmixer"
}

pcm.dmixer {

  type dmix
  ipc_key 1024

  slave {

    pcm "hw:0,0"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}

ctl.dmixer {

  type hw
  card 0
}