mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-31 01:00:53 +00:00
Fixed mingw32 warnings.
This commit is contained in:
parent
5410b16ec8
commit
84ff3a3c1b
4 changed files with 30 additions and 19 deletions
|
@ -45,7 +45,6 @@ static qboolean enabled = false;
|
||||||
static qboolean playLooping = false;
|
static qboolean playLooping = false;
|
||||||
static float cdvolume;
|
static float cdvolume;
|
||||||
static byte remap[100];
|
static byte remap[100];
|
||||||
static byte cdrom;
|
|
||||||
static byte playTrack;
|
static byte playTrack;
|
||||||
static byte maxTrack;
|
static byte maxTrack;
|
||||||
|
|
||||||
|
@ -56,8 +55,11 @@ static void CDAudio_Eject(void)
|
||||||
{
|
{
|
||||||
DWORD dwReturn;
|
DWORD dwReturn;
|
||||||
|
|
||||||
if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, (DWORD)NULL))
|
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN,
|
||||||
|
(DWORD)NULL);
|
||||||
|
if (dwReturn) {
|
||||||
Con_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
|
Con_DPrintf("MCI_SET_DOOR_OPEN failed (%i)\n", dwReturn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,8 +67,10 @@ static void CDAudio_CloseDoor(void)
|
||||||
{
|
{
|
||||||
DWORD dwReturn;
|
DWORD dwReturn;
|
||||||
|
|
||||||
if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD)NULL))
|
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, (DWORD)NULL);
|
||||||
|
if (dwReturn) {
|
||||||
Con_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
|
Con_DPrintf("MCI_SET_DOOR_CLOSED failed (%i)\n", dwReturn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,8 +200,10 @@ void CDAudio_Stop(void)
|
||||||
if (!playing)
|
if (!playing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD)NULL))
|
dwReturn = mciSendCommand(wDeviceID, MCI_STOP, 0, (DWORD)NULL);
|
||||||
|
if (dwReturn) {
|
||||||
Con_DPrintf("MCI_STOP failed (%i)", dwReturn);
|
Con_DPrintf("MCI_STOP failed (%i)", dwReturn);
|
||||||
|
}
|
||||||
|
|
||||||
wasPlaying = false;
|
wasPlaying = false;
|
||||||
playing = false;
|
playing = false;
|
||||||
|
@ -216,8 +222,10 @@ void CDAudio_Pause(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mciGenericParms.dwCallback = (DWORD)mainwindow;
|
mciGenericParms.dwCallback = (DWORD)mainwindow;
|
||||||
if (dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD)(LPVOID) &mciGenericParms))
|
dwReturn = mciSendCommand(wDeviceID, MCI_PAUSE, 0, (DWORD)(LPVOID) &mciGenericParms);
|
||||||
|
if (dwReturn) {
|
||||||
Con_DPrintf("MCI_PAUSE failed (%i)", dwReturn);
|
Con_DPrintf("MCI_PAUSE failed (%i)", dwReturn);
|
||||||
|
}
|
||||||
|
|
||||||
wasPlaying = playing;
|
wasPlaying = playing;
|
||||||
playing = false;
|
playing = false;
|
||||||
|
@ -450,8 +458,8 @@ int CDAudio_Init(void)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
mciOpenParms.lpstrDeviceType = "cdaudio";
|
mciOpenParms.lpstrDeviceType = "cdaudio";
|
||||||
if (dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD) (LPVOID) &mciOpenParms))
|
dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_OPEN_SHAREABLE, (DWORD) (LPVOID) &mciOpenParms);
|
||||||
{
|
if (dwReturn) {
|
||||||
Con_Printf("CDAudio_Init: MCI_OPEN failed (%i)\n", dwReturn);
|
Con_Printf("CDAudio_Init: MCI_OPEN failed (%i)\n", dwReturn);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -459,8 +467,8 @@ int CDAudio_Init(void)
|
||||||
|
|
||||||
// Set the time format to track/minute/second/frame (TMSF).
|
// Set the time format to track/minute/second/frame (TMSF).
|
||||||
mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF;
|
mciSetParms.dwTimeFormat = MCI_FORMAT_TMSF;
|
||||||
if (dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID) &mciSetParms))
|
dwReturn = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID) &mciSetParms);
|
||||||
{
|
if (dwReturn) {
|
||||||
Con_Printf("MCI_SET_TIME_FORMAT failed (%i)\n", dwReturn);
|
Con_Printf("MCI_SET_TIME_FORMAT failed (%i)\n", dwReturn);
|
||||||
mciSendCommand(wDeviceID, MCI_CLOSE, 0, (DWORD)NULL);
|
mciSendCommand(wDeviceID, MCI_CLOSE, 0, (DWORD)NULL);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -626,7 +626,9 @@ void S_ClearBuffer (void)
|
||||||
|
|
||||||
reps = 0;
|
reps = 0;
|
||||||
|
|
||||||
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pData, &dwSize, NULL, NULL, 0)) != DS_OK)
|
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
|
||||||
|
(LPVOID *)&pData, &dwSize,
|
||||||
|
NULL, NULL, 0)) != DS_OK)
|
||||||
{
|
{
|
||||||
if (hresult != DSERR_BUFFERLOST)
|
if (hresult != DSERR_BUFFERLOST)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,9 +97,9 @@ void S_TransferStereo16 (int endtime)
|
||||||
{
|
{
|
||||||
reps = 0;
|
reps = 0;
|
||||||
|
|
||||||
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize,
|
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
|
||||||
&pbuf2, &dwSize2, 0)) != DS_OK)
|
(LPVOID *)&pbuf, &dwSize,
|
||||||
{
|
(LPVOID *)&pbuf2, &dwSize2, 0)) != DS_OK) {
|
||||||
if (hresult != DSERR_BUFFERLOST)
|
if (hresult != DSERR_BUFFERLOST)
|
||||||
{
|
{
|
||||||
Con_Printf ("S_TransferStereo16: DS::Lock Sound Buffer Failed\n");
|
Con_Printf ("S_TransferStereo16: DS::Lock Sound Buffer Failed\n");
|
||||||
|
@ -186,9 +186,9 @@ void S_TransferPaintBuffer(int endtime)
|
||||||
{
|
{
|
||||||
reps = 0;
|
reps = 0;
|
||||||
|
|
||||||
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &pbuf, &dwSize,
|
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
|
||||||
&pbuf2,&dwSize2, 0)) != DS_OK)
|
(LPVOID *)&pbuf, &dwSize,
|
||||||
{
|
(LPVOID *)&pbuf2, &dwSize2, 0)) != DS_OK) {
|
||||||
if (hresult != DSERR_BUFFERLOST)
|
if (hresult != DSERR_BUFFERLOST)
|
||||||
{
|
{
|
||||||
Con_Printf ("S_TransferPaintBuffer: DS::Lock Sound Buffer Failed\n");
|
Con_Printf ("S_TransferPaintBuffer: DS::Lock Sound Buffer Failed\n");
|
||||||
|
|
|
@ -378,8 +378,9 @@ sndinitstat SNDDMA_InitDirect (void)
|
||||||
// initialize the buffer
|
// initialize the buffer
|
||||||
reps = 0;
|
reps = 0;
|
||||||
|
|
||||||
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize, &lpData, &dwSize, NULL, NULL, 0)) != DS_OK)
|
while ((hresult = pDSBuf->lpVtbl->Lock(pDSBuf, 0, gSndBufSize,
|
||||||
{
|
(LPVOID *)&lpData, &dwSize, NULL,
|
||||||
|
NULL, 0)) != DS_OK) {
|
||||||
if (hresult != DSERR_BUFFERLOST)
|
if (hresult != DSERR_BUFFERLOST)
|
||||||
{
|
{
|
||||||
Con_SafePrintf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
|
Con_SafePrintf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
|
||||||
|
@ -645,7 +646,7 @@ how many sample are required to fill it up.
|
||||||
int SNDDMA_GetDMAPos(void)
|
int SNDDMA_GetDMAPos(void)
|
||||||
{
|
{
|
||||||
MMTIME mmtime;
|
MMTIME mmtime;
|
||||||
int s;
|
int s = 0;
|
||||||
DWORD dwWrite;
|
DWORD dwWrite;
|
||||||
|
|
||||||
if (dsound_init)
|
if (dsound_init)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue