Changeset 144 for trunk/src/kernel/qsound_pm.cpp
- Timestamp:
- Oct 25, 2006, 11:44:19 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qsound_pm.cpp
r122 r144 406 406 openParams.pszElementName = (PSZ) fileHandle; 407 407 ULONG params = MCI_WAIT | MCI_OPEN_MMIO | MCI_READONLY | MCI_OPEN_TYPE_ID; 408 408 if ( getenv( "QT_PM_NO_SOUND_SHARE" ) != NULL ) { 409 409 #if defined(QT_DEBUG) 410 410 qDebug( "QAuBucketMMPM: WARNING: opening device for sound file [%s] in " 411 "exclusive mode due to QT_PM_NO_SOUND_SHARE=%s", 412 fName.data(), getenv( "QT_PM_NO_SOUND_SHARE" ) ); 413 #endif 414 } else { 415 params |= MCI_OPEN_SHAREABLE; 416 } 411 "exclusive mode due to QT_PM_NO_SOUND_SHARE=%s", 412 fName.data(), getenv( "QT_PM_NO_SOUND_SHARE" ) ); 413 #endif 414 } else if ( getenv( "QT_PM_SOUND_SHARE" ) != NULL ) { 415 #if defined(QT_DEBUG) 416 qDebug( "QAuBucketMMPM: WARNING: opening device for sound file [%s] in " 417 "shareable mode due to QT_PM_SOUND_SHARE=%s", 418 fName.data(), getenv( "QT_PM_SOUND_SHARE" ) ); 419 #endif 420 params |= MCI_OPEN_SHAREABLE; 421 } else { 422 // Too pity, but we have to use exclusive mode by default due to 423 // problems with the uniaud driver that is most commonly used nowadays. 424 // In non-exclusive (shared) mode, we will hang up in mmpm.dll doing 425 // mciSendCommand( MCI_CLOSE ) in close() for the last played sound if 426 // we start playing 10 or more sounds simultaneously (i.e. w/o waiting 427 // until the previous one completely finishes playing). 428 } 417 429 ULONG rc = mciSendCommand( 0, MCI_OPEN, params, &openParams, 0 ); 418 430 if ( rc != MCIERR_SUCCESS ) { … … 441 453 442 454 #if defined(QT_QSOUND_DEBUG) 443 qDebug( "QAuBucketMMPM()::close(): {%p} [%s]", this, fName.data() ); 455 qDebug( "QAuBucketMMPM::close(): {%p} [%s] atExit=%d", 456 this, fName.data(), atExit ); 444 457 #endif 445 458 … … 448 461 449 462 // Use MCI_CLOSE_EXIT to tell the media control driver it should 450 // close immediately, w/o doing forany notifications, etc.463 // close immediately, w/o waiting or doing any notifications, etc. 451 464 ULONG param = atExit ? MCI_CLOSE_EXIT : 0; 452 465 … … 467 480 { 468 481 #if defined(QT_QSOUND_DEBUG) 469 qDebug( "QAuBucketMMPM ()::play(): {%p} [%s]", this, fName.data() );482 qDebug( "QAuBucketMMPM::play(): {%p} [%s]", this, fName.data() ); 470 483 #endif 471 484
Note:
See TracChangeset
for help on using the changeset viewer.