- include sys/ioctl.h before soundcard.h - use /dev/audio, not /dev/dsp - use a proper value for SNDCTL_DSP_SETFRAGMENT