Split buffer creation function into primary and secondary buffer

creation functions. Secondary buffer creation function is stubbed
out.
This commit is contained in:
Robert Reif 2004-02-13 20:56:21 +00:00 committed by Alexandre Julliard
parent b6de304722
commit e9b7222e34
1 changed files with 40 additions and 11 deletions

View File

@ -2708,7 +2708,7 @@ static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCap
return DS_OK;
}
static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
static HRESULT WINAPI DSD_CreatePrimaryBuffer(PIDSDRIVER iface,
LPWAVEFORMATEX pwfx,
DWORD dwFlags,
DWORD dwCardAddress,
@ -2721,11 +2721,8 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
HRESULT err;
audio_buf_info info;
int enable = 0;
TRACE("(%p,%p,%lx,%lx)\n",iface,pwfx,dwFlags,dwCardAddress);
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
/* we only support primary buffers */
if (!(dwFlags & DSBCAPS_PRIMARYBUFFER))
return DSERR_UNSUPPORTED;
if (This->primary)
return DSERR_ALLOCATED;
if (dwFlags & (DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN))
@ -2774,6 +2771,38 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
return DS_OK;
}
static HRESULT WINAPI DSD_CreateSecondaryBuffer(PIDSDRIVER iface,
LPWAVEFORMATEX pwfx,
DWORD dwFlags,
DWORD dwCardAddress,
LPDWORD pdwcbBufferSize,
LPBYTE *ppbBuffer,
LPVOID *ppvObj)
{
ICOM_THIS(IDsDriverImpl,iface);
IDsDriverBufferImpl** ippdsdb = (IDsDriverBufferImpl**)ppvObj;
FIXME("(%p,%p,%lx,%lx,%p,%p,%p): stub\n",This,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
*ippdsdb = 0;
return DSERR_UNSUPPORTED;
}
static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface,
LPWAVEFORMATEX pwfx,
DWORD dwFlags,
DWORD dwCardAddress,
LPDWORD pdwcbBufferSize,
LPBYTE *ppbBuffer,
LPVOID *ppvObj)
{
TRACE("(%p,%p,%lx,%lx,%p,%p,%p)\n",iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
if (dwFlags & DSBCAPS_PRIMARYBUFFER)
return DSD_CreatePrimaryBuffer(iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
return DSD_CreateSecondaryBuffer(iface,pwfx,dwFlags,dwCardAddress,pdwcbBufferSize,ppbBuffer,ppvObj);
}
static HRESULT WINAPI IDsDriverImpl_DuplicateSoundBuffer(PIDSDRIVER iface,
PIDSDRIVERBUFFER pBuffer,
LPVOID *ppvObj)