Changeset 473 for OCO/trunk/drv16/waveplay.cpp
- Timestamp:
- Nov 9, 2009, 2:36:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/waveplay.cpp
r468 r473 61 61 ULONG ret; 62 62 #ifdef DEBUG 63 dprintf(("WAVEPLAY::Open %lx",StreamId));63 // dprintf(("WAVEPLAY::Open %lx",StreamId)); 64 64 #endif 65 65 if (fAPMSuspend) 66 66 { 67 67 #ifdef DEBUG 68 dprintf(("WAVEPLAY::Open. Suspend state"));68 // dprintf(("WAVEPLAY::Open. Suspend state")); 69 69 #endif 70 70 apm_resume(); … … 107 107 { 108 108 #ifdef DEBUG 109 dprintf(("WAVEPLAY::Close stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy));109 // dprintf(("WAVEPLAY::Close stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy)); 110 110 #endif 111 111 #if 0 // fixme to be gone? … … 119 119 force_closed = 0; 120 120 #ifdef DEBUG 121 dprintf(("WAVEPLAY::Closed stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy));121 // dprintf(("WAVEPLAY::Closed stream: %lx, %lx, os: %lx", StreamId, waveOpened,open_strategy)); 122 122 #endif 123 123 return TRUE; … … 140 140 open_strategy = 0UL; 141 141 #ifdef DEBUG 142 dprintf(("OSS16_WAVECLOSE: Success"));142 // dprintf(("OSS16_WAVECLOSE: Success")); 143 143 #endif /* DEBUG */ 144 144 return TRUE; … … 171 171 { 172 172 #ifdef DEBUG 173 dprintf(("WAVEPLAY::ConfigDev. Suspend state"));173 // dprintf(("WAVEPLAY::ConfigDev. Suspend state")); 174 174 #endif 175 175 apm_resume(); … … 189 189 } 190 190 #ifdef DEBUG 191 dprintf(("WAVEPLAY::ConfigDev1 192 dprintf((" WAVEPLAY::ConfigDev1ulFirstBufSize %ld", ulFirstBufSize));193 dprintf((" WAVEPLAY::ConfigDev1ulFragsize %ld", pConfigInfo->ulFragsize));191 dprintf(("WAVEPLAY::ConfigDev1\nSampleRate %ld", pConfigInfo->ulHwSampleRate)); 192 dprintf(("ulFirstBufSize %ld", ulFirstBufSize)); 193 dprintf(("ulFragsize %ld", pConfigInfo->ulFragsize)); 194 194 #endif 195 195 … … 211 211 ulFirstBufSize = ConvertLength(ulFirstBufSize, pConfigInfo); 212 212 #ifdef DEBUG 213 dprintf((" WAVEPLAY::ConfigDev2ulFirstBufSize %ld", ulFirstBufSize));213 dprintf(("ulFirstBufSize %ld", ulFirstBufSize)); 214 214 #endif /* DEBUG */ 215 215 } … … 223 223 ulPCMConsumeRate = ConvertLength(pConfigInfo->ulPCMConsumeRate, pConfigInfo); 224 224 #ifdef DEBUG 225 dprintf((" WAVEPLAY::ConfigDev:cons rate %ld buf size %ld init rate %ld", ulPCMConsumeRate, ulFirstBufSize, pConfigInfo->ulHwSampleRate));225 dprintf(("cons rate %ld buf size %ld init rate %ld", ulPCMConsumeRate, ulFirstBufSize, pConfigInfo->ulHwSampleRate)); 226 226 #endif /* DEBUG */ 227 227 … … 252 252 253 253 #ifdef DEBUG 254 dprintf((" WAVEPLAY::ConfigDev2fragsize %ld", fragsize));254 dprintf(("fragsize %ld", fragsize)); 255 255 #endif 256 256 hwparam.ulSampleRate = pConfigInfo->ulHwSampleRate; … … 261 261 #ifdef DEBUG 262 262 dprintf(("WAVEPLAY:ConfigDev:OSS16_WaveSetFormat . rc = %d",rc)); 263 dprintf((" WAVEPLAY:ConfigDev:samp rate %ld",hwparam.ulSampleRate));264 dprintf((" WAVEPLAY:ConfigDev:bits per sample %ld",hwparam.ulBitsPerSample));265 dprintf((" WAVEPLAY:ConfigDev:channels %ld",hwparam.ulNumChannels));266 dprintf((" WAVEPLAY:ConfigDev:data type %ld",hwparam.ulDataType));263 dprintf(("samp rate %ld",hwparam.ulSampleRate)); 264 dprintf(("bits per sample %ld",hwparam.ulBitsPerSample)); 265 dprintf(("channels %ld",hwparam.ulNumChannels)); 266 dprintf(("data type %ld",hwparam.ulDataType)); 267 267 268 268 #endif … … 294 294 { 295 295 #ifdef DEBUG 296 dprintf(("WAVEPLAY::Transfer. Suspend state"));296 // dprintf(("WAVEPLAY::Transfer. Suspend state")); 297 297 #endif 298 298 apm_resume(); … … 415 415 dprintf(("WPLAY::AddBuffer need %ld space:%ld", ulCvtBufferSize, Space)); 416 416 #endif 417 while (!Space) 418 for (i=0; i < 0xffffff; i++) 419 { 420 OSS16_WaveGetSpace(StreamId, &Space); 421 if (Space & ~(pConfigInfo->ulHwSampleSize - 1)) break; 422 } 423 #ifdef DEBUG 424 dprintf(("OUT %lx need %ld space:%ld ",i, ulCvtBufferSize, Space)); 425 #endif 417 if (Space < pConfigInfo->ulBytesPerIRQ) 418 { 419 return TRUE; 420 } 421 426 422 if (ulCvtBufferSize > Space) 427 423 ulCvtBufferSize = Space & ~(pConfigInfo->ulHwSampleSize - 1); … … 433 429 { 434 430 GetSpace(StreamId, pConfigInfo, &Space); 435 dprintf(("WPLAY::AddBuffer; OSS16_WaveAddBuffer%ld %x failed due to full buffer free space:%ld", ulCvtBufferSize, (USHORT)rc,Space));431 dprintf(("WPLAY::AddBuffer; %ld %x failed due to full buffer free space:%ld", ulCvtBufferSize, (USHORT)rc,Space)); 436 432 } 437 433 #ifdef DEBUG 438 434 else 439 dprintf(("WPLAY::AddBuffer; OSS16_WaveAddBuffer%ld rc=%x failed", ulCvtBufferSize, (USHORT)rc));435 dprintf(("WPLAY::AddBuffer; %ld rc=%x failed", ulCvtBufferSize, (USHORT)rc)); 440 436 #endif 441 437 *pulBytesTransferred = 0; … … 492 488 *pulStreamPosition = 0; 493 489 #ifdef DEBUG 494 dprintf((" OSS16_WAVEPLAY::GetPosition: Failed"));490 dprintf(("WAVEPLAY::GetPosition: Failed")); 495 491 #endif /* DEBUG */ 496 492 return FALSE; … … 515 511 *pulStreamSpace = 0; 516 512 #ifdef DEBUG 517 dprintf((" OSS16_WAVEPLAY::GetSpace: Failed"));513 dprintf(("WAVEPLAY::GetSpace: Failed")); 518 514 #endif /* DEBUG */ 519 515 return FALSE; … … 537 533 *pulHwPtr = 0; 538 534 #ifdef DEBUG 539 dprintf((" OSS16_WAVEPLAY::WaveGetHwPtr: Failed"));535 dprintf(("WAVEPLAY::WaveGetHwPtr: Failed")); 540 536 #endif /* DEBUG */ 541 537 return FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.