dsound: Eliminate leftover driver structures.
This commit is contained in:
parent
3960ea844b
commit
6c33e87259
|
@ -1029,8 +1029,6 @@ static HRESULT DirectSoundCaptureDevice_Initialize(
|
||||||
|
|
||||||
device->mmdevice = mmdevice;
|
device->mmdevice = mmdevice;
|
||||||
|
|
||||||
device->drvdesc.dwFlags = 0;
|
|
||||||
|
|
||||||
device->drvcaps.dwFlags = 0;
|
device->drvcaps.dwFlags = 0;
|
||||||
|
|
||||||
device->drvcaps.dwFormats = 0;
|
device->drvcaps.dwFormats = 0;
|
||||||
|
|
|
@ -1335,10 +1335,8 @@ HRESULT DirectSoundDevice_GetCaps(
|
||||||
lpDSCaps->dwTotalHwMemBytes = device->drvcaps.dwTotalHwMemBytes;
|
lpDSCaps->dwTotalHwMemBytes = device->drvcaps.dwTotalHwMemBytes;
|
||||||
lpDSCaps->dwFreeHwMemBytes = device->drvcaps.dwFreeHwMemBytes;
|
lpDSCaps->dwFreeHwMemBytes = device->drvcaps.dwFreeHwMemBytes;
|
||||||
lpDSCaps->dwMaxContigFreeHwMemBytes = device->drvcaps.dwMaxContigFreeHwMemBytes;
|
lpDSCaps->dwMaxContigFreeHwMemBytes = device->drvcaps.dwMaxContigFreeHwMemBytes;
|
||||||
|
lpDSCaps->dwUnlockTransferRateHwBuffers = device->drvcaps.dwUnlockTransferRateHwBuffers;
|
||||||
/* driver doesn't have these */
|
lpDSCaps->dwPlayCpuOverheadSwBuffers = device->drvcaps.dwPlayCpuOverheadSwBuffers;
|
||||||
lpDSCaps->dwUnlockTransferRateHwBuffers = 4096; /* But we have none... */
|
|
||||||
lpDSCaps->dwPlayCpuOverheadSwBuffers = 1; /* 1% */
|
|
||||||
|
|
||||||
return DS_OK;
|
return DS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,47 +65,6 @@ extern const mixfunc mixfunctions[4] DECLSPEC_HIDDEN;
|
||||||
typedef void (*normfunc)(const void *, void *, unsigned);
|
typedef void (*normfunc)(const void *, void *, unsigned);
|
||||||
extern const normfunc normfunctions[4] DECLSPEC_HIDDEN;
|
extern const normfunc normfunctions[4] DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
typedef struct _DSDRIVERDESC
|
|
||||||
{
|
|
||||||
DWORD dwFlags;
|
|
||||||
CHAR szDesc[256];
|
|
||||||
CHAR szDrvname[256];
|
|
||||||
DWORD dnDevNode;
|
|
||||||
WORD wVxdId;
|
|
||||||
WORD wReserved;
|
|
||||||
ULONG ulDeviceNum;
|
|
||||||
DWORD dwHeapType;
|
|
||||||
LPVOID pvDirectDrawHeap;
|
|
||||||
DWORD dwMemStartAddress;
|
|
||||||
DWORD dwMemEndAddress;
|
|
||||||
DWORD dwMemAllocExtra;
|
|
||||||
LPVOID pvReserved1;
|
|
||||||
LPVOID pvReserved2;
|
|
||||||
} DSDRIVERDESC,*PDSDRIVERDESC;
|
|
||||||
|
|
||||||
typedef struct _DSDRIVERCAPS
|
|
||||||
{
|
|
||||||
DWORD dwFlags;
|
|
||||||
DWORD dwMinSecondarySampleRate;
|
|
||||||
DWORD dwMaxSecondarySampleRate;
|
|
||||||
DWORD dwPrimaryBuffers;
|
|
||||||
DWORD dwMaxHwMixingAllBuffers;
|
|
||||||
DWORD dwMaxHwMixingStaticBuffers;
|
|
||||||
DWORD dwMaxHwMixingStreamingBuffers;
|
|
||||||
DWORD dwFreeHwMixingAllBuffers;
|
|
||||||
DWORD dwFreeHwMixingStaticBuffers;
|
|
||||||
DWORD dwFreeHwMixingStreamingBuffers;
|
|
||||||
DWORD dwMaxHw3DAllBuffers;
|
|
||||||
DWORD dwMaxHw3DStaticBuffers;
|
|
||||||
DWORD dwMaxHw3DStreamingBuffers;
|
|
||||||
DWORD dwFreeHw3DAllBuffers;
|
|
||||||
DWORD dwFreeHw3DStaticBuffers;
|
|
||||||
DWORD dwFreeHw3DStreamingBuffers;
|
|
||||||
DWORD dwTotalHwMemBytes;
|
|
||||||
DWORD dwFreeHwMemBytes;
|
|
||||||
DWORD dwMaxContigFreeHwMemBytes;
|
|
||||||
} DSDRIVERCAPS,*PDSDRIVERCAPS;
|
|
||||||
|
|
||||||
typedef struct _DSVOLUMEPAN
|
typedef struct _DSVOLUMEPAN
|
||||||
{
|
{
|
||||||
DWORD dwTotalLeftAmpFactor;
|
DWORD dwTotalLeftAmpFactor;
|
||||||
|
@ -117,14 +76,6 @@ typedef struct _DSVOLUMEPAN
|
||||||
DWORD dwPanRightAmpFactor;
|
DWORD dwPanRightAmpFactor;
|
||||||
} DSVOLUMEPAN,*PDSVOLUMEPAN;
|
} DSVOLUMEPAN,*PDSVOLUMEPAN;
|
||||||
|
|
||||||
typedef struct _DSCDRIVERCAPS
|
|
||||||
{
|
|
||||||
DWORD dwSize;
|
|
||||||
DWORD dwFlags;
|
|
||||||
DWORD dwFormats;
|
|
||||||
DWORD dwChannels;
|
|
||||||
} DSCDRIVERCAPS,*PDSCDRIVERCAPS;
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* IDirectSoundDevice implementation structure
|
* IDirectSoundDevice implementation structure
|
||||||
*/
|
*/
|
||||||
|
@ -133,8 +84,7 @@ struct DirectSoundDevice
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
GUID guid;
|
GUID guid;
|
||||||
DSDRIVERDESC drvdesc;
|
DSCAPS drvcaps;
|
||||||
DSDRIVERCAPS drvcaps;
|
|
||||||
DWORD priolevel;
|
DWORD priolevel;
|
||||||
PWAVEFORMATEX pwfx;
|
PWAVEFORMATEX pwfx;
|
||||||
UINT timerID, pwplay, pwqueue, prebuf, helfrags;
|
UINT timerID, pwplay, pwqueue, prebuf, helfrags;
|
||||||
|
@ -272,15 +222,11 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This) DECLSPEC_HIDDEN;
|
||||||
*/
|
*/
|
||||||
struct DirectSoundCaptureDevice
|
struct DirectSoundCaptureDevice
|
||||||
{
|
{
|
||||||
/* IDirectSoundCaptureImpl fields */
|
|
||||||
GUID guid;
|
GUID guid;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
/* DirectSound driver stuff */
|
DSCCAPS drvcaps;
|
||||||
DSDRIVERDESC drvdesc;
|
|
||||||
DSCDRIVERCAPS drvcaps;
|
|
||||||
|
|
||||||
/* more stuff */
|
|
||||||
LPBYTE buffer;
|
LPBYTE buffer;
|
||||||
DWORD buflen, write_pos_bytes;
|
DWORD buflen, write_pos_bytes;
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
|
||||||
device->volume = NULL;
|
device->volume = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
device->drvdesc.dwFlags = 0;
|
|
||||||
hres = IMMDevice_Activate(device->mmdevice, &IID_IAudioClient,
|
hres = IMMDevice_Activate(device->mmdevice, &IID_IAudioClient,
|
||||||
CLSCTX_INPROC_SERVER, NULL, (void **)&device->client);
|
CLSCTX_INPROC_SERVER, NULL, (void **)&device->client);
|
||||||
if(FAILED(hres)){
|
if(FAILED(hres)){
|
||||||
|
|
Loading…
Reference in New Issue