This may vary from distribution to distribution, in Fedora, for example, it is controlled by the /etc/alsa/alsa.conf file, which sets all the global parameters for ALSA to use (the default file in a default alsa installation would be /etc/alsa.conf or asound.conf). These parameters could be overriden with a file called .asoundrc (those of you familiar with TeamSpeak + alsa + single-stream-sound cards [no hwmixing cards, such as Intel, nForce, etc] I'm sure you've heard about this, especially to setup dmix) which should be stored in your /home directory. I don't remember off the top of my head how to alter the buffer size (in the config), or how to programmatically do this... You can check over
http://alsa.opensrc.org the section regarding
.asoundrc for the sintax.
I'm not sure if this has something to do with a problem I had once with ogg123, which would would incur in buffer underruns quite badly and the sound was all grabled and full of "artifacts", which was when I played with the buffer sizes, and found out this helped quite a bit.