Some drivers (via82xx) doesn't start recording until we read something.

This is ugly, but unfortunately required.


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@453 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-01-12 16:09:58 +00:00
parent fc93e4b3a7
commit 289c914b47

View file

@ -368,6 +368,15 @@ int pa__init(pa_core *c, pa_module*m) {
pa_modargs_free(ma); pa_modargs_free(ma);
/*
* Some crappy drivers do not start the recording until we read something.
* Without this snippet, poll will never register the fd as ready.
*/
if (u->source) {
char buf[u->sample_size];
read(u->fd, buf, u->sample_size);
}
return 0; return 0;
fail: fail: