Bug#220843: rhythmbox: Takes a long time (~2 sec) to start playing a file

Marco d'Itri Marco d'Itri <md@Linux.IT>, 220843@bugs.debian.org
Sun, 7 Dec 2003 18:26:56 +0100


I wrote this simple test case, and verified that the delay happens in
close(2), inside the kernel. This does not happen if the device opened
is one of the ALSA native ones, like /dev/snd/pcmC0D0p.

I'm Cc'ing the alsa maintainers in the hope they know something about
this (has the audio API changed with 2.6 kernels and gstreamer is broken
or is the ALSA OSS emulation in 2.6 kernels broken?).

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(void) {
    int fd;

    puts("===> 1");
    fd = open("/dev/sound/dsp", O_WRONLY|O_NONBLOCK);
    if (fd < 0)
	perror("open"), exit(1);
    puts("===> 2");
    if (close(fd) < 0)
	perror("close"), exit(1);
    puts("===> 3");
    exit(0);
}

-- 
ciao, |
Marco | [3499 ec0m6wYFlJHSc]