-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2015-01-16 um 08:44 schrieb Alex Henrie:
Star Trek Armada II needs GetCompressionTypes to return at least one value, see https://bugs.winehq.org/show_bug.cgi?id=29238 Is the game happy if you return DV_OK and set *pdwNumElements = 0?
MS-PCM is guaranteed to be present on Windows XP, and it's already implemented in Wine, so advertising this codec shouldn't cause any trouble. Even though we have the codec we probably don't have the dpvoice infrastructure to hook up a dpvoice client to the codec, right? That's not necessarily a reason to reject the semi-stub though.
+extern HRESULT DPVOICE_GetCompressionTypes(DVCOMPRESSIONINFO *pData, DWORD *pdwDataSize, DWORD *pdwNumElements, DWORD dwFlags) DECLSPEC_HIDDEN; Please avoid hungarian notation names (dwThisIsAdWord, *pThisIsAPointer).
+ string_loc = (LPWSTR)((char*)pData + sizeof(pcm_type)); + memcpy(pData, &pcm_type, sizeof(pcm_type)); + memcpy(string_loc, pcm_name, sizeof(pcm_name)); + pData->lpszName = string_loc; I think there should be a nicer way to do this. I didn't test this with the compiler, but I guess you can do something like this:
struct { DVCOMPRESSIONINFO info; const WCHAR name[]; } codec = { {80, {0x8de12fd4,0x7cb3,0x48ce {0xa7,0xe8,0x9c,0x47,0xa2,0x2e,0x8a,0xc5}}, &codec.name, NULL, 0, 64000}}, {'M','S','-','P','C','M',' ','6','4',' ','k','b','i','t','/','s',0}; }; ... memcpy(pData, codec, sizeof(codec)); I don't know how well the variable-size array at the end of the struct works. It also won't easily work for more than one element. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUuUN7AAoJEN0/YqbEcdMwFwcP/iSIxX72VcW9TSqbWHnq1Pi6 7Yv9zcL3h/3Mx0rERFiaT15Tmz7+YNyKfngR6kZwM7ms5usqePHCW1y1dT7ImCfM gSAgd5WBTKuk5qpr0k2zLgl4O3TVJn4zTP8wKNa+lwGDJgY7d3ThcgDd/LI6kkiU KI2Uv+jyh00Co2G6egmhlZDfwWo3dI/b+7fndC1jnYCcyIIxjLywdiQ80SCi3IgB sktBaQW7mvzzQDtMKgwR/BNUSze6AQeWQ5+xmWivIm4jsPGETmr3r0VnRtxxMduA LzXJJewnGojJoaQ1dsjsXJJ+S+3rKCd5cKrbnlyFXJ2pqHGrBdkQwbFTWse+8Tsf +Au00otO85InuwenrvKutN92c4pP8hfyxAQbKJUjVCnD5ppMDXkRrx0xKfAy7SWB FpQuO6KLeWMotDYcC21kwY3jGLAxKOWGh02p7S5AUIlnZ0m1kJ3PK1DxhomRHYax 4pgQx0jb/MITw1/L5hJ8KlNcucLJxC2FBGpgRC32LAUHMVcNurs6bHQbgbl9UKUS zH4gOA7PzNTGG3G3To/IqmayhmzNMLk/b0XusIGKF1Ao3uyU3Yw+5RuzPlGaKOkT cAhRIl5Ujbcjt8JKgtdq4x1VeGMutHlePhPuUpgZX98n+/Bgk9uZ5rScVLW1ELGW XQ6zfKUWW2qirySBqy+A =StHs -----END PGP SIGNATURE-----