Windows port:

- add solution and project files for VS2008 x64;
- fixed for x64 compile;
- fixed for DirectX9 compile;
- fixed for future new audio core (for hardware Vista audio).
This commit is contained in:
mtabachenko 2008-04-29 20:35:05 +00:00
parent bc128ddd25
commit dfaaadbef7
2 changed files with 13 additions and 9 deletions

View File

@ -24,7 +24,11 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "../types.h"
#include "types.h"
#ifdef _x64
#define DWL_USER DWLP_USER
#endif
extern CRITICAL_SECTION section;

View File

@ -25,9 +25,9 @@ const char* __stdcall DXGetErrorString8A(HRESULT hr);
const char* __stdcall DXGetErrorDescription8A(HRESULT hr);
#define DXGetErrorDescription8 DXGetErrorDescription8A
#else
#include <dxerr8.h>
#include <dxerr.h>
#endif
#include "../SPU.h"
#include "SPU.h"
#include "snddx.h"
int SNDDXInit(int buffersize);
@ -71,14 +71,14 @@ int SNDDXInit(int buffersize)
if ((ret = DirectSoundCreate8(NULL, &lpDS8, NULL)) != DS_OK)
{
sprintf(tempstr, "DirectSound8Create error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
sprintf(tempstr, "DirectSound8Create error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}
if ((ret = IDirectSound8_SetCooperativeLevel(lpDS8, hwnd, DSSCL_PRIORITY)) != DS_OK)
{
sprintf(tempstr, "IDirectSound8_SetCooperativeLevel error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
sprintf(tempstr, "IDirectSound8_SetCooperativeLevel error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}
@ -91,7 +91,7 @@ int SNDDXInit(int buffersize)
if ((ret = IDirectSound8_CreateSoundBuffer(lpDS8, &dsbdesc, &lpDSB, NULL)) != DS_OK)
{
sprintf(tempstr, "Error when creating primary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
sprintf(tempstr, "Error when creating primary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}
@ -108,7 +108,7 @@ int SNDDXInit(int buffersize)
if ((ret = IDirectSoundBuffer8_SetFormat(lpDSB, &wfx)) != DS_OK)
{
sprintf(tempstr, "IDirectSoundBuffer8_SetFormat error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
sprintf(tempstr, "IDirectSoundBuffer8_SetFormat error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}
@ -135,14 +135,14 @@ int SNDDXInit(int buffersize)
if ((ret = IDirectSound8_CreateSoundBuffer(lpDS8, &dsbdesc, &lpDSB2, NULL)) != DS_OK)
{
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}
}
else
{
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
return -1;
}