Changeset 473
- Timestamp:
- Nov 9, 2009, 2:36:35 AM (16 years ago)
- Location:
- OCO/trunk/drv16
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/audiohw.cpp
r33 r473 128 128 OPERATION_RECORD 129 129 }, 130 { // Last device is marked as AUDIOHW_INVALID_DEVICE131 AUDIOHW_ INVALID_DEVICE,132 -1,133 -1,134 -1135 }, 136 { // Last device is marked as AUDIOHW_INVALID_DEVICE137 AUDIOHW_INVALID_DEVICE, 138 -1,139 -1,140 -1130 { // ALSA PCM support ADPCM 131 AUDIOHW_WAVE_PLAY, 132 0, 133 DATATYPE_ADPCM_AVC, 134 OPERATION_PLAY 135 }, 136 { // 137 AUDIOHW_INVALID_DEVICE, 138 0, 139 DATATYPE_ADPCM_AVC, 140 OPERATION_RECORD 141 141 }, 142 142 { // Last device is marked as AUDIOHW_INVALID_DEVICE … … 281 281 { 282 282 int i; 283 284 283 for (i = 0; 285 284 ((i < NUM_HARDWARE_DEVICE_TYPES) && … … 291 290 } /* endfor */ 292 291 return (HardwareArray[i].DeviceType); 293 294 292 } -
OCO/trunk/drv16/commdbg.c
r468 r473 390 390 mov al,c 391 391 out dx, al 392 393 DELAY394 DELAY395 DELAY396 392 } 397 393 } -
OCO/trunk/drv16/dwavestrm.cpp
r468 r473 166 166 ULONG DWAVESTREAM::StartStream(void) 167 167 { 168 dprintf(("DWAVESTREAM::StartStream")); 168 169 return WAVESTREAM::StartStream(); 169 170 } … … 175 176 ULONG space, Buff_left, byteswritten; 176 177 177 if(!pTemp) pTemp = (PSTREAMBUFFER)qhInProcess.Tail(); 178 179 if(ulStreamType & STREAM_WRITE && pTemp && pTemp->looping) 178 dprintf(("DW::AddBuffers")); 179 if (!pTemp) pTemp = (PSTREAMBUFFER)qhInProcess.Tail(); 180 181 if (ulStreamType & STREAM_WRITE && pTemp && pTemp->looping) 182 { 183 Buff_left = pTemp->ulBuffsz - pTemp->ulBuffpos; 184 if (pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS) 185 { 186 dprintf(("DWAVESTREAM::AddBuffers GetPositions")); 187 DebugInt3(); 188 return; 189 } 190 if(fFirst) 191 { 192 space = min(space, 4*_configinfo.ulFragsize); 193 } 194 else 195 { 196 space = min(space, _configinfo.ulFragsize); 197 } 198 if (space) 199 { 200 if (space >= Buff_left) 201 { 202 byteswritten = AddBuffer(Buff_left); 203 if (byteswritten == Buff_left) 204 { 205 pTemp->ulBuffpos = 0; //reset fill position 206 AddBuffer(space - Buff_left); 207 } 208 } 209 else 210 { 211 AddBuffer(space); 212 } 213 } 214 pTemp->ulDonepos = 0; //make sure it ::Process never thinks it's done 215 } 216 else 180 217 { 181 Buff_left = pTemp->ulBuffsz - pTemp->ulBuffpos; 182 183 if (pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS) 184 { 185 dprintf(("DWAVESTREAM::AddBuffers GetPositions")); 186 DebugInt3(); 187 return; 188 } 189 if(fFirst) { 190 space = min(space, 4*_configinfo.ulFragsize); 191 } 192 else space = min(space, _configinfo.ulFragsize); 193 194 if(space) { 195 if(space >= Buff_left) { 196 byteswritten = AddBuffer(Buff_left); 197 if(byteswritten == Buff_left) { 198 pTemp->ulBuffpos = 0; //reset fill position 199 AddBuffer(space - Buff_left); 200 } 201 } 202 else AddBuffer(space); 203 } 204 pTemp->ulDonepos = 0; //make sure it ::Process never thinks it's done 205 } 206 else WAVESTREAM::AddBuffers(fFirst); 218 WAVESTREAM::AddBuffers(fFirst); 219 } 220 dprintf(("DW::AddBuffers End")); 207 221 } 208 222 //***************************************************************************** -
OCO/trunk/drv16/ioctl.cpp
r468 r473 203 203 204 204 #ifdef DEBUG 205 // dprintf(("IACapability: src type: %d, op %d",(USHORT)p->ulDataType, (USHORT)p->ulOperation));205 dprintf(("IACapability: src type: 0x%lx, op %d",p->ulDataType, (USHORT)p->ulOperation)); 206 206 #endif 207 207 … … 210 210 211 211 #ifdef DEBUG 212 // dprintf(("IACapability: dev type: %d, ldev %d",ulDevicetype, LDev));212 dprintf(("IACapability: dev type: %ld, ldev %d",ulDevicetype, LDev)); 213 213 #endif 214 214 … … 223 223 { 224 224 pHWobj->DevCaps(p); 225 if (p->ulSupport != SUPPORT_SUCCESS) { 225 if (p->ulSupport != SUPPORT_SUCCESS) 226 { 227 //PS+++ filling to our parameters as say mmpm2.inf for returning error in this call 228 // (for HDA only!!!!!) 229 p->ulDataType = WAVE_FORMAT_4S16; 230 p->ulChannels = 2; 231 p->ulSamplingRate = HZ_44100; 232 // 226 233 dprintf(("IACapability: Error support")); 227 234 prp->usStatus |= RPERR; … … 232 239 dprintf(("IACapability: Error get HW obj")); 233 240 #endif 241 //PS+++ filling to our parameters as say mmpm2.inf for returning error in this call 242 // (for HDA only!!!!!) 243 p->ulDataType = WAVE_FORMAT_4S16; 244 p->ulChannels = 2; 245 p->ulSamplingRate = HZ_44100; 246 // 234 247 p->ulSupport = UNSUPPORTED_DATATYPE; 235 248 prp->usStatus |= RPERR; … … 367 380 void IoctlDirectAudio(PREQPACKET prp) 368 381 { 369 dprintf(("IoctlDirectAudio "));382 dprintf(("IoctlDirectAudio Code:0x%x",prp->s.ioctl.bCode)); 370 383 if(prp->s.ioctl.bCode == DAUDIO_OPEN) 371 384 { … … 396 409 { 397 410 pHWobj->DevCaps(&audioCaps); 398 if (audioCaps.ulSupport != SUPPORT_SUCCESS) { 411 if (audioCaps.ulSupport != SUPPORT_SUCCESS) 412 { 399 413 dprintf(("IDirectAudio: DevCaps failed")); 400 414 pInit->sReturnCode = INVALID_REQUEST; … … 403 417 } 404 418 } 405 else { 419 else 420 { 421 dprintf(("IDirectAudio: HW DevCaps failed")); 406 422 pInit->sReturnCode = INVALID_REQUEST; 407 423 prp->usStatus |= RPERR; … … 418 434 } 419 435 420 if(!pStream->IsEverythingOk()) { 436 if(!pStream->IsEverythingOk()) 437 { 421 438 delete pStream; 422 439 dprintf(("IlDirectAudio: IsEverythingOk")); … … 465 482 { 466 483 pHWobj->DevCaps(&audioCaps); 467 if (audioCaps.ulSupport != SUPPORT_SUCCESS) { 484 if (audioCaps.ulSupport != SUPPORT_SUCCESS) 485 { 468 486 dprintf(("IlDirectAudio: DevCaps failed")); 469 487 prp->usStatus |= RPERR; … … 471 489 return; 472 490 } 491 dprintf(("IoctlDirectAudio ret")); 473 492 pInit->sReturnCode = 0; 474 493 return; 475 494 } 476 495 else { 496 dprintf(("IoctlDirectAudio err req")); 477 497 pInit->sReturnCode = INVALID_REQUEST; 478 498 prp->usStatus |= RPERR; … … 499 519 { 500 520 pHWobj->DevCaps(lpCaps); 501 return; 502 } 503 else { 521 dprintf(("IoctlDirectAudio ret1")); 522 return; 523 } 524 else 525 { 504 526 prp->usStatus |= RPERR; 527 dprintf(("IoctlDirectAudio ret err1")); 505 528 return; 506 529 } … … 509 532 510 533 pStream = FindStream_fromFile((ULONG) prp->s.ioctl.usSysFileNum); 511 if(pStream == NULL) { 534 if(pStream == NULL) 535 { 512 536 dprintf(("IDirectAudio stream %lx not found!", (ULONG) prp->s.ioctl.usSysFileNum)); 513 537 DebugInt3(); … … 547 571 case DAUDIO_START: 548 572 { 549 if(numFreeStreams > 0) { 573 if(numFreeStreams > 0) 574 { 550 575 rc = pStream->StartStream(); 551 576 if(!rc) numFreeStreams--; … … 621 646 } 622 647 623 if(rc) { 648 if(rc) 649 { 650 dprintf(("IoctlDirectAudio ret err rc=%ld",rc)); 624 651 prp->usStatus |= RPERR | RPBADCMD; 625 652 return; 626 653 } 654 dprintf(("IoctlDirectAudio ret Ok")); 627 655 return; 628 656 } … … 644 672 { 645 673 #ifdef DEBUG 646 dprintf(("StrategyIoctl:cat:0x%x, code:0x%x dev %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device));674 dprintf(("StrategyIoctl:cat:0x%x, code:0x%x cd %d gd %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device, LDev)); 647 675 #endif 648 676 if (prp->s.ioctl.bCategory == DAUDIO_IOCTL_CAT) -
OCO/trunk/drv16/ossidc16.cpp
r468 r473 715 715 { 716 716 PWAVESTREAM pStream; 717 // dprintf(("IDC16_PROCESS. param1: %x, param2: %x",param1, param2));718 //Signal all active wave playback streams to update their status717 // dprintf(("IDC16_PROCESS")); 718 //Signal all active wave playback streams to update their status 719 719 pStream = (PWAVESTREAM)FindFirstActiveStream(STREAM_WAVE_PLAY); 720 720 while(pStream) … … 722 722 pStream->Process(); 723 723 pStream = (PWAVESTREAM)FindNextActiveStream(STREAM_WAVE_PLAY, pStream); 724 } 725 //Signal all active wave capture streams to update their status 726 pStream = (PWAVESTREAM)FindFirstActiveStream(STREAM_WAVE_CAPTURE); 727 while(pStream) { 728 pStream->Process(); 729 pStream = (PWAVESTREAM)FindNextActiveStream(STREAM_WAVE_CAPTURE, pStream); 730 } 731 break; 724 } 725 //Signal all active wave capture streams to update their status 726 pStream = (PWAVESTREAM)FindFirstActiveStream(STREAM_WAVE_CAPTURE); 727 while(pStream) 728 { 729 pStream->Process(); 730 pStream = (PWAVESTREAM)FindNextActiveStream(STREAM_WAVE_CAPTURE, pStream); 731 } 732 // dprintf(("IDC16_PROCESS end")); 733 break; 732 734 } 733 735 -
OCO/trunk/drv16/ssm_idc.cpp
r468 r473 98 98 } 99 99 #endif 100 // ddprintf(("DDCMD_WRITE beg")); 100 101 ulReturnCode = pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize); 101 102 // ddprintf(("DDCMD_WRITE %lx rc=%ld",p->ulBufferSize, ulReturnCode)); … … 132 133 case DDCMD_STOP: 133 134 ddprintf(("DDCMD_STOP")); 134 DevHelp_ProcBlock ((ULONG)p, 2, 0);135 // DevHelp_ProcBlock ((ULONG)p, 2, 0); 135 136 p->ulParmSize=sizeof(ULONG); 136 137 return pstream->StopStream((PCONTROL_PARM)p->pParm); … … 146 147 return pstream->EnableEvent(p); 147 148 case DDCMD_DISABLE_EVENT: 148 //ddprintf(("DDCMD_DISABLE_EVENT"));149 ddprintf(("DDCMD_DISABLE_EVENT")); 149 150 return pstream->DisableEvent(p); 150 151 case DDCMD_PAUSE_TIME: 151 //ddprintf(("DDCMD_PAUSE_TIME"));152 ddprintf(("DDCMD_PAUSE_TIME")); 152 153 return pstream->PauseStreamTime(); 153 154 case DDCMD_RESUME_TIME: -
OCO/trunk/drv16/strategy.cpp
r468 r473 52 52 53 53 SOUNDCARD soundCard = NO_AUDIO; 54 55 #ifdef ENABLE_HW_CERTIFICATION 54 56 55 57 extern "C" char szINTEL_ICH[]; … … 82 84 extern "C" char szAZX[]; 83 85 84 #ifdef ENABLE_HW_CERTIFICATION85 86 static char *pszIntelICH = (char *)szINTEL_ICH; 86 #if 0 // fixme to be gone87 87 static char *pszSigmatel9721_23 = (char *)szSIGMATEL_9721_23; 88 #endif89 88 static char *pszSBLive = (char *)szSBLIVE; 90 89 static char *pszCMedia = (char *)szCMEDIA; -
OCO/trunk/drv16/timer.cpp
r468 r473 127 127 pStream = (MIDISTREAM*) FindActiveStream( ulStreamType ); 128 128 129 dprintf(("TIMER::Ctx")); 129 130 if (pStream) // Should always be a valid fn adr when timer is running. 130 131 pStream->Process(); … … 324 325 USHORT rc; 325 326 327 dprintf(("TIMER::iStart")); 326 328 // Disable any any pre-existing timer and reset state variables. 327 329 if ( _eState != TIMER_Stopped ) … … 369 371 int TIMER::_iStop() 370 372 { 373 dprintf(("TIMER::iStop")); 371 374 _eState = TIMER_Stopped; // Stop this Timer. 372 375 if (! TIMER::_isAnyRunning()) { // If no other Timers are running... -
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; -
OCO/trunk/drv16/wavestrm.cpp
r468 r473 181 181 } 182 182 space &= (~(_configinfo.ulSampleSize - 1)); 183 curspace = space;183 curspace = min(space, _configinfo.ulBytesPerIRQ/_configinfo.ulSampleSize * 2); 184 184 while (space && qhInProcess.IsElements()) 185 185 { … … 188 188 if (fFirst == TRUE) //PS+++ 189 189 { 190 DevHelp_ProcBlock (space, 20, 0); 190 cli(); 191 // DevHelp_ProcBlock (space, 20, 0); 191 192 } 192 193 // dgprintf(("AddBuffers write %ld SSize:%ld %d",space, _configinfo.ulSampleSize, fFirst == TRUE?1:2)); … … 195 196 { 196 197 // dgprintf(("WAVESTREAM::AddBuffers Error 2")); 197 return;198 break; 198 199 } 199 200 if(byteswritten == (ULONG)-1) … … 233 234 if(pahw->GetHwPtr(StreamId, &_configinfo, &start_pos) == FALSE) 234 235 { 235 dgprintf(("WAVESTREAM::AddBuffer Err or in WaveGetHwPtr"));236 dgprintf(("WAVESTREAM::AddBuffer Err in GetHwPtr")); 236 237 DebugInt3(); 237 238 return (ULONG)-1; … … 240 241 if (!pTemp->ulBuffsz || !space) 241 242 { 242 dgprintf(("WAVESTREAM::AddBuffer NULL, Bufsz:%ld Space:%ld",pTemp->ulBuffsz, space));243 dgprintf(("WAVESTREAM::AddBuffer 0, Bufsz:%ld Space:%ld",pTemp->ulBuffsz, space)); 243 244 //PS+++ if is ZERO do nothing and ask for give new buffer, See REMARK in mmpm2.inf 244 245 qhDone.PushOnTail(qhInProcess.PopHead()); 245 246 // DebugInt3(); 246 return 0;247 return -1; 247 248 } 248 249 // get the buffer pointer and amount of data remaining … … 261 262 dgprintf(("AddBuffer: No more room!!")); 262 263 // DebugInt3(); 263 return (ULONG)-1; //no more room 264 //PS+++ return (ULONG)-1; //no more room 265 return 0; //PS+++ may be in next time? 264 266 } 265 267 // update the buffer pos counter … … 304 306 } 305 307 306 dprintf4(("_vReadAudioBuf %lx size %ld, bytes read %ld", pdataBuf, Buff_left, bytesread));308 // dprintf4(("_vReadAudioBuf %lx size %ld, bytes read %ld", pdataBuf, Buff_left, bytesread)); 307 309 308 310 // update the buffer pos counter … … 325 327 // can be returned and finally process any events pending. 326 328 //****************************************************************************** 327 //USHORT ProcNumber = 0;329 USHORT ProcNumber = 0; 328 330 void DBGCALLCONV WAVESTREAM::Process(void) 329 331 { 330 332 PSTREAMBUFFER ptemp; 331 333 ULONG ulCurBytesProcessed = 0; 332 //USHORT CurProcNumber = ProcNumber++;334 USHORT CurProcNumber = ProcNumber++; 333 335 ULONG space; 334 336 … … 351 353 _ulBytesProcessed = ulCurBytesProcessed; 352 354 353 // if ((pahw->GetSpace(StreamId, &_configinfo, &space) != FALSE) && (space > _configinfo.ulBytesPerIRQ)) 354 switch (ulStreamType & STREAM_WRITE) { 355 if ((pahw->GetSpace(StreamId, &_configinfo, &space) != FALSE) && (space > _configinfo.ulBytesPerIRQ/_configinfo.ulSampleSize )) 356 switch (ulStreamType & STREAM_WRITE) 357 { 355 358 356 359 // if there are buffers that have been completly written to the audio buffer … … 522 525 523 526 #ifdef DEBUG 524 ddprintf(("WAVESTREAM::StartStream"));527 // ddprintf(("WAVESTREAM::StartStream")); 525 528 #endif 526 529 … … 572 575 } 573 576 } 574 ddprintf(("WAVESTREAM::StartStream %lx End", StreamId));577 // ddprintf(("WAVESTREAM::StartStream %lx End", StreamId)); 575 578 return NO_ERROR; 576 579 … … 598 601 599 602 ulStreamState = STREAM_STOPPED; 600 ddprintf(("WAVESTREAM::StopStream %lx", StreamId));603 // ddprintf(("WAVESTREAM::StopStream %lx", StreamId)); 601 604 ReturnBuffers(); 602 605 pControl->ulTime = GetCurrentTime();
Note:
See TracChangeset
for help on using the changeset viewer.