Commit dc4535f9 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Remove trailing white space.

Cleanup white space and format in direct sound capture routines.
parent e7579ef3
......@@ -3976,7 +3976,8 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QueryInterface(
return E_NOINTERFACE;
}
static ULONG WINAPI IDsCaptureDriverPropertySetImpl_AddRef(PIDSDRIVERPROPERTYSET iface)
static ULONG WINAPI IDsCaptureDriverPropertySetImpl_AddRef(
PIDSDRIVERPROPERTYSET iface)
{
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
DWORD ref;
......@@ -3986,7 +3987,8 @@ static ULONG WINAPI IDsCaptureDriverPropertySetImpl_AddRef(PIDSDRIVERPROPERTYSET
return ref;
}
static ULONG WINAPI IDsCaptureDriverPropertySetImpl_Release(PIDSDRIVERPROPERTYSET iface)
static ULONG WINAPI IDsCaptureDriverPropertySetImpl_Release(
PIDSDRIVERPROPERTYSET iface)
{
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
DWORD ref;
......@@ -4011,7 +4013,8 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_Get(
PULONG pcbReturnedData )
{
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
FIXME("(%p,%p,%p,%lx,%p,%lx,%p)\n",This,pDsProperty,pPropertyParams,cbPropertyParams,pPropertyData,cbPropertyData,pcbReturnedData);
FIXME("(%p,%p,%p,%lx,%p,%lx,%p)\n",This,pDsProperty,pPropertyParams,
cbPropertyParams,pPropertyData,cbPropertyData,pcbReturnedData);
return DSERR_UNSUPPORTED;
}
......@@ -4024,7 +4027,8 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_Set(
ULONG cbPropertyData )
{
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
FIXME("(%p,%p,%p,%lx,%p,%lx)\n",This,pDsProperty,pPropertyParams,cbPropertyParams,pPropertyData,cbPropertyData);
FIXME("(%p,%p,%p,%lx,%p,%lx)\n",This,pDsProperty,pPropertyParams,
cbPropertyParams,pPropertyData,cbPropertyData);
return DSERR_UNSUPPORTED;
}
......@@ -4035,7 +4039,8 @@ static HRESULT WINAPI IDsCaptureDriverPropertySetImpl_QuerySupport(
PULONG pSupport )
{
ICOM_THIS(IDsCaptureDriverPropertySetImpl,iface);
FIXME("(%p,%s,%lx,%p)\n",This,debugstr_guid(PropertySetId),PropertyId,pSupport);
FIXME("(%p,%s,%lx,%p)\n",This,debugstr_guid(PropertySetId),PropertyId,
pSupport);
return DSERR_UNSUPPORTED;
}
......@@ -4075,7 +4080,8 @@ static HRESULT WINAPI IDsCaptureDriverNotifyImpl_QueryInterface(
return E_NOINTERFACE;
}
static ULONG WINAPI IDsCaptureDriverNotifyImpl_AddRef(PIDSDRIVERNOTIFY iface)
static ULONG WINAPI IDsCaptureDriverNotifyImpl_AddRef(
PIDSDRIVERNOTIFY iface)
{
ICOM_THIS(IDsCaptureDriverNotifyImpl,iface);
DWORD ref;
......@@ -4085,7 +4091,8 @@ static ULONG WINAPI IDsCaptureDriverNotifyImpl_AddRef(PIDSDRIVERNOTIFY iface)
return ref;
}
static ULONG WINAPI IDsCaptureDriverNotifyImpl_Release(PIDSDRIVERNOTIFY iface)
static ULONG WINAPI IDsCaptureDriverNotifyImpl_Release(
PIDSDRIVERNOTIFY iface)
{
ICOM_THIS(IDsCaptureDriverNotifyImpl,iface);
DWORD ref;
......@@ -4158,7 +4165,8 @@ static HRESULT DSCDB_MapBuffer(IDsCaptureDriverBufferImpl *dscdb)
dscdb->mapping = mmap(NULL, dscdb->maplen, PROT_READ, MAP_SHARED,
WInDev[dscdb->drv->wDevID].ossdev->fd, 0);
if (dscdb->mapping == (LPBYTE)-1) {
TRACE("(%p): Could not map sound device for direct access (%s)\n", dscdb, strerror(errno));
TRACE("(%p): Could not map sound device for direct access (%s)\n",
dscdb, strerror(errno));
return DSERR_GENERIC;
}
TRACE("(%p): sound device has been mapped for direct access at %p, size=%ld\n", dscdb, dscdb->mapping, dscdb->maplen);
......@@ -4170,7 +4178,8 @@ static HRESULT DSCDB_UnmapBuffer(IDsCaptureDriverBufferImpl *dscdb)
{
if (dscdb->mapping) {
if (munmap(dscdb->mapping, dscdb->maplen) < 0) {
ERR("(%p): Could not unmap sound device (%s)\n", dscdb, strerror(errno));
ERR("(%p): Could not unmap sound device (%s)\n",
dscdb, strerror(errno));
return DSERR_GENERIC;
}
dscdb->mapping = NULL;
......@@ -4179,7 +4188,10 @@ static HRESULT DSCDB_UnmapBuffer(IDsCaptureDriverBufferImpl *dscdb)
return DS_OK;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface(PIDSCDRIVERBUFFER iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI IDsCaptureDriverBufferImpl_QueryInterface(
PIDSCDRIVERBUFFER iface,
REFIID riid,
LPVOID *ppobj)
{
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
......@@ -4243,28 +4255,36 @@ static ULONG WINAPI IDsCaptureDriverBufferImpl_Release(PIDSCDRIVERBUFFER iface)
return 0;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Lock(PIDSCDRIVERBUFFER iface,
LPVOID*ppvAudio1,LPDWORD pdwLen1,
LPVOID*ppvAudio2,LPDWORD pdwLen2,
DWORD dwWritePosition,DWORD dwWriteLen,
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Lock(
PIDSCDRIVERBUFFER iface,
LPVOID* ppvAudio1,
LPDWORD pdwLen1,
LPVOID* ppvAudio2,
LPDWORD pdwLen2,
DWORD dwWritePosition,
DWORD dwWriteLen,
DWORD dwFlags)
{
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
FIXME("(%p,%p,%p,%p,%p,%ld,%ld,0x%08lx): stub!\n",This,ppvAudio1,pdwLen1,ppvAudio2,pdwLen2,
dwWritePosition,dwWriteLen,dwFlags);
FIXME("(%p,%p,%p,%p,%p,%ld,%ld,0x%08lx): stub!\n",This,ppvAudio1,pdwLen1,
ppvAudio2,pdwLen2,dwWritePosition,dwWriteLen,dwFlags);
return DS_OK;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Unlock(PIDSCDRIVERBUFFER iface,
LPVOID pvAudio1,DWORD dwLen1,
LPVOID pvAudio2,DWORD dwLen2)
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Unlock(
PIDSCDRIVERBUFFER iface,
LPVOID pvAudio1,
DWORD dwLen1,
LPVOID pvAudio2,
DWORD dwLen2)
{
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
FIXME("(%p,%p,%ld,%p,%ld): stub!\n",This,pvAudio1,dwLen1,pvAudio2,dwLen2);
return DS_OK;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetPosition(PIDSCDRIVERBUFFER iface,
static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetPosition(
PIDSCDRIVERBUFFER iface,
LPDWORD lpdwCapture,
LPDWORD lpdwRead)
{
......@@ -4278,7 +4298,8 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetPosition(PIDSCDRIVERBUFFER i
return DSERR_UNINITIALIZED;
}
if (ioctl(WInDev[This->drv->wDevID].ossdev->fd, SNDCTL_DSP_GETIPTR, &info) < 0) {
ERR("ioctl(%s, SNDCTL_DSP_GETIPTR) failed (%s)\n", WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
ERR("ioctl(%s, SNDCTL_DSP_GETIPTR) failed (%s)\n",
WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
return DSERR_GENERIC;
}
ptr = info.ptr & ~3; /* align the pointer, just in case */
......@@ -4296,14 +4317,18 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetPosition(PIDSCDRIVERBUFFER i
return DS_OK;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetStatus(PIDSCDRIVERBUFFER iface, LPDWORD lpdwStatus)
static HRESULT WINAPI IDsCaptureDriverBufferImpl_GetStatus(
PIDSCDRIVERBUFFER iface,
LPDWORD lpdwStatus)
{
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
FIXME("(%p,%p): stub!\n",This,lpdwStatus);
return DSERR_UNSUPPORTED;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Start(PIDSCDRIVERBUFFER iface, DWORD dwFlags)
static HRESULT WINAPI IDsCaptureDriverBufferImpl_Start(
PIDSCDRIVERBUFFER iface,
DWORD dwFlags)
{
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
int enable;
......@@ -4325,7 +4350,8 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_Start(PIDSCDRIVERBUFFER iface,
return DS_OK;
}
}
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n",
WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
WInDev[This->drv->wDevID].ossdev->bInputEnabled = FALSE;
return DSERR_GENERIC;
}
......@@ -4341,7 +4367,8 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_Stop(PIDSCDRIVERBUFFER iface)
WInDev[This->drv->wDevID].ossdev->bInputEnabled = FALSE;
enable = getEnables(WInDev[This->drv->wDevID].ossdev);
if (ioctl(WInDev[This->drv->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n",
WInDev[This->drv->wDevID].ossdev->dev_name, strerror(errno));
return DSERR_GENERIC;
}
......@@ -4352,7 +4379,9 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_Stop(PIDSCDRIVERBUFFER iface)
return DSERR_BUFFERLOST;
}
static HRESULT WINAPI IDsCaptureDriverBufferImpl_SetFormat(PIDSCDRIVERBUFFER iface, LPWAVEFORMATEX pwfx)
static HRESULT WINAPI IDsCaptureDriverBufferImpl_SetFormat(
PIDSCDRIVERBUFFER iface,
LPWAVEFORMATEX pwfx)
{
ICOM_THIS(IDsCaptureDriverBufferImpl,iface);
FIXME("(%p): stub!\n",This);
......@@ -4374,7 +4403,10 @@ static ICOM_VTABLE(IDsCaptureDriverBuffer) dscdbvt =
IDsCaptureDriverBufferImpl_Stop
};
static HRESULT WINAPI IDsCaptureDriverImpl_QueryInterface(PIDSCDRIVER iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI IDsCaptureDriverImpl_QueryInterface(
PIDSCDRIVER iface,
REFIID riid,
LPVOID *ppobj)
{
ICOM_THIS(IDsCaptureDriverImpl,iface);
TRACE("(%p,%s,%p)\n",This,debugstr_guid(riid),ppobj);
......@@ -4415,7 +4447,9 @@ static ULONG WINAPI IDsCaptureDriverImpl_Release(PIDSCDRIVER iface)
return 0;
}
static HRESULT WINAPI IDsCaptureDriverImpl_GetDriverDesc(PIDSCDRIVER iface, PDSDRIVERDESC pDesc)
static HRESULT WINAPI IDsCaptureDriverImpl_GetDriverDesc(
PIDSCDRIVER iface,
PDSDRIVERDESC pDesc)
{
ICOM_THIS(IDsCaptureDriverImpl,iface);
TRACE("(%p,%p)\n",This,pDesc);
......@@ -4463,7 +4497,9 @@ static HRESULT WINAPI IDsCaptureDriverImpl_Close(PIDSCDRIVER iface)
return DS_OK;
}
static HRESULT WINAPI IDsCaptureDriverImpl_GetCaps(PIDSCDRIVER iface, PDSCDRIVERCAPS pCaps)
static HRESULT WINAPI IDsCaptureDriverImpl_GetCaps(
PIDSCDRIVER iface,
PDSCDRIVERCAPS pCaps)
{
ICOM_THIS(IDsCaptureDriverImpl,iface);
TRACE("(%p,%p)\n",This,pCaps);
......@@ -4471,7 +4507,8 @@ static HRESULT WINAPI IDsCaptureDriverImpl_GetCaps(PIDSCDRIVER iface, PDSCDRIVER
return DS_OK;
}
static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface,
static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(
PIDSCDRIVER iface,
LPWAVEFORMATEX pwfx,
DWORD dwFlags,
DWORD dwCardAddress,
......@@ -4484,7 +4521,8 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface
HRESULT err;
audio_buf_info info;
int enable;
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",This,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",This,pwfx,dwFlags,dwCardAddress,
pdwcbBufferSize,ppbBuffer,ppvObj);
if (This->capture_buffer) {
TRACE("already allocated\n");
......@@ -4521,7 +4559,8 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface
/* check how big the DMA buffer is now */
if (ioctl(WInDev[This->wDevID].ossdev->fd, SNDCTL_DSP_GETISPACE, &info) < 0) {
ERR("ioctl(%s, SNDCTL_DSP_GETISPACE) failed (%s)\n", WInDev[This->wDevID].ossdev->dev_name, strerror(errno));
ERR("ioctl(%s, SNDCTL_DSP_GETISPACE) failed (%s)\n",
WInDev[This->wDevID].ossdev->dev_name, strerror(errno));
HeapFree(GetProcessHeap(),0,*ippdscdb);
*ippdscdb = NULL;
return DSERR_GENERIC;
......@@ -4544,7 +4583,8 @@ static HRESULT WINAPI IDsCaptureDriverImpl_CreateCaptureBuffer(PIDSCDRIVER iface
WInDev[This->wDevID].ossdev->bInputEnabled = FALSE;
enable = getEnables(WInDev[This->wDevID].ossdev);
if (ioctl(WInDev[This->wDevID].ossdev->fd, SNDCTL_DSP_SETTRIGGER, &enable) < 0) {
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n", WInDev[This->wDevID].ossdev->dev_name, strerror(errno));
ERR("ioctl(%s, SNDCTL_DSP_SETTRIGGER) failed (%s)\n",
WInDev[This->wDevID].ossdev->dev_name, strerror(errno));
return DSERR_GENERIC;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment