Ignore:
Timestamp:
Sep 3, 2008, 4:08:49 PM (17 years ago)
Author:
rjerant
Message:

Fixed ticket:18 - streaming problem with video playback

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OCO/trunk/drv16/waudio.cpp

    r330 r369  
    12871287#pragma on (unreferenced)
    12881288{
     1289         ULONG  ulBytesPerIRQ;
     1290         
    12891291#ifdef DEBUG
    12901292    dprintf(("WAVEAUDIO::ConfigDev"));
     
    13211323    } /* endswitch */
    13221324
    1323     // Calculate the PCMConsumeRate
     1325          // Calculate the BytesPerIRQ
     1326          // The BytesPerIRQ is the number of bytes consumed by this data format
     1327          // for every interrupt generated by the codec.
     1328          // This information is returned to the WAVESTREAM which uses it in
     1329          // buffer management decisions....
     1330          // rjj Fix for Bug #18 28082008
     1331         
     1332          ulBytesPerIRQ = pConfigInfo->ulSampleRate;
     1333          ulBytesPerIRQ >>= 5; // 32 interrupts per second
     1334                               // we can tweak this as needed but generally this should do rjj
     1335         
     1336          if (pConfigInfo->ulBitsPerSample == 16) {
     1337                ulBytesPerIRQ <<= 1;
     1338          }
     1339          if (pConfigInfo->ulNumChannels == 2) {
     1340                ulBytesPerIRQ <<= 1;
     1341          }
     1342          // make sure it's an even multiple of 64
     1343          ulBytesPerIRQ += 0x00000040;
     1344          ulBytesPerIRQ &= 0xFFFFFFC0;
     1345               
     1346          if (ulBytesPerIRQ > 0x800) {
     1347                ulBytesPerIRQ = 0x800;
     1348          }
     1349          pConfigInfo->ulBytesPerIRQ = ulBytesPerIRQ;
     1350
     1351          // Calculate the PCMConsumeRate
    13241352    // The consume rate is the number of bytes consumed by this data format
    13251353    // per second. It calculated by taking the following equation:
Note: See TracChangeset for help on using the changeset viewer.