#include "common.h" void wavplay(short int in[], int lastind) //lastind - no. of samples from buffin to be played { static char *device = "default"; /* playback device */ snd_output_t *output = NULL; int count; short int buffin[lastind]; int err,bytesread=1; unsigned int i; char d; snd_pcm_t *handle; snd_pcm_sframes_t frames; count=0; while(count 0 && frames < (long)sizeof(buffin)) printf("Short write (expected %li, wrote %li)\n", (long)sizeof(buffin), frames); } snd_pcm_close(handle); //return 0; } // problem is the fact that the alsa gives an error on the device open! says device is busy.. // /dev/dsp and fuser -v /dev/dsp gives no output!