== Dumping sound to files by alsa == Tool to save data to timestamped files: < #include #include #include #include #include #include #define BUFFLEN 1024 int main(int argc, char **argv) { int fd; int bytes_read; char buff[BUFFLEN]; char fname[BUFFLEN]; time_t datetime; datetime = time(NULL); sprintf(fname, "/tmp/%ld.raw", datetime); if((fd = open(fname, O_CREAT | O_WRONLY, S_IRUSR| S_IWUSR)) == -1) { perror("Failed to open file for writing"); return(1); } while((bytes_read = read(0, buff, BUFFLEN))) { write(fd, buff, bytes_read); } close(fd); return(0); } EOF Save to a file /home/user/tmp/save_to_file.c Compile: gcc save_to_file.c -o save_to_file Config file to have alsa copy the sound stream to files: <