Merge pull request #1575 from LukeUsher/bug-hunting
Implement CDirectSoundStream_GetInfo
This commit is contained in:
commit
274c6fd083
|
@ -8572,7 +8572,8 @@ VOID WINAPI XTL::EMUPATCH(D3DDevice_SetScreenSpaceOffset)
|
|||
LOG_FUNC_ARG(y)
|
||||
LOG_FUNC_END;
|
||||
|
||||
EmuLog(LOG_LEVEL::WARNING, "EmuD3DDevice_SetScreenSpaceOffset ignored");
|
||||
// No need to log this, it's safe to ignore.
|
||||
//EmuLog(LOG_LEVEL::WARNING, "EmuD3DDevice_SetScreenSpaceOffset ignored");
|
||||
}
|
||||
|
||||
// ******************************************************************
|
||||
|
|
|
@ -1931,14 +1931,11 @@ HRESULT WINAPI XTL::EMUPATCH(CDirectSoundStream_GetInfo)
|
|||
LOG_FUNC_ARG_OUT(pInfo)
|
||||
LOG_FUNC_END;
|
||||
|
||||
// TODO: A (real) implementation?
|
||||
EmuLog(LOG_LEVEL::WARNING, "EmuDirectSound_CDirectSoundStream_GetInfo is not yet supported!");
|
||||
|
||||
if (pInfo) {
|
||||
pInfo->dwFlags = XMO_STREAMF_FIXED_SAMPLE_SIZE;
|
||||
pInfo->dwInputSize = 0x40000;
|
||||
pInfo->dwOutputSize = 0x40000;
|
||||
pInfo->dwMaxLookahead = 0x4000;
|
||||
pInfo->dwFlags = XMO_STREAMF_FIXED_SAMPLE_SIZE | XMO_STREAMF_INPUT_ASYNC;
|
||||
pInfo->dwInputSize = pThis->EmuBufferDesc.lpwfxFormat->nBlockAlign;
|
||||
pInfo->dwOutputSize = 0;
|
||||
pInfo->dwMaxLookahead = std::max(static_cast<uint32_t>(pThis->EmuBufferDesc.lpwfxFormat->nChannels * pThis->EmuBufferDesc.lpwfxFormat->wBitsPerSample / 8) * 32, static_cast<uint32_t>(pThis->EmuBufferDesc.lpwfxFormat->nBlockAlign) * 2);
|
||||
}
|
||||
|
||||
leaveCriticalSection;
|
||||
|
|
|
@ -226,7 +226,7 @@ inline void GeneratePCMFormat(
|
|||
lpwfxFormatHost->nChannels = 2;
|
||||
lpwfxFormatHost->nSamplesPerSec = 44100;
|
||||
lpwfxFormatHost->wBitsPerSample = 8;
|
||||
lpwfxFormatHost->nBlockAlign = (lpwfxFormatHost->wBitsPerSample / 8 * lpwfxFormatHost->nChannels);
|
||||
lpwfxFormatHost->nBlockAlign = lpwfxFormatHost->nChannels * lpwfxFormatHost->wBitsPerSample / 8;
|
||||
lpwfxFormatHost->nAvgBytesPerSec = lpwfxFormatHost->nSamplesPerSec * lpwfxFormatHost->nBlockAlign;
|
||||
}
|
||||
else {
|
||||
|
@ -249,7 +249,7 @@ inline void GeneratePCMFormat(
|
|||
}
|
||||
|
||||
if (lpwfxFormatHost->nBlockAlign == 0) {
|
||||
lpwfxFormatHost->nBlockAlign = (lpwfxFormatHost->wBitsPerSample / 8 * lpwfxFormatHost->nChannels);
|
||||
lpwfxFormatHost->nBlockAlign = lpwfxFormatHost->nChannels * lpwfxFormatHost->wBitsPerSample / 8;
|
||||
}
|
||||
|
||||
if (lpwfxFormatHost->nSamplesPerSec == 0) {
|
||||
|
|
Loading…
Reference in New Issue