0.000531 ioctl(4, SNDCTL_DSP_RESET, 0) = 0
0.000232 ioctl(4, SNDCTL_DSP_GETFMTS, 0xbffff668) = 0
0.510506 ioctl(4, SNDCTL_DSP_SETFMT, 0xbffff668) = 0
0.506515 ioctl(4, SNDCTL_DSP_STEREO, 0xbffff668) = 0
0.504940 ioctl(4, SOUND_PCM_READ_RATE, 0xbffff668) = 0
0.065604 ioctl(4, SNDCTL_DSP_GETBLKSIZE, 0x80a5824) = 0
0.000302 ioctl(4, SNDCTL_DSP_SYNC, 0) = 0
0.000250 munmap(0x40016000, 4096) = 0
The output is from executing this line:
strace -r sox 01.wav -t ossdsp /dev/dsp
As each and every oss-program on my machine suffers from this unusual delay I think it doesn't make much sense to write a sample program, but anyway, it's attached.
Regards,
Lars.
#include "stdio.h" #include <sys/soundcard.h> #include <unistd.h> #include <fcntl.h>
main() {
int file;
file = open("/dev/dsp", O_RDWR, 0);
ioctl(file, SNDCTL_DSP_RESET, 0);
ioctl(file, SNDCTL_TMR_TIMEBASE, 0xbffff4d0);
ioctl(file, SNDCTL_DSP_GETFMTS, 0xbffff668);
ioctl(file, SNDCTL_DSP_SETFMT, 0xbffff668);
ioctl(file, SNDCTL_DSP_STEREO, 0xbffff668);
ioctl(file, SOUND_PCM_READ_RATE, 0xbffff668);
ioctl(file, SNDCTL_DSP_GETBLKSIZE, 0x80a5824);
ioctl(file, SNDCTL_DSP_SYNC, 0);
close(file);
}
