Ignore:
Timestamp:
Oct 17, 2008, 5:37:44 PM (17 years ago)
Author:
rjerant
Message:

Update buffer handeling routines. This should allow merging back to a single Uniaud32

File:
1 edited

Legend:

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

    r33 r396  
    4747
    4848      case DDCMD_SETUP: {
     49         ddprintf(("DDCMD_SETUP"));
    4950         if (!pstream)
    5051            return ERROR_INVALID_STREAM;
     
    6162      }
    6263      case DDCMD_READ: {
     64         ddprintf(("DDCMD_READ"));
    6365         PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
    6466
     
    7375      }
    7476      case DDCMD_WRITE: {
    75          PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
     77          PDDCMDREADWRITE p=(PDDCMDREADWRITE) pCommon;
    7678
    7779         if (!pstream)
    7880            return ERROR_INVALID_STREAM;
    79          ulReturnCode =
    80             pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);
     81         ulReturnCode = pstream->Write((PSTREAMBUF) p->pBuffer,(unsigned) p->ulBufferSize);
     82         ddprintf(("DDCMD_WRITE %lx",p->ulBufferSize));
    8183         if (ulReturnCode)
    8284            return ulReturnCode;
     
    8486      }
    8587      case DDCMD_STATUS: {
    86 
     88         ddprintf(("DDCMD_STATUS"));
    8789         PDDCMDSTATUS p = (PDDCMDSTATUS) pCommon;
    8890         PSTATUS_PARM p2 = (PSTATUS_PARM) p->pStatus;
     
    99101         switch (p->ulCmd) {
    100102         case DDCMD_START:
    101             return pstream->StartStream();
     103             ddprintf(("DDCMD_START"));
     104             return pstream->StartStream();
    102105         case DDCMD_STOP:
    103             p->ulParmSize=sizeof(ULONG);
     106             ddprintf(("DDCMD_STOP"));
     107             p->ulParmSize=sizeof(ULONG);
    104108            return pstream->StopStream((PCONTROL_PARM)p->pParm);
    105109         case DDCMD_PAUSE:
    106             p->ulParmSize=sizeof(ULONG);
     110             ddprintf(("DDCMD_PAUSE"));
     111             p->ulParmSize=sizeof(ULONG);
    107112            return pstream->PauseStream((PCONTROL_PARM)p->pParm);
    108113         case DDCMD_RESUME:
    109             return pstream->ResumeStream();
     114             ddprintf(("DDCMD_RESUME"));
     115             return pstream->ResumeStream();
    110116         case DDCMD_ENABLE_EVENT:
    111             return pstream->EnableEvent(p);
     117             ddprintf(("DDCMD_ENABLE_EVENT"));
     118             return pstream->EnableEvent(p);
    112119         case DDCMD_DISABLE_EVENT:
    113             return pstream->DisableEvent(p);
     120             ddprintf(("DDCMD_DISABLE_EVENT"));
     121             return pstream->DisableEvent(p);
    114122         case DDCMD_PAUSE_TIME:
    115             return pstream->PauseStreamTime();
     123             ddprintf(("DDCMD_PAUSE_TIME"));
     124             return pstream->PauseStreamTime();
    116125         case DDCMD_RESUME_TIME:
    117             return pstream->ResumeStreamTime();
     126             ddprintf(("DDCMD_RESUME_TIME"));
     127             return pstream->ResumeStreamTime();
    118128         default:
    119129            return ERROR_INVALID_REQUEST;
     
    121131      }
    122132      case DDCMD_REG_STREAM: {
     133         ddprintf(("DDCMD_REG_STREAM"));
    123134         if (pstream)
    124             return ERROR_HNDLR_REGISTERED;
     135             return ERROR_HNDLR_REGISTERED;
    125136         pstream = FindStream_fromFile(((PDDCMDREGISTER) pCommon)->ulSysFileNum);
    126137         if (!pstream)
    127138            return ERROR_STREAM_CREATION;
    128139         ulReturnCode = pstream->Register((PDDCMDREGISTER) pCommon);
    129          dprintf(("DDCMD_EntryPoint: DDCMD_REG_STREAM stream %x returned %d", (USHORT)pCommon->hStream, (USHORT)ulReturnCode));
     140         //dprintf(("DDCMD_EntryPoint: DDCMD_REG_STREAM stream %x returned %d", (USHORT)pCommon->hStream, (USHORT)ulReturnCode));
    130141         if (ulReturnCode)
    131142            return ERROR_STREAM_CREATION;
     
    133144      }
    134145      case DDCMD_DEREG_STREAM:
     146         ddprintf(("DDCMD_DEREG_STREAM"));
    135147         if (!pstream)
    136148             return ERROR_INVALID_STREAM;
     
    138150             open_strategy = 1UL; // close it really
    139151         pstream->DeRegister();
    140          dprintf(("DDCMD_EntryPoint: DDCMD_DEREG_STREAM stream %x, %ld", (USHORT)pCommon->hStream, open_strategy));
     152         //dprintf(("DDCMD_EntryPoint: DDCMD_DEREG_STREAM stream %x, %ld", (USHORT)pCommon->hStream, open_strategy));
    141153         break;
    142       default:
     154        default:
     155         ddprintf(("INVALID DDCMD\n"));
    143156         return ERROR_INVALID_FUNCTION;
    144157   }
Note: See TracChangeset for help on using the changeset viewer.