Log the format when mapping the sound device (or failing to).

This commit is contained in:
Francois Gouget 2004-06-16 20:06:48 +00:00 committed by Alexandre Julliard
parent c22171836b
commit d8e9b8f7aa
1 changed files with 4 additions and 3 deletions

View File

@ -2509,15 +2509,16 @@ ICOM_VTABLE(IDsDriverNotify) dsdnvt =
static HRESULT DSDB_MapBuffer(IDsDriverBufferImpl *dsdb)
{
TRACE("(%p)\n",dsdb);
TRACE("(%p), format=%ldx%dx%d\n", dsdb, dsdb->wfx.nSamplesPerSec,
dsdb->wfx.wBitsPerSample, dsdb->wfx.nChannels);
if (!dsdb->mapping) {
dsdb->mapping = mmap(NULL, dsdb->maplen, PROT_WRITE, MAP_SHARED,
dsdb->fd, 0);
if (dsdb->mapping == (LPBYTE)-1) {
TRACE("(%p): Could not map sound device for direct access (%s)\n", dsdb, strerror(errno));
TRACE("Could not map sound device for direct access (%s)\n", strerror(errno));
return DSERR_GENERIC;
}
TRACE("(%p): sound device has been mapped for direct access at %p, size=%ld\n", dsdb, dsdb->mapping, dsdb->maplen);
TRACE("The sound device has been mapped for direct access at %p, size=%ld\n", dsdb->mapping, dsdb->maplen);
/* for some reason, es1371 and sblive! sometimes have junk in here.
* clear it, or we get junk noise */