This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, I am debugging a crash in Cygwin 1.7.29-2 ioctl but I am not familiar with the OSS sounds API. I traced the ioctl calls and made this example, is it supposed to work? #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> #include <unistd.h> #include <sys/ioctl.h> #include <sys/soundcard.h> int main(){ int fmt = AFMT_MU_LAW; int chan = 0; int fd = open("/dev/dsp", O_WRONLY); ioctl(fd, SNDCTL_DSP_RESET, NULL); ioctl(fd, SNDCTL_DSP_RESET, NULL); ioctl(fd, SNDCTL_DSP_RESET, NULL); ioctl(fd, SNDCTL_DSP_SETFMT, &fmt); ioctl(fd, SNDCTL_DSP_STEREO, &chan); /* crashes here */ close(fd); exit(0); }
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |