Ignore:
Timestamp:
Nov 4, 2009, 4:21:24 PM (16 years ago)
Author:
pasha
Message:

Rebuild buffers supply, fix DDCMD_WRITE with len=0 in WAVE chain, remove/add debug output, change DebugInt3 for debug/nondebug version, move unused code to unused directore

File:
1 edited

Legend:

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

    r33 r468  
    4444
    4545    pStream = (PDWAVESTREAM)FindStream_fromFile(ulSysFileNum);
    46     if(pStream == NULL) {
     46    if (pStream == NULL)
     47    {
    4748        dprintf(("HookHandler stream %lx not found!", (ULONG) ulSysFileNum));
    4849        DebugInt3();
     
    7980    pStreamBuf = new STREAMBUFFER(uLength, (PSTREAMBUF)0, fLooping);
    8081    if(pStreamBuf == NULL) {
     82        dprintf(("DWAVESTREAM::Write StreamBuf"));
    8183        DebugInt3();
    8284        return 1;
     
    8789    rc = DevHelp_VirtToLin(SELECTOROF(pLock), OFFSETOF(pLock), &linLock);
    8890    if(rc) {
     91        dprintf(("DWAVESTREAM::Write VirtToLin"));
    8992        DebugInt3();
    9093        delete pStreamBuf;
     
    9497    rc = DevHelp_VMLock(VMDHL_LONG | VMDHL_WRITE, (LIN)pbuf, uLength, -1L, linLock, (PULONG)&PageListCount);
    9598    if(rc) {
     99        dprintf(("DWAVESTREAM::Write VMLock"));
    96100        DebugInt3();
    97101        delete pStreamBuf;
     
    101105    rc = DevHelp_VMProcessToGlobal(VMDHGP_WRITE, (LIN)pbuf, uLength, (PLIN)&linAddr);
    102106    if(rc) {
     107        dprintf(("DWAVESTREAM::Write ProcToGlob"));
    103108        DebugInt3();
    104109        DevHelp_VMUnLock(linLock);
     
    119124   if(temp)
    120125   {
    121         if(ulStreamState == STREAM_STREAMING) {//means we're called during an interrupt
     126        if(ulStreamState == STREAM_STREAMING)
     127        {//means we're called during an interrupt
    122128            qhReturn.PushOnTail((PQUEUEELEMENT)temp);
    123129            DevHelp_ArmCtxHook(ulSysFileNum, hCtxHook);
    124130        }
    125         else {
     131        else
     132        {
    126133            DevHelp_VMFree((LIN)temp->pBuffptr);
    127134            DevHelp_VMUnLock(temp->linLock);
     
    136143    hSem = pReg->hStream;
    137144
     145    dprintf(("DWAVESTREAM::Register"));
    138146    if(DevHelp_OpenEventSem(hSem) != 0) {
    139147        dprintf(("DevHlp_OpenEventSem %lx failed!", hSem));
     
    173181        Buff_left = pTemp->ulBuffsz - pTemp->ulBuffpos;
    174182
    175             if(pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS) {
    176             DebugInt3();
    177             return;
    178         }
     183            if (pahw->GetPosition(StreamId, &_configinfo, &space) != OSSERR_SUCCESS)
     184           {
     185               dprintf(("DWAVESTREAM::AddBuffers GetPositions"));
     186               DebugInt3();
     187               return;
     188           }
    179189        if(fFirst) {
    180190             space = min(space, 4*_configinfo.ulFragsize);
     
    255265   WAVESTREAM(streamtype, pinit, filesysnum, mixerStreamId), fError(FALSE), hCtxHook(0), hSem(0)
    256266{
    257     if(DevHelp_AllocateCtxHook((NPFN)HookHandlerAsm, &hCtxHook)) {
     267    if (DevHelp_AllocateCtxHook((NPFN)HookHandlerAsm, &hCtxHook))
     268    {
     269        dprintf(("DWAVESTREAM::DWAVESTREAM AllocCtx"));
    258270        DebugInt3();
    259271        fError = TRUE;
Note: See TracChangeset for help on using the changeset viewer.