Changeset 19495
- Timestamp:
- Jul 31, 2002, 3:51:21 PM (23 years ago)
- Location:
- tags/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/include/custombuild.h ¶
r19477 r19495 88 88 void WIN32API DisableWaveAudio(); 89 89 90 //Call to tell winmm to expect simple fixed size buffers, so 91 //it doesn't have to use very small DART buffers; this will 92 //only work in very specific cases; it is not a good general 93 //purpose solution) 94 void WIN32API SetFixedWaveBufferSize(); 95 90 96 //Override shared semaphore name used to synchronize global window handle 91 97 //array access (to avoid name clash with Odin) -
TabularUnified tags/trunk/src/winmm/waveoutdart.cpp ¶
r19126 r19495 1 /* $Id: waveoutdart.cpp,v 1.1 0 2002-06-05 11:44:11 sandervl Exp $ */1 /* $Id: waveoutdart.cpp,v 1.11 2002-07-31 13:51:21 sandervl Exp $ */ 2 2 3 3 /* … … 11 11 * Note: 12 12 * 2000/11/24 PH MCI_MIXSETUP_PARMS->pMixWrite does alter FS: selector! 13 * TODO: mulaw, alaw & adpcm 13 14 * 14 15 */ … … 50 51 LONG APIENTRY WaveOutHandler(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags); 51 52 52 //TODO: mulaw, alaw & adpcm 53 static BOOL fFixedWaveBufferSize = FALSE; 54 55 /******************************************************************************/ 56 //Call to tell winmm to expect simple fixed size buffers, so 57 //it doesn't have to use very small DART buffers; this will 58 //only work in very specific cases; it is not a good general 59 //purpose solution) 60 /******************************************************************************/ 61 void WIN32API SetFixedWaveBufferSize() 62 { 63 fFixedWaveBufferSize = TRUE; 64 } 53 65 /******************************************************************************/ 54 66 /******************************************************************************/ … … 194 206 195 207 #if 1 196 int consumerate = getAvgBytesPerSecond(); 197 int minbufsize = consumerate/32; 198 199 ulBufSize = pwh->dwBufferLength/2; 200 if(ulBufSize > minbufsize) { 201 dprintf(("set buffer size to %d bytes (org size = %d)", minbufsize, pwh->dwBufferLength)); 202 ulBufSize = minbufsize; 203 } 208 if(fFixedWaveBufferSize == FALSE) 209 {//by default we need to select a small enough buffer to be able to 210 //signal buffer completion in time 211 int consumerate = getAvgBytesPerSecond(); 212 int minbufsize = consumerate/32; 213 214 ulBufSize = pwh->dwBufferLength/2; 215 if(ulBufSize > minbufsize) { 216 dprintf(("set buffer size to %d bytes (org size = %d)", minbufsize, pwh->dwBufferLength)); 217 ulBufSize = minbufsize; 218 } 219 } 220 else ulBufSize = pwh->dwBufferLength; 204 221 #else 205 222 if(pwh->dwBufferLength >= 512 && pwh->dwBufferLength <= 1024)
Note:
See TracChangeset
for help on using the changeset viewer.