Cleanup - removed some commented out stuff.

This commit is contained in:
Dabb 2000-12-31 18:20:24 +00:00
parent 587ed5cc3f
commit 32910a9385

View file

@ -236,16 +236,9 @@ SNDDMA_InitDirect (void)
Con_Printf ("DirectSound create failed\n"); Con_Printf ("DirectSound create failed\n");
return SIS_FAILURE; return SIS_FAILURE;
} }
// if (MessageBox (NULL,
// "The sound hardware is in use by another app.\n\n"
// "Select Retry to try to start sound again or Cancel to run Quake with no sound.",
// "Sound not available",
// MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
// {
Con_Printf ("DirectSoundCreate failure\n" Con_Printf ("DirectSoundCreate failure\n"
" hardware already in use\n"); " hardware already in use\n");
return SIS_NOTAVAIL; return SIS_NOTAVAIL;
// }
} }
dscaps.dwSize = sizeof (dscaps); dscaps.dwSize = sizeof (dscaps);
@ -284,15 +277,7 @@ SNDDMA_InitDirect (void)
pformat = format; pformat = format;
if (DS_OK != pDSPBuf->lpVtbl->SetFormat (pDSPBuf, &pformat)) { if (DS_OK != pDSPBuf->lpVtbl->SetFormat (pDSPBuf, &pformat)) {
// if (snd_firsttime) } else primary_format_set = true;
// Con_Printf ("Set primary sound buffer format: no\n");
} else
// {
// if (snd_firsttime)
// Con_Printf ("Set primary sound buffer format: yes\n");
primary_format_set = true;
// }
} }
} }
@ -323,8 +308,6 @@ SNDDMA_InitDirect (void)
FreeSound (); FreeSound ();
return SIS_FAILURE; return SIS_FAILURE;
} }
// if (snd_firsttime)
// Con_Printf ("Using secondary sound buffer\n");
} else { } else {
if (DS_OK != if (DS_OK !=
pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow,
@ -340,26 +323,18 @@ SNDDMA_InitDirect (void)
} }
pDSBuf = pDSPBuf; pDSBuf = pDSPBuf;
// Con_Printf ("Using primary sound buffer\n");
} }
// Make sure mixer is active // Make sure mixer is active
pDSBuf->lpVtbl->Play (pDSBuf, 0, 0, DSBPLAY_LOOPING); pDSBuf->lpVtbl->Play (pDSBuf, 0, 0, DSBPLAY_LOOPING);
/* if (snd_firsttime)
Con_Printf(" %d channel(s)\n"
" %d bits/sample\n"
" %d bytes/sec\n",
shm->channels, shm->samplebits, shm->speed);*/
gSndBufSize = dsbcaps.dwBufferBytes; gSndBufSize = dsbcaps.dwBufferBytes;
// initialize the buffer // initialize the buffer
reps = 0; reps = 0;
while ((hresult = pDSBuf->lpVtbl->Lock (pDSBuf, 0, gSndBufSize, while ((hresult = pDSBuf->lpVtbl->Lock (pDSBuf, 0, gSndBufSize,
(LPVOID *) & lpData, &dwSize, NULL, (LPVOID *) & lpData, &dwSize, NULL,NULL, 0)) != DS_OK) {
NULL, 0)) != DS_OK) {
if (hresult != DSERR_BUFFERLOST) { if (hresult != DSERR_BUFFERLOST) {
Con_Printf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n"); Con_Printf ("SNDDMA_InitDirect: DS::Lock Sound Buffer Failed\n");
FreeSound (); FreeSound ();
@ -442,15 +417,8 @@ SNDDMA_InitWav (void)
Con_Printf ("waveOutOpen failed\n"); Con_Printf ("waveOutOpen failed\n");
return false; return false;
} }
// if (MessageBox (NULL,
// "The sound hardware is in use by another app.\n\n"
// "Select Retry to try to start sound again or Cancel to run Quake with no sound.",
// "Sound not available",
// MB_RETRYCANCEL | MB_SETFOREGROUND | MB_ICONEXCLAMATION) != IDRETRY)
// {
Con_Printf ("waveOutOpen failure;\n" " hardware already in use\n"); Con_Printf ("waveOutOpen failure;\n" " hardware already in use\n");
return false; return false;
// }
} }
/* /*